mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-19 15:32:31 +00:00
LibWeb: Support parsing and serializing 3D translate values
This commit is contained in:
parent
d804f1311c
commit
27baaa13e9
Notes:
github-actions[bot]
2025-04-30 17:37:57 +00:00
Author: https://github.com/tcl3
Commit: 27baaa13e9
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4528
5 changed files with 109 additions and 98 deletions
|
@ -3878,8 +3878,17 @@ RefPtr<CSSStyleValue const> Parser::parse_translate_value(TokenStream<ComponentV
|
|||
if (!maybe_y)
|
||||
return nullptr;
|
||||
|
||||
if (!tokens.has_next_token()) {
|
||||
transaction.commit();
|
||||
return TransformationStyleValue::create(PropertyID::Translate, TransformFunction::Translate, { maybe_x.release_nonnull(), maybe_y.release_nonnull() });
|
||||
}
|
||||
|
||||
auto maybe_z = parse_length_value(tokens);
|
||||
if (!maybe_z)
|
||||
return nullptr;
|
||||
|
||||
transaction.commit();
|
||||
return TransformationStyleValue::create(PropertyID::Translate, TransformFunction::Translate, { maybe_x.release_nonnull(), maybe_y.release_nonnull() });
|
||||
return TransformationStyleValue::create(PropertyID::Translate, TransformFunction::Translate3d, { maybe_x.release_nonnull(), maybe_y.release_nonnull(), maybe_z.release_nonnull() });
|
||||
}
|
||||
|
||||
RefPtr<CSSStyleValue const> Parser::parse_scale_value(TokenStream<ComponentValue>& tokens)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue