1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-10 18:10:56 +09:00

LibWeb: Add DOMMatrix string constructor and set matrix value

This commit is contained in:
Bastiaan van der Plaat 2024-01-06 18:05:21 +01:00 committed by Andreas Kling
parent 903d3c92c8
commit be7538961b
Notes: sideshowbarker 2024-07-17 05:13:53 +09:00
15 changed files with 336 additions and 120 deletions

View file

@ -405,17 +405,15 @@ Optional<CSS::JustifySelf> StyleProperties::justify_self() const
return value_id_to_justify_self(value->to_identifier());
}
Vector<CSS::Transformation> StyleProperties::transformations() const
Vector<CSS::Transformation> StyleProperties::transformations_for_style_value(StyleValue const& value)
{
auto value = property(CSS::PropertyID::Transform);
if (value->is_identifier() && value->to_identifier() == CSS::ValueID::None)
if (value.is_identifier() && value.to_identifier() == CSS::ValueID::None)
return {};
if (!value->is_value_list())
if (!value.is_value_list())
return {};
auto& list = value->as_value_list();
auto& list = value.as_value_list();
Vector<CSS::Transformation> transformations;
@ -456,6 +454,11 @@ Vector<CSS::Transformation> StyleProperties::transformations() const
return transformations;
}
Vector<CSS::Transformation> StyleProperties::transformations() const
{
return transformations_for_style_value(property(CSS::PropertyID::Transform));
}
static Optional<LengthPercentage> length_percentage_for_style_value(StyleValue const& value)
{
if (value.is_length())