mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 20:29:18 +00:00
LibWeb: Support individual translate
CSS property
This commit is contained in:
parent
6836d4edb1
commit
66a821e731
Notes:
github-actions[bot]
2024-11-22 19:07:48 +00:00
Author: https://github.com/awesomekling
Commit: 66a821e731
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2506
Reviewed-by: https://github.com/shannonbooth
22 changed files with 267 additions and 80 deletions
|
@ -82,6 +82,8 @@ bool Node::can_contain_boxes_with_position_absolute() const
|
|||
// Any computed value other than none for the transform affects containing block and stacking context
|
||||
if (!computed_values().transformations().is_empty())
|
||||
return true;
|
||||
if (computed_values().translate().has_value())
|
||||
return true;
|
||||
if (computed_values().rotate().has_value())
|
||||
return true;
|
||||
|
||||
|
@ -177,6 +179,9 @@ bool Node::establishes_stacking_context() const
|
|||
if (!computed_values().transformations().is_empty())
|
||||
return true;
|
||||
|
||||
if (computed_values().translate().has_value())
|
||||
return true;
|
||||
|
||||
if (computed_values().rotate().has_value())
|
||||
return true;
|
||||
|
||||
|
@ -717,6 +722,9 @@ void NodeWithStyle::apply_style(const CSS::StyleProperties& computed_style)
|
|||
if (auto rotate_value = computed_style.rotate(*this); rotate_value.has_value())
|
||||
computed_values.set_rotate(rotate_value.release_value());
|
||||
|
||||
if (auto translate_value = computed_style.translate(); translate_value.has_value())
|
||||
computed_values.set_translate(translate_value.release_value());
|
||||
|
||||
computed_values.set_transformations(computed_style.transformations());
|
||||
if (auto transform_box = computed_style.transform_box(); transform_box.has_value())
|
||||
computed_values.set_transform_box(transform_box.value());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue