mirror of
https://github.com/servo/servo.git
synced 2025-08-02 12:10:29 +01:00
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>
This commit is contained in:
parent
205b97d5ed
commit
f93006af95
33 changed files with 233 additions and 114 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue