LibWeb: Add plumbing for new "text-overflow" CSS property

This patch adds the new "text-overflow" CSS property to all the
relevant places.
This commit is contained in:
Tobias Christiansen 2024-07-24 20:58:17 +02:00 committed by Sam Atkins
commit 794069b3cf
Notes: github-actions[bot] 2024-08-03 09:05:42 +00:00
4 changed files with 14 additions and 0 deletions

View file

@ -111,6 +111,7 @@ public:
static CSS::Length text_decoration_thickness() { return Length::make_auto(); }
static CSS::TextDecorationStyle text_decoration_style() { return CSS::TextDecorationStyle::Solid; }
static CSS::TextTransform text_transform() { return CSS::TextTransform::None; }
static CSS::TextOverflow text_overflow() { return CSS::TextOverflow::Clip; }
static CSS::LengthPercentage text_indent() { return CSS::Length::make_px(0); }
static CSS::Display display() { return CSS::Display { CSS::DisplayOutside::Inline, CSS::DisplayInside::Flow }; }
static Color color() { return Color::Black; }
@ -374,6 +375,7 @@ public:
CSS::TextDecorationStyle text_decoration_style() const { return m_noninherited.text_decoration_style; }
Color text_decoration_color() const { return m_noninherited.text_decoration_color; }
CSS::TextTransform text_transform() const { return m_inherited.text_transform; }
CSS::TextOverflow text_overflow() const { return m_noninherited.text_overflow; }
Vector<ShadowData> const& text_shadow() const { return m_inherited.text_shadow; }
CSS::Positioning position() const { return m_noninherited.position; }
CSS::WhiteSpace white_space() const { return m_inherited.white_space; }
@ -558,6 +560,7 @@ protected:
CSS::LengthPercentage text_decoration_thickness { InitialValues::text_decoration_thickness() };
CSS::TextDecorationStyle text_decoration_style { InitialValues::text_decoration_style() };
Color text_decoration_color { InitialValues::color() };
CSS::TextOverflow text_overflow { InitialValues::text_overflow() };
CSS::Positioning position { InitialValues::position() };
CSS::Size width { InitialValues::width() };
CSS::Size min_width { InitialValues::min_width() };
@ -685,6 +688,7 @@ public:
void set_text_transform(CSS::TextTransform value) { m_inherited.text_transform = value; }
void set_text_shadow(Vector<ShadowData>&& value) { m_inherited.text_shadow = move(value); }
void set_text_indent(CSS::LengthPercentage value) { m_inherited.text_indent = move(value); }
void set_text_overflow(CSS::TextOverflow value) { m_noninherited.text_overflow = value; }
void set_webkit_text_fill_color(Color value) { m_inherited.webkit_text_fill_color = value; }
void set_position(CSS::Positioning position) { m_noninherited.position = position; }
void set_white_space(CSS::WhiteSpace value) { m_inherited.white_space = value; }