mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-02 14:19:48 +00:00
LibWeb/CSS: Add math expression support for transform-origin
This commit is contained in:
parent
3406b69614
commit
85356094b5
Notes:
github-actions[bot]
2024-10-27 09:35:38 +00:00
Author: https://github.com/ankushChatterjee 🔰
Commit: 85356094b5
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1934
3 changed files with 7 additions and 2 deletions
|
@ -6929,6 +6929,9 @@ RefPtr<CSSStyleValue> Parser::parse_transform_origin_value(TokenStream<Component
|
|||
return OptionalNone {};
|
||||
}
|
||||
}
|
||||
if (value->is_math()) {
|
||||
return AxisOffset { Axis::None, value->as_math() };
|
||||
}
|
||||
return OptionalNone {};
|
||||
};
|
||||
|
||||
|
|
|
@ -534,6 +534,8 @@ static Optional<LengthPercentage> length_percentage_for_style_value(CSSStyleValu
|
|||
return value.as_length().length();
|
||||
if (value.is_percentage())
|
||||
return value.as_percentage().percentage();
|
||||
if (value.is_math())
|
||||
return LengthPercentage { const_cast<CSSMathValue&>(value.as_math()) };
|
||||
return {};
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue