From adcd86deb23d72fc5aed11ca0324f16b9b51c19a Mon Sep 17 00:00:00 2001 From: Jeremy Chen Date: Wed, 30 Aug 2017 10:28:35 +0800 Subject: [PATCH] stylo: Do not skip parent display-based style fixups for NAC that is not a NAC root Stylo is currently skipping parent display-based style fixups for all NAC, whereas we probably only want to do this for NAC roots. In this patch, we ensure that we skip it for NAC roots, and pseudo-elements, but not other NAC. --- components/style/gecko/wrapper.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/components/style/gecko/wrapper.rs b/components/style/gecko/wrapper.rs index 7883d9dd891..de534fe6d8a 100644 --- a/components/style/gecko/wrapper.rs +++ b/components/style/gecko/wrapper.rs @@ -1171,7 +1171,9 @@ impl<'le> TElement for GeckoElement<'le> { // level native anonymous content subtree roots, since they're not // really roots from the style fixup perspective. Checking that we // are NAC handles both cases. - self.is_native_anonymous() + self.is_native_anonymous() && + (self.is_root_of_native_anonymous_subtree() || + self.implemented_pseudo_element().is_some()) } unsafe fn set_selector_flags(&self, flags: ElementSelectorFlags) {