mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 20:29:18 +00:00
LibWeb: Support individual scale
CSS property
This commit is contained in:
parent
66a821e731
commit
9a7c9286c4
Notes:
github-actions[bot]
2024-11-22 19:07:43 +00:00
Author: https://github.com/awesomekling
Commit: 9a7c9286c4
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2506
Reviewed-by: https://github.com/shannonbooth
21 changed files with 234 additions and 55 deletions
|
@ -86,6 +86,8 @@ bool Node::can_contain_boxes_with_position_absolute() const
|
|||
return true;
|
||||
if (computed_values().rotate().has_value())
|
||||
return true;
|
||||
if (computed_values().scale().has_value())
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
@ -185,6 +187,9 @@ bool Node::establishes_stacking_context() const
|
|||
if (computed_values().rotate().has_value())
|
||||
return true;
|
||||
|
||||
if (computed_values().scale().has_value())
|
||||
return true;
|
||||
|
||||
// Element that is a child of a flex container, with z-index value other than auto.
|
||||
if (parent() && parent()->display().is_flex_inside() && computed_values().z_index().has_value())
|
||||
return true;
|
||||
|
@ -725,6 +730,9 @@ void NodeWithStyle::apply_style(const CSS::StyleProperties& computed_style)
|
|||
if (auto translate_value = computed_style.translate(); translate_value.has_value())
|
||||
computed_values.set_translate(translate_value.release_value());
|
||||
|
||||
if (auto scale_value = computed_style.scale(); scale_value.has_value())
|
||||
computed_values.set_scale(scale_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