From a7e45bba63e7d34ee52e450944d6f43b41534139 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Mon, 7 Aug 2017 16:57:23 +0200 Subject: [PATCH] stylo: Fix skip_root_and_item_display_fixup. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The check isn't doing what the comment is saying. XBL subtrees for video controls all have the NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE flag, but not all of them are NAC themselves, so we may incorrectly miss blockification. Bug: 1366163 Reviewed-by: heycam MozReview-Commit-ID: Oq3W258Lz2 Signed-off-by: Emilio Cobos Álvarez --- components/style/gecko/wrapper.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/components/style/gecko/wrapper.rs b/components/style/gecko/wrapper.rs index 6d62f54951c..b3cd83ea3df 100644 --- a/components/style/gecko/wrapper.rs +++ b/components/style/gecko/wrapper.rs @@ -238,7 +238,6 @@ impl<'ln> GeckoNode<'ln> { /// This logic is duplicated in Gecko's nsIContent::IsInAnonymousSubtree. #[inline] fn is_in_anonymous_subtree(&self) -> bool { - use gecko_bindings::structs::NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE; use gecko_bindings::structs::NODE_IS_IN_SHADOW_TREE; self.flags() & (NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE as u32) != 0 || ((self.flags() & (NODE_IS_IN_SHADOW_TREE as u32) == 0) && @@ -1144,7 +1143,7 @@ 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.flags() & (NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE as u32) != 0 + self.is_native_anonymous() } unsafe fn set_selector_flags(&self, flags: ElementSelectorFlags) {