зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1460940 - Remove nsIDOMDocument uses in netwerk/. r=bz
MozReview-Commit-ID: QkZ36LGoBx --HG-- extra : rebase_source : 5aa83c576f269a6f33a1fb7ea7a61bd63a3c0c25
This commit is contained in:
Родитель
8a6d4efe5d
Коммит
af5b239997
|
@ -10607,9 +10607,8 @@ nsContentUtils::GetEventTargetByLoadInfo(nsILoadInfo* aLoadInfo, TaskCategory aC
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIDOMDocument> domDoc;
|
||||
aLoadInfo->GetLoadingDocument(getter_AddRefs(domDoc));
|
||||
nsCOMPtr<nsIDocument> doc = do_QueryInterface(domDoc);
|
||||
nsCOMPtr<nsIDocument> doc;
|
||||
aLoadInfo->GetLoadingDocument(getter_AddRefs(doc));
|
||||
nsCOMPtr<nsISerialEventTarget> target;
|
||||
if (doc) {
|
||||
if (DocGroup* group = doc->GetDocGroup()) {
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
#include "nsIContentSecurityPolicy.h"
|
||||
#include "nsIDocShell.h"
|
||||
#include "nsIDocument.h"
|
||||
#include "nsIDOMDocument.h"
|
||||
#include "nsIFrameLoaderOwner.h"
|
||||
#include "nsIInterfaceRequestorUtils.h"
|
||||
#include "nsISupportsImpl.h"
|
||||
|
@ -626,11 +625,11 @@ LoadInfo::GetSandboxedLoadingPrincipal(nsIPrincipal** aPrincipal)
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
LoadInfo::GetLoadingDocument(nsIDOMDocument** aResult)
|
||||
LoadInfo::GetLoadingDocument(nsIDocument** aResult)
|
||||
{
|
||||
nsCOMPtr<nsINode> node = do_QueryReferent(mLoadingContext);
|
||||
if (node) {
|
||||
nsCOMPtr<nsIDOMDocument> context = do_QueryInterface(node->OwnerDoc());
|
||||
nsCOMPtr<nsIDocument> context = node->OwnerDoc();
|
||||
context.forget(aResult);
|
||||
}
|
||||
return NS_OK;
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
#include "nsIClassOfService.h"
|
||||
#include "nsIDocShell.h"
|
||||
#include "nsIDocument.h"
|
||||
#include "nsIDOMDocument.h"
|
||||
#include "nsIHttpChannel.h"
|
||||
#include "nsIHttpChannelInternal.h"
|
||||
#include "nsIIOService.h"
|
||||
|
|
|
@ -8,11 +8,11 @@
|
|||
#include "nsIContentPolicy.idl"
|
||||
|
||||
interface nsIChannel;
|
||||
interface nsIDOMDocument;
|
||||
interface nsINode;
|
||||
interface nsIPrincipal;
|
||||
interface nsIRedirectHistoryEntry;
|
||||
interface nsIURI;
|
||||
webidl Document;
|
||||
native LoadContextRef(already_AddRefed<nsISupports>);
|
||||
%{C++
|
||||
#include "nsTArray.h"
|
||||
|
@ -336,7 +336,7 @@ interface nsILoadInfo : nsISupports
|
|||
* LoadingDocument is null. When the LoadingDocument is not null, the
|
||||
* LoadingPrincipal is set to the principal of the LoadingDocument.
|
||||
*/
|
||||
readonly attribute nsIDOMDocument loadingDocument;
|
||||
readonly attribute Document loadingDocument;
|
||||
|
||||
/**
|
||||
* A C++-friendly version of loadingDocument (loadingNode).
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
#include "nsReadableUtils.h"
|
||||
|
||||
#include "nsICachingChannel.h"
|
||||
#include "nsIDOMDocument.h"
|
||||
#include "nsIPrincipal.h"
|
||||
#include "nsIScriptError.h"
|
||||
#include "nsISeekableStream.h"
|
||||
|
@ -3360,9 +3359,8 @@ HttpBaseChannel::DoNotifyListener()
|
|||
if (mLoadGroup) {
|
||||
FlushConsoleReports(mLoadGroup);
|
||||
} else if (mLoadInfo) {
|
||||
nsCOMPtr<nsIDOMDocument> dommyDoc;
|
||||
mLoadInfo->GetLoadingDocument(getter_AddRefs(dommyDoc));
|
||||
nsCOMPtr<nsIDocument> doc = do_QueryInterface(dommyDoc);
|
||||
nsCOMPtr<nsIDocument> doc;
|
||||
mLoadInfo->GetLoadingDocument(getter_AddRefs(doc));
|
||||
FlushConsoleReports(doc);
|
||||
}
|
||||
}
|
||||
|
@ -4244,13 +4242,8 @@ HttpBaseChannel::GetPerformanceStorage()
|
|||
return performanceStorage;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIDOMDocument> domDocument;
|
||||
mLoadInfo->GetLoadingDocument(getter_AddRefs(domDocument));
|
||||
if (!domDocument) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIDocument> loadingDocument = do_QueryInterface(domDocument);
|
||||
nsCOMPtr<nsIDocument> loadingDocument;
|
||||
mLoadInfo->GetLoadingDocument(getter_AddRefs(loadingDocument));
|
||||
if (!loadingDocument) {
|
||||
return nullptr;
|
||||
}
|
||||
|
|
|
@ -50,7 +50,6 @@
|
|||
#include "nsIDeprecationWarner.h"
|
||||
#include "nsICompressConvStats.h"
|
||||
#include "nsIDocument.h"
|
||||
#include "nsIDOMDocument.h"
|
||||
#include "nsIDOMWindowUtils.h"
|
||||
#include "nsIEventTarget.h"
|
||||
#include "nsRedirectHistoryEntry.h"
|
||||
|
|
|
@ -96,7 +96,6 @@
|
|||
#include "NullPrincipal.h"
|
||||
#include "nsIDeprecationWarner.h"
|
||||
#include "nsIDocument.h"
|
||||
#include "nsIDOMDocument.h"
|
||||
#include "nsICompressConvStats.h"
|
||||
#include "nsCORSListenerProxy.h"
|
||||
#include "nsISocketProvider.h"
|
||||
|
@ -1236,11 +1235,7 @@ ReportTypeBlocking(nsIURI* aURI,
|
|||
const char16_t* params[] = { specUTF16.get() };
|
||||
nsCOMPtr<nsIDocument> doc;
|
||||
if (aLoadInfo) {
|
||||
nsCOMPtr<nsIDOMDocument> domDoc;
|
||||
aLoadInfo->GetLoadingDocument(getter_AddRefs(domDoc));
|
||||
if (domDoc) {
|
||||
doc = do_QueryInterface(domDoc);
|
||||
}
|
||||
aLoadInfo->GetLoadingDocument(getter_AddRefs(doc));
|
||||
}
|
||||
nsContentUtils::ReportToConsole(nsIScriptError::errorFlag,
|
||||
NS_LITERAL_CSTRING("MIMEMISMATCH"),
|
||||
|
@ -1287,11 +1282,7 @@ ProcessXCTO(nsIURI* aURI, nsHttpResponseHead* aResponseHead, nsILoadInfo* aLoadI
|
|||
NS_ConvertUTF8toUTF16 char16_header(contentTypeOptionsHeader);
|
||||
const char16_t* params[] = { char16_header.get() };
|
||||
nsCOMPtr<nsIDocument> doc;
|
||||
nsCOMPtr<nsIDOMDocument> domDoc;
|
||||
aLoadInfo->GetLoadingDocument(getter_AddRefs(domDoc));
|
||||
if (domDoc) {
|
||||
doc = do_QueryInterface(domDoc);
|
||||
}
|
||||
aLoadInfo->GetLoadingDocument(getter_AddRefs(doc));
|
||||
nsContentUtils::ReportToConsole(nsIScriptError::warningFlag,
|
||||
NS_LITERAL_CSTRING("XCTO"),
|
||||
doc,
|
||||
|
|
Загрузка…
Ссылка в новой задаче