mirror of
https://github.com/servo/servo.git
synced 2025-08-07 14:35:33 +01:00
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:
parent
ebff37b807
commit
e464f5b020
7 changed files with 29 additions and 49 deletions
|
@ -670,11 +670,6 @@ pub trait TElement
|
|||
self.get_data().map(|x| x.borrow_mut())
|
||||
}
|
||||
|
||||
/// Whether we should skip any root- or item-based display property
|
||||
/// blockification on this element. (This function exists so that Gecko
|
||||
/// native anonymous content can opt out of this style fixup.)
|
||||
fn skip_root_and_item_based_display_fixup(&self) -> bool;
|
||||
|
||||
/// Sets selector flags, which indicate what kinds of selectors may have
|
||||
/// matched on this element and therefore what kind of work may need to
|
||||
/// be performed when DOM state changes.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue