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
This commit is contained in:
Timothy Guan-tin Chien 2018-11-15 06:51:07 +00:00 committed by Emilio Cobos Álvarez
parent dad9ad6b31
commit 3977854ee2
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C

View file

@ -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]