mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 05:57:44 +00:00
LibWeb: Establish stacking context when backdrop-filter is not 'none'
This commit is contained in:
parent
6b50425013
commit
8ace6b4f1d
2 changed files with 8 additions and 0 deletions
|
@ -29,6 +29,7 @@
|
||||||
},
|
},
|
||||||
"backdrop-filter": {
|
"backdrop-filter": {
|
||||||
"affects-layout": false,
|
"affects-layout": false,
|
||||||
|
"affects-stacking-context": true,
|
||||||
"inherited": false,
|
"inherited": false,
|
||||||
"initial": "none",
|
"initial": "none",
|
||||||
"valid-types": [
|
"valid-types": [
|
||||||
|
|
|
@ -117,6 +117,13 @@ bool Node::establishes_stacking_context() const
|
||||||
if (parent() && parent()->display().is_grid_inside() && computed_values().z_index().has_value())
|
if (parent() && parent()->display().is_grid_inside() && computed_values().z_index().has_value())
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
// https://drafts.fxtf.org/filter-effects-2/#backdrop-filter-operation
|
||||||
|
// A computed value of other than none results in the creation of both a stacking context [CSS21] and a Containing Block for absolute and fixed position descendants,
|
||||||
|
// unless the element it applies to is a document root element in the current browsing context.
|
||||||
|
// Spec Note: This rule works in the same way as for the filter property.
|
||||||
|
if (!computed_values().backdrop_filter().is_none())
|
||||||
|
return true;
|
||||||
|
|
||||||
return computed_values().opacity() < 1.0f;
|
return computed_values().opacity() < 1.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue