Bug 1446568: Move a couple more stuff from nsDocument to nsIDocument. r=smaug

MozReview-Commit-ID: JC2nqzJEq7U
This commit is contained in:
Emilio Cobos Álvarez 2018-03-15 19:30:15 +01:00
Родитель 52742250dd
Коммит 1bbc934001
3 изменённых файлов: 14 добавлений и 13 удалений

Просмотреть файл

@ -2244,7 +2244,7 @@ nsIDocument::IsVisibleConsideringAncestors() const
}
void
nsDocument::Reset(nsIChannel* aChannel, nsILoadGroup* aLoadGroup)
nsIDocument::Reset(nsIChannel* aChannel, nsILoadGroup* aLoadGroup)
{
nsCOMPtr<nsIURI> uri;
nsCOMPtr<nsIPrincipal> principal;
@ -2448,7 +2448,7 @@ nsIDocument::ResetToURI(nsIURI* aURI,
}
already_AddRefed<nsIPrincipal>
nsDocument::MaybeDowngradePrincipal(nsIPrincipal* aPrincipal)
nsIDocument::MaybeDowngradePrincipal(nsIPrincipal* aPrincipal)
{
if (!aPrincipal) {
return nullptr;
@ -2865,7 +2865,7 @@ nsDocument::StartDocumentLoad(const char* aCommand, nsIChannel* aChannel,
}
void
nsDocument::SendToConsole(nsCOMArray<nsISecurityConsoleMessage>& aMessages)
nsIDocument::SendToConsole(nsCOMArray<nsISecurityConsoleMessage>& aMessages)
{
for (uint32_t i = 0; i < aMessages.Length(); ++i) {
nsAutoString messageTag;
@ -5124,7 +5124,7 @@ nsIDocument::RemoveObserver(nsIDocumentObserver* aObserver)
}
void
nsDocument::MaybeEndOutermostXBLUpdate()
nsIDocument::MaybeEndOutermostXBLUpdate()
{
// Only call BindingManager()->EndOutermostUpdate() when
// we're not in an update and it is safe to run scripts.
@ -8373,7 +8373,7 @@ nsIDocument::GetLayoutHistoryState() const
}
void
nsDocument::EnsureOnloadBlocker()
nsIDocument::EnsureOnloadBlocker()
{
// If mScriptGlobalObject is null, we shouldn't be messing with the loadgroup
// -- it's not ours.

Просмотреть файл

@ -149,8 +149,6 @@ public:
NS_DECL_ADDSIZEOFEXCLUDINGTHIS
already_AddRefed<nsIPrincipal> MaybeDowngradePrincipal(nsIPrincipal* aPrincipal);
// StartDocumentLoad is pure virtual so that subclasses must override it.
// The nsDocument StartDocumentLoad does some setup, but does NOT set
// *aDocListener; this is the job of subclasses.
@ -242,8 +240,6 @@ public:
static bool IsShadowDOMEnabled(JSContext* aCx, JSObject* aObject);
// Check whether shadow DOM is enabled for the document this node belongs to.
static bool IsShadowDOMEnabled(const nsINode* aNode);
private:
void SendToConsole(nsCOMArray<nsISecurityConsoleMessage>& aMessages);
public:
// nsIDOMDocument
@ -287,8 +283,6 @@ public:
nsresult CloneDocHelper(nsDocument* clone, bool aPreallocateChildren) const;
void MaybeEndOutermostXBLUpdate();
// Only BlockOnload should call this!
void AsyncBlockOnload();
@ -327,8 +321,6 @@ protected:
explicit nsDocument(const char* aContentType);
virtual ~nsDocument();
void EnsureOnloadBlocker();
public:
// FIXME(emilio): This needs to be here instead of in nsIDocument because Rust
// can't represent alignas(8) values on 32-bit architectures, which would

Просмотреть файл

@ -105,6 +105,7 @@ class nsIObserver;
class nsIPrincipal;
class nsIRequest;
class nsIRunnable;
class nsISecurityConsoleMessage;
class nsIStreamListener;
class nsIStructuredCloneContainer;
class nsIURI;
@ -1430,6 +1431,8 @@ public:
already_AddRefed<nsSimpleContentList> BlockedTrackingNodes() const;
protected:
void MaybeEndOutermostXBLUpdate();
void DispatchContentLoadedEvents();
void DispatchPageTransition(mozilla::dom::EventTarget* aDispatchTarget,
@ -3657,6 +3660,12 @@ public:
nsIContent* GetContentInThisDocument(nsIFrame* aFrame) const;
protected:
already_AddRefed<nsIPrincipal> MaybeDowngradePrincipal(nsIPrincipal* aPrincipal);
void EnsureOnloadBlocker();
void SendToConsole(nsCOMArray<nsISecurityConsoleMessage>& aMessages);
// Returns true if the scheme for the url for this document is "about".
bool IsAboutPage() const;