mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-07 21:59:54 +00:00
LibWeb: Add transform-style and have it make a stacking context
This commit is contained in:
parent
c80b698589
commit
e064fa19d2
Notes:
github-actions[bot]
2025-11-12 14:48:50 +00:00
Author: https://github.com/Psychpsyo
Commit: e064fa19d2
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6793
Reviewed-by: https://github.com/gmta ✅
13 changed files with 89 additions and 3 deletions
|
|
@ -295,6 +295,13 @@ bool Node::establishes_stacking_context() const
|
|||
if (computed_values.perspective().has_value() || will_change_property(CSS::PropertyID::Perspective))
|
||||
return true;
|
||||
|
||||
// https://drafts.csswg.org/css-transforms-2/#transform-style-property
|
||||
// A computed value of 'preserve-3d' for 'transform-style' on a transformable element establishes both a
|
||||
// stacking context and a containing block for all descendants.
|
||||
// FIXME: Check that the element is a transformable element.
|
||||
if (computed_values.transform_style() == CSS::TransformStyle::Preserve3d || will_change_property(CSS::PropertyID::TransformStyle))
|
||||
return true;
|
||||
|
||||
return computed_values.opacity() < 1.0f || will_change_property(CSS::PropertyID::Opacity);
|
||||
}
|
||||
|
||||
|
|
@ -694,6 +701,7 @@ void NodeWithStyle::apply_style(CSS::ComputedProperties const& computed_style)
|
|||
computed_values.set_transform_box(computed_style.transform_box());
|
||||
computed_values.set_transform_origin(computed_style.transform_origin());
|
||||
computed_values.set_perspective(computed_style.perspective());
|
||||
computed_values.set_transform_style(computed_style.transform_style());
|
||||
|
||||
auto const& transition_delay_property = computed_style.property(CSS::PropertyID::TransitionDelay);
|
||||
if (transition_delay_property.is_time()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue