mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 11:49:44 +00:00
LibWeb: Implement CSS 'isolation' property
This commit is contained in:
parent
4e1aa96dce
commit
7757df5bb5
Notes:
github-actions[bot]
2025-01-13 11:08:57 +00:00
Author: https://github.com/Psychpsyo
Commit: 7757df5bb5
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3221
Reviewed-by: https://github.com/AtkinsSJ ✅
11 changed files with 134 additions and 73 deletions
|
@ -218,6 +218,11 @@ bool Node::establishes_stacking_context() const
|
|||
if (computed_values().mask().has_value() || computed_values().clip_path().has_value() || computed_values().mask_image())
|
||||
return true;
|
||||
|
||||
// https://drafts.fxtf.org/compositing/#propdef-isolation
|
||||
// For CSS, setting isolation to isolate will turn the element into a stacking context.
|
||||
if (computed_values().isolation() == CSS::Isolation::Isolate)
|
||||
return true;
|
||||
|
||||
return computed_values().opacity() < 1.0f;
|
||||
}
|
||||
|
||||
|
@ -1008,6 +1013,9 @@ void NodeWithStyle::apply_style(const CSS::ComputedProperties& computed_style)
|
|||
if (auto user_select = computed_style.user_select(); user_select.has_value())
|
||||
computed_values.set_user_select(user_select.value());
|
||||
|
||||
if (auto isolation = computed_style.isolation(); isolation.has_value())
|
||||
computed_values.set_isolation(isolation.value());
|
||||
|
||||
propagate_style_to_anonymous_wrappers();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue