LibWeb: Parse and propagate extended text-indent property values

CSS Text 3 gives `text-indent` a couple of optional keywords to control
which lines are affected. This commit parses them, but doesn't yet do
anything with them.
This commit is contained in:
Sam Atkins 2025-11-18 10:53:25 +00:00 committed by Jelle Raaijmakers
parent eea1d4e1d2
commit c4b9e7eadf
Notes: github-actions[bot] 2025-11-20 15:03:53 +00:00
16 changed files with 199 additions and 9 deletions

View file

@ -36,6 +36,7 @@
#include <LibWeb/CSS/StyleValues/ShadowStyleValue.h>
#include <LibWeb/CSS/StyleValues/StringStyleValue.h>
#include <LibWeb/CSS/StyleValues/StyleValueList.h>
#include <LibWeb/CSS/StyleValues/TextIndentStyleValue.h>
#include <LibWeb/CSS/StyleValues/TextUnderlinePositionStyleValue.h>
#include <LibWeb/CSS/StyleValues/TimeStyleValue.h>
#include <LibWeb/CSS/StyleValues/TransformationStyleValue.h>
@ -1369,6 +1370,17 @@ Vector<ShadowData> ComputedProperties::text_shadow(Layout::Node const& layout_no
return shadow(PropertyID::TextShadow, layout_node);
}
TextIndentData ComputedProperties::text_indent() const
{
auto const& value = property(PropertyID::TextIndent).as_text_indent();
return TextIndentData {
.length_percentage = LengthPercentage::from_style_value(value.length_percentage()),
.each_line = value.each_line(),
.hanging = value.hanging(),
};
}
TextWrapMode ComputedProperties::text_wrap_mode() const
{
auto const& value = property(PropertyID::TextWrapMode);