style: Simplify the skip item based display fixup adjustment.

In practice the only NAC that possibly inherits from a grid or flex container
are pseudos.

In Gecko, if the root element is an item container, custom anon content would
also sometimes incorrectly inherit from that (see bug 1405635), but that's fixed
in Stylo.

We remove the IS_ROOT_ELEMENT blockification from the "skip display fixup"
check, since the root element is never NAC or anything like that, so there's no
need for the check.

This also fixes some reparenting fishiness related to pseudo-elements. We were
only skipping the fixup when reparenting anon boxes, not when reparenting normal
element styles, nor when reparenting other pseudo styles which are not anon
boxes.
This commit is contained in:
Emilio Cobos Álvarez 2017-12-31 12:53:21 +01:00
parent ebff37b807
commit e464f5b020
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
7 changed files with 29 additions and 49 deletions

View file

@ -460,10 +460,6 @@ impl<'le> TElement for ServoLayoutElement<'le> {
}
}
fn skip_root_and_item_based_display_fixup(&self) -> bool {
false
}
unsafe fn set_selector_flags(&self, flags: ElementSelectorFlags) {
self.element.insert_selector_flags(flags);
}