Skip to content
Snippets Groups Projects
Commit cbc2dccd authored by Cameron McCormack's avatar Cameron McCormack
Browse files

servo: Merge #17982 - style: Don't perform parent display-based style fixups...

servo: Merge #17982 - style: Don't perform parent display-based style fixups on most pseudos (from heycam:parent-fixup); r=emilio

Reviewed by Emilio in https://bugzilla.mozilla.org/show_bug.cgi?id=1379865.

Source-Repo: https://github.com/servo/servo
Source-Revision: 586f84f5fea9a15c90dc5bc5415e2c5f5caa3ddb

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 2bc4a44859b0b32200c2816c0a4ffbfeb2eebcde
parent b7431c3f
No related branches found
No related tags found
No related merge requests found
......@@ -115,6 +115,13 @@ impl PseudoElement {
(self.flags() & structs::CSS_PSEUDO_ELEMENT_SUPPORTS_USER_ACTION_STATE) != 0
}
/// Whether this pseudo-element skips flex/grid container display-based
/// fixup.
#[inline]
pub fn skip_item_based_display_fixup(&self) -> bool {
(self.flags() & structs::CSS_PSEUDO_ELEMENT_IS_FLEX_OR_GRID_ITEM) == 0
}
/// Whether this pseudo-element is precomputed.
#[inline]
pub fn is_precomputed(&self) -> bool {
......
......@@ -150,6 +150,13 @@ impl PseudoElement {
self.is_precomputed()
}
/// Whether this pseudo-element skips flex/grid container
/// display-based fixup.
#[inline]
pub fn skip_item_based_display_fixup(&self) -> bool {
!self.is_before_or_after()
}
/// Whether this pseudo-element is precomputed.
#[inline]
pub fn is_precomputed(&self) -> bool {
......
......@@ -442,7 +442,8 @@ where
let mut cascade_info = CascadeInfo::new();
let mut cascade_flags = CascadeFlags::empty();
if self.element.skip_root_and_item_based_display_fixup() {
if self.element.skip_root_and_item_based_display_fixup() ||
pseudo.map_or(false, |p| p.skip_item_based_display_fixup()) {
cascade_flags.insert(SKIP_ROOT_AND_ITEM_BASED_DISPLAY_FIXUP);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment