From 3977854ee28b580d6aeeb38fe949b3431e671f00 Mon Sep 17 00:00:00 2001 From: Timothy Guan-tin Chien Date: Thu, 15 Nov 2018 06:51:07 +0000 Subject: [PATCH] Remove dom.webcomponents.shadowdom.enabled. This patch removes the dom.webcomponents.shadowdom.enabled pref and all its references, including the following functions: * nsContentUtils::IsShadowDOMEnabled() * nsIDocument::IsShadowDOMEnabled() * nsDocument::IsShadowDOMEnabled(JSContext* aCx, JSObject* aGlobal) * nsDocument::IsShadowDOMEnabled(const nsINode* aNode) * nsTextNode::IsShadowDOMEnabled(JSContext* aCx, JSObject* aObject) This function is renamed and updated to nsDocument::IsCallerChromeOrAddon(): * nsDocument::IsShadowDOMEnabledAndCallerIsChromeOrAddon(JSContext* aCx, JSObject* aObject) I didn't change the tests that load Shadow DOM tests in an iframe, in the interest of keeping hg annotation history. Differential Revision: https://phabricator.services.mozilla.com/D11183 --- components/style/gecko/selector_parser.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/components/style/gecko/selector_parser.rs b/components/style/gecko/selector_parser.rs index b8fd780b716..039c069d2bb 100644 --- a/components/style/gecko/selector_parser.rs +++ b/components/style/gecko/selector_parser.rs @@ -347,10 +347,7 @@ impl<'a, 'i> ::selectors::Parser<'i> for SelectorParser<'a> { #[inline] fn parse_slotted(&self) -> bool { - // NOTE(emilio): Slot assignment and such works per-document, but - // getting a document around here is not trivial, and it's not worth - // anyway to handle this in a per-doc basis. - unsafe { structs::nsContentUtils_sIsShadowDOMEnabled } + true } #[inline]