mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-04 15:19:42 +00:00
LibWeb: Parse the transform-origin
z-value
This commit is contained in:
parent
a8d5758777
commit
68d3ddb1a7
Notes:
github-actions[bot]
2025-06-15 14:02:53 +00:00
Author: https://github.com/tcl3
Commit: 68d3ddb1a7
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5085
10 changed files with 88 additions and 77 deletions
|
@ -656,15 +656,16 @@ TransformOrigin ComputedProperties::transform_origin() const
|
|||
};
|
||||
|
||||
auto const& value = property(PropertyID::TransformOrigin);
|
||||
if (!value.is_value_list() || value.as_value_list().size() != 2)
|
||||
if (!value.is_value_list() || value.as_value_list().size() != 3)
|
||||
return {};
|
||||
auto const& list = value.as_value_list();
|
||||
|
||||
auto x_value = length_percentage_with_keywords_resolved(list.values()[0]);
|
||||
auto y_value = length_percentage_with_keywords_resolved(list.values()[1]);
|
||||
if (!x_value.has_value() || !y_value.has_value())
|
||||
auto z_value = length_percentage_for_style_value(list.values()[2]);
|
||||
if (!x_value.has_value() || !y_value.has_value() || !z_value.has_value())
|
||||
return {};
|
||||
return { x_value.value(), y_value.value() };
|
||||
return { x_value.value(), y_value.value(), z_value.value() };
|
||||
}
|
||||
|
||||
Optional<Color> ComputedProperties::accent_color(Layout::NodeWithStyle const& node) const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue