mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-07 21:59:54 +00:00
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:
parent
eea1d4e1d2
commit
c4b9e7eadf
Notes:
github-actions[bot]
2025-11-20 15:03:53 +00:00
Author: https://github.com/AtkinsSJ
Commit: c4b9e7eadf
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6855
Reviewed-by: https://github.com/gmta ✅
16 changed files with 199 additions and 9 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue