aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout_2020/fragment_tree/base_fragment.rs
diff options
context:
space:
mode:
authorOriol Brufau <obrufau@igalia.com>2025-03-13 07:49:08 +0100
committerGitHub <noreply@github.com>2025-03-13 06:49:08 +0000
commitf93006af95dd75a07de2571e6a2edabcc64a46ac (patch)
tree2e356bbe166bf7f918c295c01aebde9ad3e5759e /components/layout_2020/fragment_tree/base_fragment.rs
parent205b97d5edbca6f24b189b564ec5f7129ba40228 (diff)
downloadservo-f93006af95dd75a07de2571e6a2edabcc64a46ac.tar.gz
servo-f93006af95dd75a07de2571e6a2edabcc64a46ac.zip
Improve logic for establishing a stacking context (#35947)
In particular: - `z-index` will now work on unpositioned grid items. - `will-change: z-index` will only establish a stacking context if `z-index` applies, i.e. if the box is positioned or a flex/grid item. - The conditions in `establishes_stacking_context()` are reordered, so that the most likely ones are checked first. Signed-off-by: Oriol Brufau <obrufau@igalia.com>
Diffstat (limited to 'components/layout_2020/fragment_tree/base_fragment.rs')
-rw-r--r--components/layout_2020/fragment_tree/base_fragment.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/components/layout_2020/fragment_tree/base_fragment.rs b/components/layout_2020/fragment_tree/base_fragment.rs
index 39d06ca121a..38f4f6ba815 100644
--- a/components/layout_2020/fragment_tree/base_fragment.rs
+++ b/components/layout_2020/fragment_tree/base_fragment.rs
@@ -80,8 +80,8 @@ bitflags! {
const IS_BODY_ELEMENT_OF_HTML_ELEMENT_ROOT = 1 << 0;
/// Whether or not the node that created this Fragment is a `<br>` element.
const IS_BR_ELEMENT = 1 << 1;
- /// Whether or not this Fragment is a flex item.
- const IS_FLEX_ITEM = 1 << 2;
+ /// Whether or not this Fragment is a flex item or a grid item.
+ const IS_FLEX_OR_GRID_ITEM = 1 << 2;
/// Whether or not this Fragment was created to contain a replaced element or is
/// a replaced element.
const IS_REPLACED = 1 << 3;