@@ -94,6 +94,12 @@ struct ScrollbarColorData {
9494 Color track_color { Color::Transparent };
9595};
9696
97+ struct TextIndentData {
98+ LengthPercentage length_percentage;
99+ bool each_line { false };
100+ bool hanging { false };
101+ };
102+
97103struct TextUnderlinePosition {
98104 TextUnderlinePositionHorizontal horizontal { TextUnderlinePositionHorizontal::Auto };
99105 TextUnderlinePositionVertical vertical { TextUnderlinePositionVertical::Auto };
@@ -159,7 +165,7 @@ class InitialValues {
159165 static TextDecorationStyle text_decoration_style () { return TextDecorationStyle::Solid; }
160166 static TextTransform text_transform () { return TextTransform::None; }
161167 static TextOverflow text_overflow () { return TextOverflow::Clip; }
162- static LengthPercentage text_indent () { return Length::make_px (0 ); }
168+ static TextIndentData text_indent () { return { Length::make_px (0 ) } ; }
163169 static TextWrapMode text_wrap_mode () { return TextWrapMode::Wrap; }
164170 static CSSPixels text_underline_offset () { return 2 ; }
165171 static TextUnderlinePosition text_underline_position () { return { .horizontal = TextUnderlinePositionHorizontal::Auto, .vertical = TextUnderlinePositionVertical::Auto }; }
@@ -497,7 +503,7 @@ class ComputedValues {
497503 Variant<Length, double > tab_size () const { return m_inherited.tab_size ; }
498504 TextAlign text_align () const { return m_inherited.text_align ; }
499505 TextJustify text_justify () const { return m_inherited.text_justify ; }
500- LengthPercentage const & text_indent () const { return m_inherited.text_indent ; }
506+ TextIndentData const & text_indent () const { return m_inherited.text_indent ; }
501507 TextWrapMode text_wrap_mode () const { return m_inherited.text_wrap_mode ; }
502508 CSSPixels text_underline_offset () const { return m_inherited.text_underline_offset ; }
503509 TextUnderlinePosition text_underline_position () const { return m_inherited.text_underline_position ; }
@@ -702,7 +708,7 @@ class ComputedValues {
702708 TextAlign text_align { InitialValues::text_align () };
703709 TextJustify text_justify { InitialValues::text_justify () };
704710 TextTransform text_transform { InitialValues::text_transform () };
705- LengthPercentage text_indent { InitialValues::text_indent () };
711+ TextIndentData text_indent { InitialValues::text_indent () };
706712 TextWrapMode text_wrap_mode { InitialValues::text_wrap_mode () };
707713 CSSPixels text_underline_offset { InitialValues::text_underline_offset () };
708714 TextUnderlinePosition text_underline_position { InitialValues::text_underline_position () };
@@ -915,7 +921,7 @@ class MutableComputedValues final : public ComputedValues {
915921 void set_text_decoration_color (Color value) { m_noninherited.text_decoration_color = value; }
916922 void set_text_transform (TextTransform value) { m_inherited.text_transform = value; }
917923 void set_text_shadow (Vector<ShadowData>&& value) { m_inherited.text_shadow = move (value); }
918- void set_text_indent (LengthPercentage value) { m_inherited.text_indent = move (value); }
924+ void set_text_indent (TextIndentData value) { m_inherited.text_indent = move (value); }
919925 void set_text_wrap_mode (TextWrapMode value) { m_inherited.text_wrap_mode = value; }
920926 void set_text_overflow (TextOverflow value) { m_noninherited.text_overflow = value; }
921927 void set_text_underline_offset (CSSPixels value) { m_inherited.text_underline_offset = value; }
0 commit comments