LibWeb: Support individual scale CSS property

This commit is contained in:
Andreas Kling 2024-11-22 18:07:16 +01:00 committed by Andreas Kling
commit 9a7c9286c4
Notes: github-actions[bot] 2024-11-22 19:07:43 +00:00
21 changed files with 234 additions and 55 deletions

View file

@ -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());