diff options
Diffstat (limited to 'dom/base/nsDocument.cpp')
-rw-r--r-- | dom/base/nsDocument.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/dom/base/nsDocument.cpp b/dom/base/nsDocument.cpp index d69fff863..459ad6bdd 100644 --- a/dom/base/nsDocument.cpp +++ b/dom/base/nsDocument.cpp @@ -1332,6 +1332,10 @@ nsIDocument::nsIDocument() { SetIsInDocument(); + // Set this when document is created and value stays the same for the lifetime + // of the document. + mIsWebComponentsEnabled = nsContentUtils::IsWebComponentsEnabled(); + PR_INIT_CLIST(&mDOMMediaQueryLists); } @@ -5686,6 +5690,12 @@ nsDocument::IsWebComponentsEnabled(JSContext* aCx, JSObject* aObject) } bool +nsDocument::IsWebComponentsEnabled(const nsINode* aNode) +{ + return aNode->OwnerDoc()->IsWebComponentsEnabled(); +} + +bool nsDocument::IsWebComponentsEnabled(dom::NodeInfo* aNodeInfo) { if (nsContentUtils::IsWebComponentsEnabled()) { |