Loading dom/base/Document.cpp +5 −0 Original line number Diff line number Diff line Loading @@ -1332,6 +1332,7 @@ Document::Document(const char* aContentType) mMayNeedFontPrefsUpdate(true), mMathMLEnabled(false), mIsInitialDocumentInWindow(false), mIsEverInitialDocumentInWindow(false), mIgnoreDocGroupMismatches(false), mLoadedAsData(false), mAddedToMemoryReportingAsDataDocument(false), Loading Loading @@ -18377,6 +18378,10 @@ nsIPrincipal* Document::GetPrincipalForPrefBasedHacks() const { void Document::SetIsInitialDocument(bool aIsInitialDocument) { mIsInitialDocumentInWindow = aIsInitialDocument; if (aIsInitialDocument && !mIsEverInitialDocumentInWindow) { mIsEverInitialDocumentInWindow = aIsInitialDocument; } // Asynchronously tell the parent process that we are, or are no longer, the // initial document. This happens async. if (auto* wgc = GetWindowGlobalChild()) { dom/base/Document.h +11 −0 Original line number Diff line number Diff line Loading @@ -1040,6 +1040,12 @@ class Document : public nsINode, */ bool IsInitialDocument() const { return mIsInitialDocumentInWindow; } /** * Ask this document whether it has ever been a initial document in its * window. */ bool IsEverInitialDocument() const { return mIsEverInitialDocumentInWindow; } /** * Tell this document that it's the initial document in its window. See * comments on mIsInitialDocumentInWindow for when this should be called. Loading Loading @@ -4654,6 +4660,11 @@ class Document : public nsINode, // document in it. bool mIsInitialDocumentInWindow : 1; // True if this document has ever been the initial document for a window. This // is useful to determine if a document that was the initial document at one // point, and became non-initial later. bool mIsEverInitialDocumentInWindow : 1; bool mIgnoreDocGroupMismatches : 1; // True if we're loaded as data and therefor has any dangerous stuff, such Loading layout/base/nsPresContext.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -1228,7 +1228,7 @@ bool nsPresContext::UserInputEventsAllowed() { } // Special document if (Document()->IsInitialDocument()) { if (Document()->IsEverInitialDocument()) { return true; } Loading Loading
dom/base/Document.cpp +5 −0 Original line number Diff line number Diff line Loading @@ -1332,6 +1332,7 @@ Document::Document(const char* aContentType) mMayNeedFontPrefsUpdate(true), mMathMLEnabled(false), mIsInitialDocumentInWindow(false), mIsEverInitialDocumentInWindow(false), mIgnoreDocGroupMismatches(false), mLoadedAsData(false), mAddedToMemoryReportingAsDataDocument(false), Loading Loading @@ -18377,6 +18378,10 @@ nsIPrincipal* Document::GetPrincipalForPrefBasedHacks() const { void Document::SetIsInitialDocument(bool aIsInitialDocument) { mIsInitialDocumentInWindow = aIsInitialDocument; if (aIsInitialDocument && !mIsEverInitialDocumentInWindow) { mIsEverInitialDocumentInWindow = aIsInitialDocument; } // Asynchronously tell the parent process that we are, or are no longer, the // initial document. This happens async. if (auto* wgc = GetWindowGlobalChild()) {
dom/base/Document.h +11 −0 Original line number Diff line number Diff line Loading @@ -1040,6 +1040,12 @@ class Document : public nsINode, */ bool IsInitialDocument() const { return mIsInitialDocumentInWindow; } /** * Ask this document whether it has ever been a initial document in its * window. */ bool IsEverInitialDocument() const { return mIsEverInitialDocumentInWindow; } /** * Tell this document that it's the initial document in its window. See * comments on mIsInitialDocumentInWindow for when this should be called. Loading Loading @@ -4654,6 +4660,11 @@ class Document : public nsINode, // document in it. bool mIsInitialDocumentInWindow : 1; // True if this document has ever been the initial document for a window. This // is useful to determine if a document that was the initial document at one // point, and became non-initial later. bool mIsEverInitialDocumentInWindow : 1; bool mIgnoreDocGroupMismatches : 1; // True if we're loaded as data and therefor has any dangerous stuff, such Loading
layout/base/nsPresContext.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -1228,7 +1228,7 @@ bool nsPresContext::UserInputEventsAllowed() { } // Special document if (Document()->IsInitialDocument()) { if (Document()->IsEverInitialDocument()) { return true; } Loading