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:
parent
903d3c92c8
commit
be7538961b
Notes:
sideshowbarker
2024-07-17 05:13:53 +09:00
Author: https://github.com/bplaat
Commit: be7538961b
Pull-request: https://github.com/SerenityOS/serenity/pull/22616
Reviewed-by: https://github.com/shannonbooth ✅
Reviewed-by: https://github.com/trflynn89
15 changed files with 336 additions and 120 deletions
|
@ -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())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue