Merge mozilla-central to inbound. a=merge CLOSED TREE

This commit is contained in:
Narcis Beleuzu 2018-05-15 00:41:06 +03:00
commit d7f7ec03a3
151 changed files with 283 additions and 508 deletions

View File

@ -26,7 +26,6 @@
#include "nsCURILoader.h"
#include "nsDocShellLoadTypes.h"
#include "nsIChannel.h"
#include "nsIDOMDocument.h"
#include "nsIInterfaceRequestorUtils.h"
#include "nsIWebNavigation.h"
#include "nsServiceManagerUtils.h"

View File

@ -14,7 +14,6 @@
#include "States.h"
#include "nsIComponentManager.h"
#include "nsIDOMDocument.h"
#include "nsIWindowMediator.h"
#include "nsServiceManagerUtils.h"
#include "mozilla/Services.h"

View File

@ -23,7 +23,6 @@
#include "nsICommandManager.h"
#include "nsIDocShell.h"
#include "nsIDocument.h"
#include "nsIDOMDocument.h"
#include "nsPIDOMWindow.h"
#include "nsIEditingSession.h"
#include "nsIFrame.h"

View File

@ -8,7 +8,6 @@
#include "mozilla/ArrayUtils.h"
#define CreateEvent CreateEventA
#include "nsIDOMDocument.h"
#include "Accessible-inl.h"
#include "DocAccessible-inl.h"

View File

@ -6,9 +6,10 @@
#include "nsISupports.idl"
interface nsIAccessiblePivot;
interface nsIDOMDocument;
interface mozIDOMWindowProxy;
webidl Document;
/**
* An interface for in-process accessibility clients
* that wish to retrieve information about a document.
@ -43,9 +44,9 @@ interface nsIAccessibleDocument : nsISupports
readonly attribute AString docType;
/**
* The nsIDOMDocument interface associated with this document.
* The Document interface associated with this document.
*/
readonly attribute nsIDOMDocument DOMDocument;
readonly attribute Document DOMDocument;
/**
* The nsIDOMWindow that the document resides in.

View File

@ -11,7 +11,6 @@
#include "mozilla/a11y/DocAccessibleParent.h"
#include "DocAccessible-inl.h"
#include "nsIDOMDocument.h"
using namespace mozilla;
using namespace mozilla::a11y;
@ -86,7 +85,7 @@ xpcAccessibleDocument::GetDocType(nsAString& aType)
}
NS_IMETHODIMP
xpcAccessibleDocument::GetDOMDocument(nsIDOMDocument** aDOMDocument)
xpcAccessibleDocument::GetDOMDocument(nsIDocument** aDOMDocument)
{
NS_ENSURE_ARG_POINTER(aDOMDocument);
*aDOMDocument = nullptr;
@ -95,7 +94,7 @@ xpcAccessibleDocument::GetDOMDocument(nsIDOMDocument** aDOMDocument)
return NS_ERROR_FAILURE;
if (Intl()->DocumentNode())
CallQueryInterface(Intl()->DocumentNode(), aDOMDocument);
NS_ADDREF(*aDOMDocument = Intl()->DocumentNode());
return NS_OK;
}

View File

@ -38,7 +38,7 @@ public:
NS_IMETHOD GetTitle(nsAString& aTitle) final;
NS_IMETHOD GetMimeType(nsAString& aType) final;
NS_IMETHOD GetDocType(nsAString& aType) final;
NS_IMETHOD GetDOMDocument(nsIDOMDocument** aDOMDocument) final;
NS_IMETHOD GetDOMDocument(nsIDocument** aDOMDocument) final;
NS_IMETHOD GetWindow(mozIDOMWindowProxy** aDOMWindow) final;
NS_IMETHOD GetParentDocument(nsIAccessibleDocument** aDocument)
final;

View File

@ -189,7 +189,7 @@ BasePrincipal::SetCsp(nsIContentSecurityPolicy* aCsp)
}
NS_IMETHODIMP
BasePrincipal::EnsureCSP(nsIDOMDocument* aDocument,
BasePrincipal::EnsureCSP(nsIDocument* aDocument,
nsIContentSecurityPolicy** aCSP)
{
if (mCSP) {
@ -219,7 +219,7 @@ BasePrincipal::GetPreloadCsp(nsIContentSecurityPolicy** aPreloadCSP)
}
NS_IMETHODIMP
BasePrincipal::EnsurePreloadCSP(nsIDOMDocument* aDocument,
BasePrincipal::EnsurePreloadCSP(nsIDocument* aDocument,
nsIContentSecurityPolicy** aPreloadCSP)
{
if (mPreloadCSP) {

View File

@ -71,9 +71,9 @@ public:
NS_IMETHOD GetAddonPolicy(nsISupports** aResult) final;
NS_IMETHOD GetCsp(nsIContentSecurityPolicy** aCsp) override;
NS_IMETHOD SetCsp(nsIContentSecurityPolicy* aCsp) override;
NS_IMETHOD EnsureCSP(nsIDOMDocument* aDocument, nsIContentSecurityPolicy** aCSP) override;
NS_IMETHOD EnsureCSP(nsIDocument* aDocument, nsIContentSecurityPolicy** aCSP) override;
NS_IMETHOD GetPreloadCsp(nsIContentSecurityPolicy** aPreloadCSP) override;
NS_IMETHOD EnsurePreloadCSP(nsIDOMDocument* aDocument, nsIContentSecurityPolicy** aCSP) override;
NS_IMETHOD EnsurePreloadCSP(nsIDocument* aDocument, nsIContentSecurityPolicy** aCSP) override;
NS_IMETHOD GetCspJSON(nsAString& outCSPinJSON) override;
NS_IMETHOD GetIsNullPrincipal(bool* aResult) override;
NS_IMETHOD GetIsCodebasePrincipal(bool* aResult) override;

View File

@ -81,7 +81,7 @@ SystemPrincipal::SetCsp(nsIContentSecurityPolicy* aCsp)
}
NS_IMETHODIMP
SystemPrincipal::EnsureCSP(nsIDOMDocument* aDocument,
SystemPrincipal::EnsureCSP(nsIDocument* aDocument,
nsIContentSecurityPolicy** aCSP)
{
// CSP on a system principal makes no sense
@ -96,7 +96,7 @@ SystemPrincipal::GetPreloadCsp(nsIContentSecurityPolicy** aPreloadCSP)
}
NS_IMETHODIMP
SystemPrincipal::EnsurePreloadCSP(nsIDOMDocument* aDocument,
SystemPrincipal::EnsurePreloadCSP(nsIDocument* aDocument,
nsIContentSecurityPolicy** aPreloadCSP)
{
// CSP on a system principal makes no sense

View File

@ -40,9 +40,9 @@ public:
NS_IMETHOD SetDomain(nsIURI* aDomain) override;
NS_IMETHOD GetCsp(nsIContentSecurityPolicy** aCsp) override;
NS_IMETHOD SetCsp(nsIContentSecurityPolicy* aCsp) override;
NS_IMETHOD EnsureCSP(nsIDOMDocument* aDocument, nsIContentSecurityPolicy** aCSP) override;
NS_IMETHOD EnsureCSP(nsIDocument* aDocument, nsIContentSecurityPolicy** aCSP) override;
NS_IMETHOD GetPreloadCsp(nsIContentSecurityPolicy** aPreloadCSP) override;
NS_IMETHOD EnsurePreloadCSP(nsIDOMDocument* aDocument, nsIContentSecurityPolicy** aCSP) override;
NS_IMETHOD EnsurePreloadCSP(nsIDocument* aDocument, nsIContentSecurityPolicy** aCSP) override;
NS_IMETHOD GetBaseDomain(nsACString& aBaseDomain) override;
NS_IMETHOD GetAddonId(nsAString& aAddonId) override;

View File

@ -38,7 +38,8 @@ class OriginAttributes;
interface nsIURI;
interface nsIContentSecurityPolicy;
interface nsIDOMDocument;
webidl Document;
[ptr] native JSContext(JSContext);
[ptr] native JSPrincipals(JSPrincipals);
@ -165,7 +166,7 @@ interface nsIPrincipal : nsISerializable
* Please note if aDocument is null, then setRequestContext on the
* CSP object is called using the current principal.
*/
[noscript] nsIContentSecurityPolicy ensureCSP(in nsIDOMDocument aDocument);
[noscript] nsIContentSecurityPolicy ensureCSP(in Document aDocument);
/**
* A speculative Content Security Policy associated with this
@ -186,7 +187,7 @@ interface nsIPrincipal : nsISerializable
* Please note if aDocument is null, then setRequestContext on the
* speculative CSP object is called using the current principal.
*/
[noscript] nsIContentSecurityPolicy ensurePreloadCSP(in nsIDOMDocument aDocument);
[noscript] nsIContentSecurityPolicy ensurePreloadCSP(in Document aDocument);
/**
* The CSP of the principal in JSON notation.

View File

@ -18,7 +18,6 @@
#include "mozilla/dom/URL.h"
#include "nsIConsoleService.h"
#include "nsIDocument.h"
#include "nsIDOMDocument.h"
#include "nsIDOMWindowCollection.h"
#include "nsIDOMWindow.h"
#include "nsIObserverService.h"

View File

@ -5101,17 +5101,18 @@ nsDocShell::Stop(uint32_t aStopFlags)
}
NS_IMETHODIMP
nsDocShell::GetDocument(nsIDOMDocument** aDocument)
nsDocShell::GetDocument(nsIDocument** aDocument)
{
NS_ENSURE_ARG_POINTER(aDocument);
NS_ENSURE_SUCCESS(EnsureContentViewer(), NS_ERROR_FAILURE);
nsIDocument* doc = mContentViewer->GetDocument();
nsCOMPtr<nsIDocument> doc = mContentViewer->GetDocument();
if (!doc) {
return NS_ERROR_NOT_AVAILABLE;
}
return CallQueryInterface(doc, aDocument);
doc.forget(aDocument);
return NS_OK;
}
NS_IMETHODIMP

View File

@ -8,7 +8,6 @@
#include "nsIInterfaceRequestorUtils.h"
#include "nsComponentManagerUtils.h"
#include "nsPIDOMWindow.h"
#include "nsIDOMDocument.h"
#include "nsIEditor.h"
#include "nsIEditingSession.h"
#include "nsIDocShell.h"

View File

@ -5,10 +5,10 @@
#include "nsISupports.idl"
interface nsIDocShell;
interface nsIDocument;
interface nsIDOMNode;
interface nsISHEntry;
interface nsIPrintSettings;
webidl Document;
%{ C++
@ -42,7 +42,7 @@ interface nsIContentViewer : nsISupports
attribute nsIDocShell container;
[noscript,notxpcom,nostdcall] void loadStart(in nsIDocument aDoc);
[noscript,notxpcom,nostdcall] void loadStart(in Document aDoc);
void loadComplete(in nsresult aStatus);
[noscript] readonly attribute boolean loadCompleted;
@ -129,17 +129,17 @@ interface nsIContentViewer : nsISupports
* Returns the same thing as getDocument(), but for use from script
* only. C++ consumers should use getDocument().
*/
readonly attribute nsISupports DOMDocument;
readonly attribute Document DOMDocument;
/**
* Returns DOMDocument as nsIDocument and without addrefing.
* Returns DOMDocument without addrefing.
*/
[noscript,notxpcom,nostdcall] nsIDocument getDocument();
[noscript,notxpcom,nostdcall] Document getDocument();
/**
* Allows setting the document.
*/
[noscript,nostdcall] void setDocument(in nsIDocument aDocument);
[noscript,nostdcall] void setDocument(in Document aDocument);
[noscript] void getBounds(in nsIntRectRef aBounds);
[noscript] void setBounds([const] in nsIntRectRef aBounds);
@ -218,7 +218,7 @@ interface nsIContentViewer : nsISupports
[noscript] readonly attribute nsIPresShellPtr presShell;
[noscript] readonly attribute nsPresContextPtr presContext;
// aDocument must not be null.
[noscript] void setDocumentInternal(in nsIDocument aDocument,
[noscript] void setDocumentInternal(in Document aDocument,
in boolean aForceReuseInnerWindow);
/**
* Find the view to use as the container view for MakeWindow. Returns

View File

@ -5,12 +5,12 @@
#include "nsISupports.idl"
interface nsIDOMDocument;
interface nsIInputStream;
interface nsISHistory;
interface nsIURI;
interface nsIPrincipal;
interface nsIChildSHistory;
webidl Document;
%{ C++
#include "mozilla/dom/ChildSHistory.h"
@ -366,7 +366,7 @@ interface nsIWebNavigation : nsISupports
* blank document if there is none. This attribute never returns null except
* for unexpected error situations.
*/
readonly attribute nsIDOMDocument document;
readonly attribute Document document;
/**
* The currently loaded URI or null.

View File

@ -12,7 +12,6 @@
#include "nsIDocShell.h"
#include "nsIDocShellTreeItem.h"
#include "nsIDocument.h"
#include "nsIDOMDocument.h"
#include "nsILayoutHistoryState.h"
#include "nsISHistory.h"
#include "nsISHistoryInternal.h"

View File

@ -1769,7 +1769,7 @@ nsSHistory::Stop(uint32_t aStopFlags)
}
NS_IMETHODIMP
nsSHistory::GetDocument(nsIDOMDocument** aDocument)
nsSHistory::GetDocument(nsIDocument** aDocument)
{
// Not implemented
return NS_OK;

View File

@ -19,7 +19,6 @@
#include "mozilla/dom/HTMLSlotElement.h"
#include "mozilla/dom/ShadowRoot.h"
#include "nsIDocument.h"
#include "nsIDOMDocument.h"
#include "nsReadableUtils.h"
#include "mozilla/InternalMutationEvent.h"
#include "nsIURI.h"

View File

@ -10,7 +10,6 @@
#include "mozilla/dom/DOMImplementationBinding.h"
#include "nsContentCreatorFunctions.h"
#include "nsContentUtils.h"
#include "nsIDOMDocument.h"
#include "mozilla/dom/DocumentType.h"
#include "nsTextNode.h"
@ -91,9 +90,9 @@ DOMImplementation::CreateDocument(const nsAString& aNamespaceURI,
NS_ENSURE_STATE(!mScriptObject || scriptHandlingObject);
nsCOMPtr<nsIDOMDocument> document;
nsCOMPtr<nsIDocument> doc;
rv = NS_NewDOMDocument(getter_AddRefs(document),
rv = NS_NewDOMDocument(getter_AddRefs(doc),
aNamespaceURI, aQualifiedName, aDoctype,
mDocumentURI, mBaseURI,
mOwner->NodePrincipal(),
@ -104,7 +103,6 @@ DOMImplementation::CreateDocument(const nsAString& aNamespaceURI,
// When DOMImplementation's createDocument method is invoked with
// namespace set to HTML Namespace use the registry of the associated
// document to the new instance.
nsCOMPtr<nsIDocument> doc = do_QueryInterface(document);
if (aNamespaceURI.EqualsLiteral("http://www.w3.org/1999/xhtml")) {
doc->SetContentType(NS_LITERAL_STRING("application/xhtml+xml"));
@ -153,15 +151,14 @@ DOMImplementation::CreateHTMLDocument(const nsAString& aTitle,
NS_ENSURE_STATE(!mScriptObject || scriptHandlingObject);
nsCOMPtr<nsIDOMDocument> document;
nsresult rv = NS_NewDOMDocument(getter_AddRefs(document),
nsCOMPtr<nsIDocument> doc;
nsresult rv = NS_NewDOMDocument(getter_AddRefs(doc),
EmptyString(), EmptyString(),
doctype, mDocumentURI, mBaseURI,
mOwner->NodePrincipal(),
true, scriptHandlingObject,
DocumentFlavorLegacyGuess);
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsIDocument> doc = do_QueryInterface(document);
nsCOMPtr<Element> root = doc->CreateElem(NS_LITERAL_STRING("html"), nullptr,
kNameSpaceID_XHTML);

View File

@ -6,7 +6,6 @@
#include "mozilla/dom/DOMParser.h"
#include "nsIDOMDocument.h"
#include "nsNetUtil.h"
#include "nsDOMString.h"
#include "MainThreadUtils.h"
@ -309,8 +308,8 @@ DOMParser::SetUpDocument(DocumentFlavor aFlavor, ErrorResult& aRv)
NS_ASSERTION(mPrincipal, "Must have principal by now");
NS_ASSERTION(mDocumentURI, "Must have document URI by now");
nsCOMPtr<nsIDOMDocument> domDoc;
nsresult rv = NS_NewDOMDocument(getter_AddRefs(domDoc), EmptyString(), EmptyString(),
nsCOMPtr<nsIDocument> doc;
nsresult rv = NS_NewDOMDocument(getter_AddRefs(doc), EmptyString(), EmptyString(),
nullptr, mDocumentURI, mBaseURI, mPrincipal,
true, scriptHandlingObject, aFlavor);
if (NS_WARN_IF(NS_FAILED(rv))) {
@ -318,6 +317,5 @@ DOMParser::SetUpDocument(DocumentFlavor aFlavor, ErrorResult& aRv)
return nullptr;
}
nsCOMPtr<nsIDocument> doc = do_QueryInterface(domDoc);
return doc.forget();
}

View File

@ -121,7 +121,7 @@ public:
nsTArray<RefPtr<mozilla::dom::Element>>& aElements);
/**
* Helper for nsIDOMDocument::elementFromPoint implementation that allows
* Helper for elementFromPoint implementation that allows
* ignoring the scroll frame and/or avoiding layout flushes.
*
* @see nsIDOMWindowUtils::elementFromPoint

View File

@ -26,7 +26,6 @@
#include "mozilla/dom/NodeInfo.h"
#include "nsIDocumentInlines.h"
#include "mozilla/dom/DocumentTimeline.h"
#include "nsIDOMDocument.h"
#include "nsIContentIterator.h"
#include "nsFlexContainerFrame.h"
#include "nsFocusManager.h"

View File

@ -50,7 +50,6 @@
#include "nsCaret.h"
#include "nsITimer.h"
#include "nsIDOMDocument.h"
#include "nsIDocument.h"
#include "nsINamed.h"
@ -454,14 +453,11 @@ Selection::ToStringWithFormat(const nsAString& aFormatType, uint32_t aFlags,
nsIDocument *doc = shell->GetDocument();
nsCOMPtr<nsIDOMDocument> domDoc = do_QueryInterface(doc);
NS_ASSERTION(domDoc, "Need a document");
// Flags should always include OutputSelectionOnly if we're coming from here:
aFlags |= nsIDocumentEncoder::OutputSelectionOnly;
nsAutoString readstring;
readstring.Assign(aFormatType);
rv = encoder->Init(domDoc, readstring, aFlags);
rv = encoder->Init(doc, readstring, aFlags);
if (NS_FAILED(rv)) {
aRv.Throw(rv);
return;

View File

@ -11,7 +11,6 @@
#include "nsContentSink.h"
#include "nsIDocument.h"
#include "nsIDOMDocument.h"
#include "mozilla/css/Loader.h"
#include "mozilla/dom/SRILogHelper.h"
#include "nsStyleLinkElement.h"
@ -1201,9 +1200,8 @@ nsContentSink::ProcessOfflineManifest(const nsAString& aManifestSpec)
do_GetService(NS_OFFLINECACHEUPDATESERVICE_CONTRACTID);
if (updateService) {
nsCOMPtr<nsIDOMDocument> domdoc = do_QueryInterface(mDocument);
updateService->ScheduleOnDocumentStop(manifestURI, mDocumentURI,
mDocument->NodePrincipal(), domdoc);
mDocument->NodePrincipal(), mDocument);
}
break;
}
@ -1657,9 +1655,8 @@ nsContentSink::NotifyDocElementCreated(nsIDocument* aDoc)
nsCOMPtr<nsIObserverService> observerService =
mozilla::services::GetObserverService();
if (observerService) {
nsCOMPtr<nsIDOMDocument> domDoc = do_QueryInterface(aDoc);
observerService->
NotifyObservers(domDoc, "document-element-inserted",
NotifyObservers(aDoc, "document-element-inserted",
EmptyString().get());
}

View File

@ -133,7 +133,6 @@
#include "nsIDocument.h"
#include "nsIDocumentEncoder.h"
#include "nsIDOMChromeWindow.h"
#include "nsIDOMDocument.h"
#include "nsIDOMNode.h"
#include "nsIDOMWindowUtils.h"
#include "nsIDragService.h"
@ -3643,8 +3642,7 @@ nsContentUtils::IsImageInCache(nsIURI* aURI, nsIDocument* aDocument)
// If something unexpected happened we return false, otherwise if props
// is set, the image is cached and we return true
nsCOMPtr<nsIProperties> props;
nsCOMPtr<nsIDOMDocument> domDoc = do_QueryInterface(aDocument);
nsresult rv = cache->FindEntryProperties(aURI, domDoc, getter_AddRefs(props));
nsresult rv = cache->FindEntryProperties(aURI, aDocument, getter_AddRefs(props));
return (NS_SUCCEEDED(rv) && props);
}
@ -5206,8 +5204,8 @@ nsContentUtils::ConvertToPlainText(const nsAString& aSourceBuffer,
nsCOMPtr<nsIURI> uri;
NS_NewURI(getter_AddRefs(uri), "about:blank");
nsCOMPtr<nsIPrincipal> principal = NullPrincipal::CreateWithoutOriginAttributes();
nsCOMPtr<nsIDOMDocument> domDocument;
nsresult rv = NS_NewDOMDocument(getter_AddRefs(domDocument),
nsCOMPtr<nsIDocument> document;
nsresult rv = NS_NewDOMDocument(getter_AddRefs(document),
EmptyString(),
EmptyString(),
nullptr,
@ -5219,7 +5217,6 @@ nsContentUtils::ConvertToPlainText(const nsAString& aSourceBuffer,
DocumentFlavorHTML);
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsIDocument> document = do_QueryInterface(domDocument);
rv = nsContentUtils::ParseDocumentHTML(aSourceBuffer, document,
!(aFlags & nsIDocumentEncoder::OutputNoScriptContent));
NS_ENSURE_SUCCESS(rv, rv);
@ -5227,7 +5224,7 @@ nsContentUtils::ConvertToPlainText(const nsAString& aSourceBuffer,
nsCOMPtr<nsIDocumentEncoder> encoder = do_CreateInstance(
"@mozilla.org/layout/documentEncoder;1?type=text/plain");
rv = encoder->Init(domDocument, NS_LITERAL_STRING("text/plain"), aFlags);
rv = encoder->Init(document, NS_LITERAL_STRING("text/plain"), aFlags);
NS_ENSURE_SUCCESS(rv, rv);
encoder->SetWrapColumn(aWrapCol);
@ -5995,9 +5992,8 @@ nsContentUtils::CheckForSubFrameDrop(nsIDragSession* aDragSession,
// If there is no source node, then this is a drag from another
// application, which should be allowed.
nsCOMPtr<nsIDOMDocument> sourceDocument;
aDragSession->GetSourceDocument(getter_AddRefs(sourceDocument));
nsCOMPtr<nsIDocument> doc = do_QueryInterface(sourceDocument);
nsCOMPtr<nsIDocument> doc;
aDragSession->GetSourceDocument(getter_AddRefs(doc));
if (doc) {
// Get each successive parent of the source document and compare it to
// the drop document. If they match, then this is a drag from a child frame.
@ -10610,9 +10606,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()) {

View File

@ -69,7 +69,6 @@ class nsIContentPolicy;
class nsIContentSecurityPolicy;
class nsIDocShellTreeItem;
class nsIDocumentLoaderFactory;
class nsIDOMDocument;
class nsIDOMNode;
class nsIDragSession;
class nsIEventTarget;
@ -1349,7 +1348,7 @@ public:
/**
* This method creates and dispatches a trusted event.
* Works only with events which can be created by calling
* nsIDOMDocument::CreateEvent() with parameter "Events".
* nsIDocument::CreateEvent() with parameter "Events".
* @param aDoc The document which will be used to create the event.
* @param aTarget The target of the event, should be QIable to
* EventTarget.
@ -1396,7 +1395,7 @@ public:
/**
* This method creates and dispatches a untrusted event.
* Works only with events which can be created by calling
* nsIDOMDocument::CreateEvent() with parameter "Events".
* nsIDocument::CreateEvent() with parameter "Events".
* @param aDoc The document which will be used to create the event.
* @param aTarget The target of the event, should be QIable to
* EventTarget.
@ -1448,7 +1447,7 @@ public:
* object. Use DispatchEventOnlyToChrome if the normal event dispatching is
* wanted in case aTarget is a chrome object.
* Works only with events which can be created by calling
* nsIDOMDocument::CreateEvent() with parameter "Events".
* nsIDocument::CreateEvent() with parameter "Events".
* @param aDocument The document which will be used to create the event,
* and whose window's chrome handler will be used to
* dispatch the event.
@ -1482,7 +1481,7 @@ public:
* events to chrome event handler. DispatchEventOnlyToChrome works like
* DispatchTrustedEvent in the case aTarget is a chrome object.
* Works only with events which can be created by calling
* nsIDOMDocument::CreateEvent() with parameter "Events".
* nsIDocument::CreateEvent() with parameter "Events".
* @param aDoc The document which will be used to create the event.
* @param aTarget The target of the event, should be QIable to
* EventTarget.

View File

@ -31,7 +31,6 @@
#include "nsPIDOMWindow.h"
#include "nsIDocument.h"
#include "nsIDOMNode.h"
#include "nsIDOMDocument.h"
#include "nsIHTMLDocument.h"
#include "nsGkAtoms.h"
#include "nsIFrame.h"
@ -116,10 +115,7 @@ SelectionCopyHelper(Selection *aSel, nsIDocument *aDoc,
| nsIDocumentEncoder::OutputRaw
| nsIDocumentEncoder::OutputForPlainTextClipboardCopy;
nsCOMPtr<nsIDOMDocument> domDoc = do_QueryInterface(aDoc);
NS_ASSERTION(domDoc, "Need a document");
rv = docEncoder->Init(domDoc, mimeType, flags);
rv = docEncoder->Init(aDoc, mimeType, flags);
NS_ENSURE_SUCCESS(rv, rv);
rv = docEncoder->SetSelection(aSel);
@ -168,7 +164,7 @@ SelectionCopyHelper(Selection *aSel, nsIDocument *aDoc,
nsIDocumentEncoder::OutputRubyAnnotation));
mimeType.AssignLiteral(kTextMime);
rv = docEncoder->Init(domDoc, mimeType, flags);
rv = docEncoder->Init(aDoc, mimeType, flags);
NS_ENSURE_SUCCESS(rv, rv);
rv = docEncoder->SetSelection(aSel);
@ -186,7 +182,7 @@ SelectionCopyHelper(Selection *aSel, nsIDocument *aDoc,
// Redo the encoding, but this time use the passed-in flags.
// Don't allow wrapping of CJK strings.
mimeType.AssignLiteral(kHTMLMime);
rv = docEncoder->Init(domDoc, mimeType,
rv = docEncoder->Init(aDoc, mimeType,
aFlags |
nsIDocumentEncoder::OutputDisallowLineBreaking);
NS_ENSURE_SUCCESS(rv, rv);
@ -363,10 +359,7 @@ nsCopySupport::GetContents(const nsACString& aMimeType, uint32_t aFlags, Selecti
NS_ConvertASCIItoUTF16 unicodeMimeType(aMimeType);
nsCOMPtr<nsIDOMDocument> domDoc = do_QueryInterface(aDoc);
NS_ASSERTION(domDoc, "Need a document");
rv = docEncoder->Init(domDoc, unicodeMimeType, flags);
rv = docEncoder->Init(aDoc, unicodeMimeType, flags);
if (NS_FAILED(rv)) return rv;
if (aSel)

View File

@ -9,7 +9,6 @@
#include "mozilla/Encoding.h"
#include "nsIDocument.h"
#include "nsIDocumentEncoder.h"
#include "nsIDOMDocument.h"
#include "nsComponentManagerUtils.h"
#include "nsContentCID.h"
#include "nsContentUtils.h"

View File

@ -9,7 +9,6 @@
#include "FlushType.h"
#include "nsCOMPtr.h"
#include "nsIDocument.h"
#include "nsIDOMDocument.h"
#include "nsIDOMWindow.h"
#include "nsIDocShell.h"
#include "nsIInterfaceRequestorUtils.h"
@ -49,10 +48,8 @@ nsDOMWindowList::EnsureFresh()
nsCOMPtr<nsIWebNavigation> shellAsNav = do_QueryInterface(mDocShellNode);
if (shellAsNav) {
nsCOMPtr<nsIDOMDocument> domdoc;
shellAsNav->GetDocument(getter_AddRefs(domdoc));
nsCOMPtr<nsIDocument> doc = do_QueryInterface(domdoc);
nsCOMPtr<nsIDocument> doc;
shellAsNav->GetDocument(getter_AddRefs(doc));
if (doc) {
doc->FlushPendingNotifications(FlushType::ContentAndNotify);

View File

@ -5606,7 +5606,7 @@ nsIDocument::GetController() const
}
//
// nsIDOMDocument interface
// nsIDocument interface
//
DocumentType*
nsIDocument::GetDoctype() const
@ -9199,8 +9199,8 @@ nsIDocument::GetTemplateContentsOwner()
nsIScriptGlobalObject* scriptObject =
GetScriptHandlingObject(hasHadScriptObject);
nsCOMPtr<nsIDOMDocument> domDocument;
nsresult rv = NS_NewDOMDocument(getter_AddRefs(domDocument),
nsCOMPtr<nsIDocument> document;
nsresult rv = NS_NewDOMDocument(getter_AddRefs(document),
EmptyString(), // aNamespaceURI
EmptyString(), // aQualifiedName
nullptr, // aDoctype
@ -9212,7 +9212,7 @@ nsIDocument::GetTemplateContentsOwner()
DocumentFlavorHTML);
NS_ENSURE_SUCCESS(rv, nullptr);
mTemplateContentsOwner = do_QueryInterface(domDocument);
mTemplateContentsOwner = document;
NS_ENSURE_TRUE(mTemplateContentsOwner, nullptr);
nsDocument* doc = static_cast<nsDocument*>(mTemplateContentsOwner.get());
@ -11853,9 +11853,9 @@ nsIDocument::Constructor(const GlobalObject& aGlobal,
return nullptr;
}
nsCOMPtr<nsIDOMDocument> document;
nsCOMPtr<nsIDocument> doc;
nsresult res =
NS_NewDOMDocument(getter_AddRefs(document),
NS_NewDOMDocument(getter_AddRefs(doc),
VoidString(),
EmptyString(),
nullptr,
@ -11870,7 +11870,6 @@ nsIDocument::Constructor(const GlobalObject& aGlobal,
return nullptr;
}
nsCOMPtr<nsIDocument> doc = do_QueryInterface(document);
doc->SetReadyStateInternal(nsIDocument::READYSTATE_COMPLETE);
return doc.forget();

View File

@ -203,9 +203,6 @@ public:
static bool IsShadowDOMEnabled(const nsINode* aNode);
public:
// nsIDOMDocument
NS_DECL_NSIDOMDOCUMENT
using mozilla::dom::DocumentOrShadowRoot::GetElementById;
using mozilla::dom::DocumentOrShadowRoot::GetElementsByTagName;
using mozilla::dom::DocumentOrShadowRoot::GetElementsByTagNameNS;

View File

@ -21,7 +21,6 @@
#include "mozilla/Encoding.h"
#include "nsIOutputStream.h"
#include "nsRange.h"
#include "nsIDOMDocument.h"
#include "nsGkAtoms.h"
#include "nsIContent.h"
#include "nsIScriptContext.h"
@ -246,17 +245,11 @@ nsDocumentEncoder::~nsDocumentEncoder()
}
NS_IMETHODIMP
nsDocumentEncoder::Init(nsIDOMDocument* aDocument,
nsDocumentEncoder::Init(nsIDocument* aDocument,
const nsAString& aMimeType,
uint32_t aFlags)
{
if (!aDocument)
return NS_ERROR_INVALID_ARG;
nsCOMPtr<nsIDocument> doc = do_QueryInterface(aDocument);
NS_ENSURE_TRUE(doc, NS_ERROR_FAILURE);
return NativeInit(doc, aMimeType, aFlags);
return NativeInit(aDocument, aMimeType, aFlags);
}
NS_IMETHODIMP
@ -1152,7 +1145,7 @@ public:
nsHTMLCopyEncoder();
virtual ~nsHTMLCopyEncoder();
NS_IMETHOD Init(nsIDOMDocument* aDocument, const nsAString& aMimeType, uint32_t aFlags) override;
NS_IMETHOD Init(nsIDocument* aDocument, const nsAString& aMimeType, uint32_t aFlags) override;
// overridden methods from nsDocumentEncoder
NS_IMETHOD SetSelection(Selection* aSelection) override;
@ -1200,7 +1193,7 @@ nsHTMLCopyEncoder::~nsHTMLCopyEncoder()
}
NS_IMETHODIMP
nsHTMLCopyEncoder::Init(nsIDOMDocument* aDocument,
nsHTMLCopyEncoder::Init(nsIDocument* aDocument,
const nsAString& aMimeType,
uint32_t aFlags)
{
@ -1211,8 +1204,7 @@ nsHTMLCopyEncoder::Init(nsIDOMDocument* aDocument,
Initialize();
mIsCopying = true;
mDocument = do_QueryInterface(aDocument);
NS_ENSURE_TRUE(mDocument, NS_ERROR_FAILURE);
mDocument = aDocument;
// Hack, hack! Traditionally, the caller passes text/unicode, which is
// treated as "guess text/html or text/plain" in this context. (It has a

View File

@ -18,7 +18,6 @@
#include "nsIContentParent.h"
#include "nsPIDOMWindow.h"
#include "nsIDOMChromeWindow.h"
#include "nsIDOMDocument.h"
#include "nsIDOMRange.h"
#include "nsIHTMLDocument.h"
#include "nsIDocShell.h"

View File

@ -110,7 +110,6 @@
#include "nsIDocShell.h"
#include "nsIDocument.h"
#include "Crypto.h"
#include "nsIDOMDocument.h"
#include "nsIDOMOfflineResourceList.h"
#include "nsDOMString.h"
#include "nsIEmbeddingSiteWindow.h"

View File

@ -107,7 +107,6 @@
#include "nsIDocShell.h"
#include "nsIDocument.h"
#include "Crypto.h"
#include "nsIDOMDocument.h"
#include "nsIDOMOfflineResourceList.h"
#include "nsDOMString.h"
#include "nsIEmbeddingSiteWindow.h"

View File

@ -93,7 +93,6 @@ class nsIDocShell;
class nsIDocShellTreeItem;
class nsIDocumentEncoder;
class nsIDocumentObserver;
class nsIDOMDocument;
class nsIHTMLCollection;
class nsILayoutHistoryState;
class nsILoadContext;
@ -4530,7 +4529,7 @@ NS_NewVideoDocument(nsIDocument** aInstancePtrResult);
// -- this method will not attempt to get a principal based on aDocumentURI.
// Also, both aDocumentURI and aBaseURI must not be null.
nsresult
NS_NewDOMDocument(nsIDOMDocument** aInstancePtrResult,
NS_NewDOMDocument(nsIDocument** aInstancePtrResult,
const nsAString& aNamespaceURI,
const nsAString& aQualifiedName,
mozilla::dom::DocumentType* aDoctype,
@ -4544,7 +4543,7 @@ NS_NewDOMDocument(nsIDOMDocument** aInstancePtrResult,
// This is used only for xbl documents created from the startup cache.
// Non-cached documents are created in the same manner as xml documents.
nsresult
NS_NewXBLDocument(nsIDOMDocument** aInstancePtrResult,
NS_NewXBLDocument(nsIDocument** aInstancePtrResult,
nsIURI* aDocumentURI,
nsIURI* aBaseURI,
nsIPrincipal* aPrincipal);

View File

@ -5,12 +5,12 @@
#include "nsISupports.idl"
interface nsIDOMDocument;
interface nsIDOMRange;
interface nsIDOMNode;
interface nsIOutputStream;
webidl Selection;
webidl Document;
%{ C++
class nsINode;
@ -236,7 +236,7 @@ interface nsIDocumentEncoder : nsISupports
* @param aMimeType MimeType to use. May also be set by SetMimeType.
* @param aFlags Flags to use while encoding. May also be set by SetFlags.
*/
void init(in nsIDOMDocument aDocument,
void init(in Document aDocument,
in AString aMimeType,
in unsigned long aFlags);
[noscript] void nativeInit(in nsIDocumentPtr aDocument,

View File

@ -60,7 +60,6 @@
#include "nsIContentIterator.h"
#include "nsIControllers.h"
#include "nsIDocument.h"
#include "nsIDOMDocument.h"
#include "nsIDOMEventListener.h"
#include "nsILinkHandler.h"
#include "mozilla/dom/NodeInfo.h"

View File

@ -18,7 +18,6 @@
#include "nsIDocShell.h"
#include "nsIDocShellLoadInfo.h"
#include "nsIDocument.h"
#include "nsIDOMDocument.h"
#include "nsIExternalProtocolHandler.h"
#include "nsIInterfaceRequestorUtils.h"
#include "nsIObjectFrame.h"

View File

@ -18,7 +18,6 @@
#include "nsString.h"
#include "nsWeakReference.h"
#include "nsIDocument.h"
#include "nsIDOMDocument.h"
#include "nsIPrincipal.h"
#include "nsContentUtils.h" // for kLoadAsData
#include "nsThreadUtils.h"
@ -47,7 +46,7 @@ public:
nsresult LoadDocument(nsIChannel* aChannel,
bool aChannelIsSync, bool aForceToXML,
ReferrerPolicy aReferrerPolicy,
nsIDOMDocument** aResult);
nsIDocument** aResult);
NS_FORWARD_NSISTREAMLISTENER(mListener->)
NS_DECL_NSIREQUESTOBSERVER
@ -135,7 +134,7 @@ nsSyncLoader::LoadDocument(nsIChannel* aChannel,
bool aChannelIsSync,
bool aForceToXML,
ReferrerPolicy aReferrerPolicy,
nsIDOMDocument **aResult)
nsIDocument **aResult)
{
NS_ENSURE_ARG(aChannel);
NS_ENSURE_ARG_POINTER(aResult);
@ -211,7 +210,9 @@ nsSyncLoader::LoadDocument(nsIChannel* aChannel,
NS_ENSURE_TRUE(document->GetRootElement(), NS_ERROR_FAILURE);
return CallQueryInterface(document, aResult);
document.forget(aResult);
return NS_OK;
}
nsresult
@ -313,7 +314,7 @@ nsSyncLoadService::LoadDocument(nsIURI *aURI,
nsILoadGroup *aLoadGroup,
bool aForceToXML,
ReferrerPolicy aReferrerPolicy,
nsIDOMDocument** aResult)
nsIDocument** aResult)
{
nsCOMPtr<nsIChannel> channel;
nsresult rv = NS_NewChannel(getter_AddRefs(channel),

View File

@ -19,7 +19,7 @@ class nsILoadGroup;
class nsIStreamListener;
class nsIURI;
class nsIPrincipal;
class nsIDOMDocument;
class nsIDocument;
class nsIChannel;
class nsSyncLoadService
@ -46,7 +46,7 @@ public:
nsILoadGroup *aLoadGroup,
bool aForceToXML,
mozilla::net::ReferrerPolicy aReferrerPolicy,
nsIDOMDocument** aResult);
nsIDocument** aResult);
/**
* Read input stream aIn in chunks and deliver synchronously to aListener.

View File

@ -10,7 +10,6 @@
#include "DataTransfer.h"
#include "nsIDOMDocument.h"
#include "nsISupportsPrimitives.h"
#include "nsIScriptSecurityManager.h"
#include "mozilla/dom/DOMStringList.h"

View File

@ -22,7 +22,6 @@
#include "nsAtom.h"
#include "nsIContent.h"
#include "nsIDocument.h"
#include "nsIDOMDocument.h"
#include "nsIDOMRange.h"
#include "nsIFrame.h"
#include "nsINode.h"

View File

@ -22,7 +22,6 @@
#include "nsAutoPtr.h"
#include "nsContentUtils.h"
#include "nsGlobalWindow.h"
#include "nsIDOMDocument.h"
#include "nsIDOMWindow.h"
#include "nsIObserver.h"
#include "nsIObserverService.h"

View File

@ -11,7 +11,6 @@
#include "nsIDocument.h"
#include "nsIPluginDocument.h"
#include "nsIDOMDocument.h"
#include "nsThreadUtils.h"
#include "nsIScriptError.h"
#include "nsIWidget.h"

View File

@ -7,8 +7,6 @@
#include "mozilla/dom/HTMLFrameElement.h"
#include "mozilla/dom/HTMLFrameElementBinding.h"
class nsIDOMDocument;
NS_IMPL_NS_NEW_HTML_ELEMENT_CHECK_PARSER(Frame)
namespace mozilla {

View File

@ -34,7 +34,6 @@
#include "nsSize.h"
#include "nsIFrame.h"
#include "nsIDocument.h"
#include "nsIDOMDocument.h"
#include "nsIDocShell.h"
#include "nsError.h"
#include "nsNodeInfoManager.h"

View File

@ -108,8 +108,7 @@ HTMLMetaElement::BindToTree(nsIDocument* aDocument, nsIContent* aParent,
nsIPrincipal* principal = aDocument->NodePrincipal();
nsCOMPtr<nsIContentSecurityPolicy> csp;
nsCOMPtr<nsIDOMDocument> domDoc = do_QueryInterface(aDocument);
principal->EnsureCSP(domDoc, getter_AddRefs(csp));
principal->EnsureCSP(aDocument, getter_AddRefs(csp));
if (csp) {
if (LOG_ENABLED()) {
nsAutoCString documentURIspec;

View File

@ -14,7 +14,6 @@
#include "nsError.h"
#include "nsIDocument.h"
#include "nsIPluginDocument.h"
#include "nsIDOMDocument.h"
#include "nsIObjectFrame.h"
#include "nsNPAPIPluginInstance.h"
#include "nsIWidget.h"

View File

@ -26,7 +26,6 @@
#include "nsIDocument.h"
#include "nsIDocumentEncoder.h"
#include "nsIDOMWindow.h"
#include "nsIDOMDocument.h"
#include "nsMappedAttributes.h"
#include "nsHTMLStyleSheet.h"
#include "nsIHTMLDocument.h"

View File

@ -14,7 +14,6 @@
#include "nsAttrValueInlines.h"
#include "nsContentUtils.h"
#include "nsIDocShell.h"
#include "nsIDOMDocument.h"
#include "nsIFrame.h"
#include "nsIInterfaceRequestorUtils.h"
#include "nsIPermissionManager.h"
@ -81,16 +80,6 @@ nsGenericHTMLFrameElement::~nsGenericHTMLFrameElement()
}
}
nsresult
nsGenericHTMLFrameElement::GetContentDocument(nsIDOMDocument** aContentDocument)
{
MOZ_ASSERT(aContentDocument, "Null out param");
nsCOMPtr<nsIDOMDocument> document =
do_QueryInterface(GetContentDocument(*nsContentUtils::SubjectPrincipal()));
document.forget(aContentDocument);
return NS_OK;
}
nsIDocument*
nsGenericHTMLFrameElement::GetContentDocument(nsIPrincipal& aSubjectPrincipal)
{

View File

@ -108,7 +108,6 @@ protected:
void EnsureFrameLoader();
void LoadSrc();
nsIDocument* GetContentDocument(nsIPrincipal& aSubjectPrincipal);
nsresult GetContentDocument(nsIDOMDocument** aContentDocument);
already_AddRefed<nsPIDOMWindowOuter> GetContentWindow();
virtual nsresult AfterSetAttr(int32_t aNameSpaceID, nsAtom* aName,

View File

@ -36,7 +36,6 @@
#include "nsGenericHTMLElement.h"
#include "nsIDOMDocument.h"
#include "nsIScriptElement.h"
#include "nsIComponentManager.h"

View File

@ -1179,7 +1179,7 @@ nsHTMLDocument::Open(JSContext* /* unused */,
bool aReplace,
ErrorResult& rv)
{
MOZ_ASSERT(nsContentUtils::CanCallerAccess(static_cast<nsIDOMDocument*>(this)),
MOZ_ASSERT(nsContentUtils::CanCallerAccess(static_cast<nsIDOMNode*>(this)),
"XOW should have caught this!");
nsCOMPtr<nsPIDOMWindowInner> window = GetInnerWindow();
@ -1209,7 +1209,7 @@ nsHTMLDocument::Open(JSContext* cx,
// Implements the "When called with two arguments (or fewer)" steps here:
// https://html.spec.whatwg.org/multipage/webappapis.html#opening-the-input-stream
MOZ_ASSERT(nsContentUtils::CanCallerAccess(static_cast<nsIDOMDocument*>(this)),
MOZ_ASSERT(nsContentUtils::CanCallerAccess(static_cast<nsIDOMNode*>(this)),
"XOW should have caught this!");
if (!IsHTMLDocument() || mDisableDocWrite) {
// No calling document.open() on XHTML

View File

@ -77,18 +77,6 @@ public:
return mForms;
}
// nsIDOMDocument interface
using nsDocument::CreateElement;
using nsDocument::CreateElementNS;
NS_FORWARD_NSIDOMDOCUMENT(nsDocument::)
// And explicitly import the things from nsDocument that we just shadowed
using nsDocument::GetImplementation;
using nsDocument::GetTitle;
using nsDocument::SetTitle;
using nsDocument::GetLastStyleSheetSet;
using nsDocument::MozSetImageElement;
mozilla::dom::HTMLAllCollection* All();
nsISupports* ResolveName(const nsAString& aName, nsWrapperCache **aCache);

View File

@ -14,7 +14,6 @@
#include "nsEditorCID.h"
#include "nsLayoutCID.h"
#include "nsITextControlFrame.h"
#include "nsIDOMDocument.h"
#include "nsContentCreatorFunctions.h"
#include "nsTextControlFrame.h"
#include "nsIControllers.h"

View File

@ -7,10 +7,11 @@
interface nsIURI;
interface nsIDocShell;
interface nsIDOMDocument;
interface nsIEventTarget;
interface nsIPrincipal;
webidl Document;
/**
* nsIContentSecurityPolicy
* Describes an XPCOM component used to model and enforce CSPs. Instances of
@ -207,7 +208,7 @@ interface nsIContentSecurityPolicy : nsISerializable
* * aDocument (preferred), or if no document is available, then provide
* * aPrincipal
*/
void setRequestContext(in nsIDOMDocument aDocument,
void setRequestContext(in Document aDocument,
in nsIPrincipal aPrincipal);
/**

View File

@ -70,7 +70,6 @@
#include "nsIDocumentInlines.h"
#include "nsIDocShellTreeOwner.h"
#include "nsIDOMChromeWindow.h"
#include "nsIDOMDocument.h"
#include "nsIDOMWindow.h"
#include "nsIDOMWindowUtils.h"
#include "nsFocusManager.h"
@ -202,9 +201,8 @@ NS_IMPL_CYCLE_COLLECTING_RELEASE(TabChildBase)
already_AddRefed<nsIDocument>
TabChildBase::GetDocument() const
{
nsCOMPtr<nsIDOMDocument> domDoc;
WebNavigation()->GetDocument(getter_AddRefs(domDoc));
nsCOMPtr<nsIDocument> doc(do_QueryInterface(domDoc));
nsCOMPtr<nsIDocument> doc;
WebNavigation()->GetDocument(getter_AddRefs(doc));
return doc.forget();
}

View File

@ -6,7 +6,6 @@
#include "TelemetryScrollProbe.h"
#include "nsIDOMDocument.h" // for nsIDOMDocument
#include "nsIURI.h" // for nsIURI
#include "TabChild.h" // for TabChildGlobal, TabChildBase
#include "mozilla/Telemetry.h" // for mozilla::Telemetry
@ -36,9 +35,7 @@ TelemetryScrollProbe::GetDocument() const
{
nsCOMPtr<nsIDocument> result;
if (nsCOMPtr<nsIWebNavigation> webNav = GetWebNavigation()) {
nsCOMPtr<nsIDOMDocument> domDoc;
webNav->GetDocument(getter_AddRefs(domDoc));
result = do_QueryInterface(domDoc);
webNav->GetDocument(getter_AddRefs(result));
}
return result.forget();
}

View File

@ -20,7 +20,6 @@
#include "ImageContainer.h"
#include "Layers.h"
#include "nsIInterfaceRequestorUtils.h"
#include "nsIDOMDocument.h"
#include "nsITabSource.h"
#include "VideoUtils.h"
#include "nsServiceManagerUtils.h"

View File

@ -18,7 +18,7 @@
#include "nsIClassInfoImpl.h"
#include "nsIDocShell.h"
#include "nsIDocShellTreeItem.h"
#include "nsIDOMDocument.h"
#include "nsIDocument.h"
#include "nsIDOMNode.h"
#include "nsIHttpChannel.h"
#include "nsIInterfaceRequestor.h"
@ -689,29 +689,28 @@ nsCSPContext::LogViolationDetails(uint16_t aViolationType,
#undef CASE_CHECK_AND_REPORT
NS_IMETHODIMP
nsCSPContext::SetRequestContext(nsIDOMDocument* aDOMDocument,
nsCSPContext::SetRequestContext(nsIDocument* aDocument,
nsIPrincipal* aPrincipal)
{
MOZ_ASSERT(aDOMDocument || aPrincipal,
MOZ_ASSERT(aDocument || aPrincipal,
"Can't set context without doc or principal");
NS_ENSURE_ARG(aDOMDocument || aPrincipal);
NS_ENSURE_ARG(aDocument || aPrincipal);
if (aDOMDocument) {
nsCOMPtr<nsIDocument> doc = do_QueryInterface(aDOMDocument);
mLoadingContext = do_GetWeakReference(doc);
mSelfURI = doc->GetDocumentURI();
mLoadingPrincipal = doc->NodePrincipal();
doc->GetReferrer(mReferrer);
mInnerWindowID = doc->InnerWindowID();
if (aDocument) {
mLoadingContext = do_GetWeakReference(aDocument);
mSelfURI = aDocument->GetDocumentURI();
mLoadingPrincipal = aDocument->NodePrincipal();
aDocument->GetReferrer(mReferrer);
mInnerWindowID = aDocument->InnerWindowID();
// the innerWindowID is not available for CSPs delivered through the
// header at the time setReqeustContext is called - let's queue up
// console messages until it becomes available, see flushConsoleMessages
mQueueUpMessages = !mInnerWindowID;
mCallingChannelLoadGroup = doc->GetDocumentLoadGroup();
mCallingChannelLoadGroup = aDocument->GetDocumentLoadGroup();
// set the flag on the document for CSP telemetry
doc->SetHasCSP(true);
mEventTarget = doc->EventTargetFor(TaskCategory::Other);
aDocument->SetHasCSP(true);
mEventTarget = aDocument->EventTargetFor(TaskCategory::Other);
}
else {
CSPCONTEXTLOG(("No Document in SetRequestContext; can not query loadgroup; sending reports may fail."));

View File

@ -12,7 +12,6 @@
#include "nsIDOMWindow.h"
#include "nsPIDOMWindow.h"
#include "nsIDOMDocument.h"
#include "nsIScriptObjectPrincipal.h"
#include "nsIServiceManager.h"
#include "nsIServiceManager.h"

View File

@ -30,7 +30,6 @@
#include "nsFrameLoader.h"
#include "nsIComponentRegistrar.h"
#include "nsIContent.h"
#include "nsIDOMDocument.h"
#include "nsIDOMNode.h"
#include "nsIDOMWindowUtils.h"
#include "nsIDocShell.h"

View File

@ -8,7 +8,6 @@
interface nsIURI;
interface nsIInputStream;
interface nsIDOMDocument;
interface nsIWebProgressListener;
interface nsIFile;
interface nsIChannel;
@ -228,7 +227,7 @@ interface nsIWebBrowserPersist : nsICancelable
* @param aDocument Document to save to file. Some implementations of
* this interface may also support <CODE>nullptr</CODE>
* to imply the currently loaded document. Can be an
* nsIWebBrowserPersistDocument or nsIDOMDocument.
* nsIWebBrowserPersistDocument or Document.
* @param aFile Target local file. This may be a nsIFile object or an
* nsIURI object with a file scheme or a scheme that
* supports uploading (e.g. ftp).

View File

@ -6,7 +6,6 @@
#include "nsISupports.idl"
interface nsIDOMDocument;
interface nsIInputStream;
interface nsIOutputStream;
interface nsITabParent;

View File

@ -10,7 +10,6 @@
#include "nsIContentPolicy.h"
#include "nsIContentSecurityPolicy.h"
#include "nsIDocShell.h"
#include "nsIDOMDocument.h"
#include "nsIHttpChannel.h"
#include "nsIHttpChannelInternal.h"
#include "nsIInputStreamPump.h"

View File

@ -11,7 +11,6 @@
#include "nsXBLPrototypeBinding.h"
#include "nsIScriptObjectPrincipal.h"
#include "nsIScriptContext.h"
#include "nsIDOMDocument.h"
#include "jsapi.h"
#include "jsfriendapi.h"
#include "nsIURI.h"
@ -227,13 +226,10 @@ nsXBLDocumentInfo::ReadPrototypeBindings(nsIURI* aURI, nsXBLDocumentInfo** aDocI
nsContentUtils::GetSecurityManager()->
GetSystemPrincipal(getter_AddRefs(principal));
nsCOMPtr<nsIDOMDocument> domdoc;
rv = NS_NewXBLDocument(getter_AddRefs(domdoc), aURI, nullptr, principal);
nsCOMPtr<nsIDocument> doc;
rv = NS_NewXBLDocument(getter_AddRefs(doc), aURI, nullptr, principal);
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsIDocument> doc = do_QueryInterface(domdoc);
NS_ASSERTION(doc, "Must have a document!");
RefPtr<nsXBLDocumentInfo> docInfo = new nsXBLDocumentInfo(doc);
while (1) {

View File

@ -20,7 +20,6 @@
#include "nsXBLPrototypeBinding.h"
#include "nsPIDOMWindow.h"
#include "nsIDocShell.h"
#include "nsIDOMDocument.h"
#include "nsISelectionController.h"
#include "nsIPresShell.h"
#include "mozilla/EventListenerManager.h"

View File

@ -32,7 +32,6 @@
#include "mozilla/LoadInfo.h"
#include "mozilla/LoadContext.h"
#include "mozilla/MemoryReporting.h"
#include "nsIDOMDocument.h"
#include "mozilla/dom/ProgressEvent.h"
#include "nsIJARChannel.h"
#include "nsIJARURI.h"
@ -2002,7 +2001,6 @@ XMLHttpRequestMainThread::OnStartRequest(nsIRequest *request, nsISupports *ctxt)
// Create an empty document from it.
const nsAString& emptyStr = EmptyString();
nsCOMPtr<nsIDOMDocument> responseDoc;
nsIGlobalObject* global = DOMEventTargetHelper::GetParentObject();
nsCOMPtr<nsIPrincipal> requestingPrincipal;
@ -2010,13 +2008,12 @@ XMLHttpRequestMainThread::OnStartRequest(nsIRequest *request, nsISupports *ctxt)
GetChannelResultPrincipal(channel, getter_AddRefs(requestingPrincipal));
NS_ENSURE_SUCCESS(rv, rv);
rv = NS_NewDOMDocument(getter_AddRefs(responseDoc),
rv = NS_NewDOMDocument(getter_AddRefs(mResponseXML),
emptyStr, emptyStr, nullptr, docURI,
baseURI, requestingPrincipal, true, global,
mIsHtml ? DocumentFlavorHTML :
DocumentFlavorLegacyGuess);
NS_ENSURE_SUCCESS(rv, rv);
mResponseXML = do_QueryInterface(responseDoc);
mResponseXML->SetChromeXHRDocURI(chromeXHRDocURI);
mResponseXML->SetChromeXHRDocBaseURI(chromeXHRDocBaseURI);

View File

@ -58,7 +58,7 @@ using namespace mozilla::dom;
nsresult
NS_NewDOMDocument(nsIDOMDocument** aInstancePtrResult,
NS_NewDOMDocument(nsIDocument** aInstancePtrResult,
const nsAString& aNamespaceURI,
const nsAString& aQualifiedName,
DocumentType* aDoctype,
@ -184,8 +184,7 @@ NS_NewDOMDocument(nsIDOMDocument** aInstancePtrResult,
}
}
*aInstancePtrResult = doc;
NS_ADDREF(*aInstancePtrResult);
d.forget(aInstancePtrResult);
return NS_OK;
}
@ -211,7 +210,7 @@ NS_NewXMLDocument(nsIDocument** aInstancePtrResult, bool aLoadedAsData,
}
nsresult
NS_NewXBLDocument(nsIDOMDocument** aInstancePtrResult,
NS_NewXBLDocument(nsIDocument** aInstancePtrResult,
nsIURI* aDocumentURI,
nsIURI* aBaseURI,
nsIPrincipal* aPrincipal)
@ -223,14 +222,14 @@ NS_NewXBLDocument(nsIDOMDocument** aInstancePtrResult,
nullptr, DocumentFlavorLegacyGuess);
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsIDocument> idoc = do_QueryInterface(*aInstancePtrResult);
nsIDocument* idoc = *aInstancePtrResult;
// XBL documents must allow XUL and XBL elements in them but the usual check
// only checks if the document is loaded in the system principal which is
// sometimes not the case.
idoc->ForceEnableXULXBL();
nsDocument* doc = static_cast<nsDocument*>(idoc.get());
nsDocument* doc = static_cast<nsDocument*>(idoc);
doc->SetLoadedAsInteractiveData(true);
doc->SetReadyStateInternal(nsIDocument::READYSTATE_COMPLETE);
@ -606,7 +605,7 @@ XMLDocument::DocAddSizeOfExcludingThis(nsWindowSizes& aWindowSizes) const
nsDocument::DocAddSizeOfExcludingThis(aWindowSizes);
}
// nsIDOMDocument interface
// nsIDocument interface
nsresult
XMLDocument::Clone(mozilla::dom::NodeInfo *aNodeInfo, nsINode **aResult,

View File

@ -102,7 +102,7 @@ nsXMLPrettyPrinter::PrettyPrint(nsIDocument* aDocument,
NS_LITERAL_CSTRING("chrome://global/content/xml/XMLPrettyPrint.xsl"));
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsIDOMDocument> xslDocument;
nsCOMPtr<nsIDocument> xslDocument;
rv = nsSyncLoadService::LoadDocument(xslUri, nsIContentPolicy::TYPE_XSLT,
nsContentUtils::GetSystemPrincipal(),
nsILoadInfo::SEC_ALLOW_CROSS_ORIGIN_DATA_IS_NULL,
@ -113,8 +113,7 @@ nsXMLPrettyPrinter::PrettyPrint(nsIDocument* aDocument,
// Transform the document
RefPtr<txMozillaXSLTProcessor> transformer = new txMozillaXSLTProcessor();
ErrorResult err;
nsCOMPtr<nsIDocument> xslDoc = do_QueryInterface(xslDocument);
transformer->ImportStylesheet(*xslDoc, err);
transformer->ImportStylesheet(*xslDocument, err);
if (NS_WARN_IF(err.Failed())) {
return err.StealNSResult();
}

View File

@ -8,7 +8,6 @@
#include "txXPathTreeWalker.h"
#include "nsIDocument.h"
#include "nsIDOMDocument.h"
#include "nsSyncLoadService.h"
#include "nsNetUtil.h"
#include "nsIURI.h"
@ -35,7 +34,7 @@ txParseDocumentFromURI(const nsAString& aHref,
// Raw pointer, we want the resulting txXPathNode to hold a reference to
// the document.
nsIDOMDocument* theDocument = nullptr;
nsIDocument* theDocument = nullptr;
nsAutoSyncOperation sync(loaderDocument);
rv = nsSyncLoadService::LoadDocument(documentURI,
nsIContentPolicy::TYPE_INTERNAL_XMLHTTPREQUEST,

View File

@ -15,7 +15,6 @@
#include "nsError.h"
#include "txURIUtils.h"
#include "nsIDocument.h"
#include "nsIDOMDocument.h"
#include "nsDOMString.h"
#include "nsNameSpaceManager.h"
#include "nsContentUtils.h"

View File

@ -9,7 +9,6 @@
#include "txExprResult.h"
#include "txIXPathContext.h"
#include "nsError.h"
#include "nsIDOMDocument.h"
#include "nsINode.h"
#include "XPathResult.h"
#include "txURIUtils.h"

View File

@ -10,7 +10,6 @@
#include "mozilla/dom/Attr.h"
#include "mozilla/dom/Element.h"
#include "nsIDOMNode.h"
#include "nsIDOMDocument.h"
#include "nsDOMString.h"
#include "txXPathTreeWalker.h"
#include "nsCycleCollectionParticipant.h"

View File

@ -6,7 +6,6 @@
#include "txXPathTreeWalker.h"
#include "nsAtom.h"
#include "nsIAttribute.h"
#include "nsIDOMDocument.h"
#include "nsINode.h"
#include "nsPrintfCString.h"
#include "nsReadableUtils.h"
@ -682,10 +681,9 @@ txXPathNativeNode::createXPathNode(nsINode* aNode, bool aKeepRootAlive)
/* static */
txXPathNode*
txXPathNativeNode::createXPathNode(nsIDOMDocument* aDocument)
txXPathNativeNode::createXPathNode(nsIDocument* aDocument)
{
nsCOMPtr<nsIDocument> document = do_QueryInterface(aDocument);
return new txXPathNode(document);
return new txXPathNode(aDocument);
}
/* static */

View File

@ -12,7 +12,6 @@
#include "nsTArray.h"
class nsAtom;
class nsIDOMDocument;
class txXPathTreeWalker
{
@ -97,7 +96,7 @@ public:
bool aKeepRootAlive = false);
static txXPathNode* createXPathNode(nsIContent* aContent,
bool aKeepRootAlive = false);
static txXPathNode* createXPathNode(nsIDOMDocument* aDocument);
static txXPathNode* createXPathNode(nsIDocument* aDocument);
static nsINode* getNode(const txXPathNode& aNode);
static nsresult getNode(const txXPathNode& aNode, nsIDOMNode** aResult)
{

View File

@ -6,7 +6,6 @@
#include "nsCOMArray.h"
#include "nsIAuthPrompt.h"
#include "nsIDOMNode.h"
#include "nsIDOMDocument.h"
#include "nsIDocument.h"
#include "nsIExpatSink.h"
#include "nsIChannelEventSink.h"
@ -635,7 +634,7 @@ txSyncCompileObserver::loadURI(const nsAString& aUri,
source = mProcessor->GetSourceContentModel();
}
nsAutoSyncOperation sync(source ? source->OwnerDoc() : nullptr);
nsCOMPtr<nsIDOMDocument> document;
nsCOMPtr<nsIDocument> document;
rv = nsSyncLoadService::LoadDocument(uri, nsIContentPolicy::TYPE_XSLT,
referrerPrincipal,
@ -645,8 +644,7 @@ txSyncCompileObserver::loadURI(const nsAString& aUri,
getter_AddRefs(document));
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsIDocument> doc = do_QueryInterface(document);
rv = handleNode(doc, aCompiler);
rv = handleNode(document, aCompiler);
if (NS_FAILED(rv)) {
nsAutoCString spec;
uri->GetSpec(spec);

View File

@ -7,7 +7,6 @@
#include "nsContentCID.h"
#include "nsIContent.h"
#include "nsIDocument.h"
#include "nsIDOMDocument.h"
#include "nsIDocumentTransformer.h"
#include "nsCharsetSource.h"
#include "nsIPrincipal.h"
@ -250,9 +249,9 @@ txMozillaTextOutput::startElement(nsAtom* aPrefix, const nsAString& aName,
return NS_OK;
}
void txMozillaTextOutput::getOutputDocument(nsIDOMDocument** aDocument)
void txMozillaTextOutput::getOutputDocument(nsIDocument** aDocument)
{
CallQueryInterface(mDocument, aDocument);
NS_IF_ADDREF(*aDocument = mDocument);
}
nsresult

View File

@ -7,7 +7,6 @@
#include "nsIDocument.h"
#include "nsIDocShell.h"
#include "nsIDOMDocument.h"
#include "nsIScriptElement.h"
#include "nsCharsetSource.h"
#include "nsIRefreshURI.h"
@ -363,9 +362,9 @@ txMozillaXMLOutput::endElement()
return NS_OK;
}
void txMozillaXMLOutput::getOutputDocument(nsIDOMDocument** aDocument)
void txMozillaXMLOutput::getOutputDocument(nsIDocument** aDocument)
{
CallQueryInterface(mDocument, aDocument);
NS_IF_ADDREF(*aDocument = mDocument);
}
nsresult

View File

@ -17,7 +17,6 @@
#include "mozilla/dom/Element.h"
class nsIContent;
class nsIDOMDocument;
class nsAtom;
class nsITransformObserver;
class nsNodeInfoManager;

View File

@ -9,7 +9,6 @@
#include "nsIChannel.h"
#include "mozilla/dom/Element.h"
#include "nsIDocument.h"
#include "nsIDOMDocument.h"
#include "nsIIOService.h"
#include "nsILoadGroup.h"
#include "nsIStringBundle.h"
@ -677,9 +676,8 @@ txMozillaXSLTProcessor::TransformToDoc(nsIDocument **aResult,
if (aResult) {
txAOutputXMLEventHandler* handler =
static_cast<txAOutputXMLEventHandler*>(es.mOutputHandler);
nsCOMPtr<nsIDOMDocument> result;
handler->getOutputDocument(getter_AddRefs(result));
nsCOMPtr<nsIDocument> doc = do_QueryInterface(result);
nsCOMPtr<nsIDocument> doc;
handler->getOutputDocument(getter_AddRefs(doc));
MOZ_ASSERT(doc->GetReadyStateEnum() ==
nsIDocument::READYSTATE_INTERACTIVE, "Bad readyState");
doc->SetReadyStateInternal(nsIDocument::READYSTATE_COMPLETE);

View File

@ -13,7 +13,7 @@
#define kTXWrapper "transformiix:result"
class txOutputFormat;
class nsIDOMDocument;
class nsIDocument;
/**
* An interface for handling XML documents, loosely modeled
@ -149,11 +149,11 @@ public:
*
* @param aDocument the Mozilla output document
*/
virtual void getOutputDocument(nsIDOMDocument** aDocument) = 0;
virtual void getOutputDocument(nsIDocument** aDocument) = 0;
};
#define TX_DECL_TXAOUTPUTXMLEVENTHANDLER \
virtual void getOutputDocument(nsIDOMDocument** aDocument) override;
virtual void getOutputDocument(nsIDocument** aDocument) override;
/**
* Interface used to create the appropriate outputhandler

View File

@ -1057,7 +1057,7 @@ XULDocument::ResolveForwardReferences()
//----------------------------------------------------------------------
//
// nsIDOMDocument interface
// nsIDocument interface
//
already_AddRefed<nsINodeList>

View File

@ -115,19 +115,6 @@ public:
virtual nsresult Clone(mozilla::dom::NodeInfo *aNodeInfo, nsINode **aResult,
bool aPreallocateChildren) const override;
// nsIDOMDocument interface
using nsDocument::CreateElement;
using nsDocument::CreateElementNS;
NS_FORWARD_NSIDOMDOCUMENT(XMLDocument::)
// And explicitly import the things from nsDocument that we just shadowed
using mozilla::dom::DocumentOrShadowRoot::GetElementById;
using nsDocument::GetImplementation;
using nsDocument::GetTitle;
using nsDocument::SetTitle;
using nsDocument::GetLastStyleSheetSet;
using nsDocument::MozSetImageElement;
using nsIDocument::GetLocation;
// nsICSSLoaderObserver
NS_IMETHOD StyleSheetLoaded(mozilla::StyleSheet* aSheet,
bool aWasAlternate,

View File

@ -13,7 +13,6 @@
#include "nsIContent.h"
#include "nsFocusManager.h"
#include "nsIControllers.h"
#include "nsIDOMDocument.h"
#include "nsIDOMWindow.h"
#include "nsIDocument.h"
#include "nsPresContext.h"

View File

@ -9,7 +9,6 @@
#include "nsDOMString.h"
#include "nsAtom.h"
#include "nsIBaseWindow.h"
#include "nsIDOMDocument.h"
#include "nsIDOMEventListener.h"
#include "nsIDOMXULCommandDispatcher.h"
#include "nsIDOMXULSelectCntrlItemEl.h"

View File

@ -74,7 +74,6 @@
#include "nsAtom.h" // for nsAtom
#include "nsIContent.h" // for nsIContent
#include "nsIDocument.h" // for nsIDocument
#include "nsIDOMDocument.h" // for nsIDOMDocument
#include "nsIDOMEventListener.h" // for nsIDOMEventListener
#include "nsIDOMNode.h" // for nsIDOMNode, etc.
#include "nsIDocumentStateListener.h" // for nsIDocumentStateListener
@ -654,17 +653,10 @@ EditorBase::GetIsDocumentEditable(bool* aIsDocumentEditable)
return NS_OK;
}
already_AddRefed<nsIDOMDocument>
EditorBase::GetDOMDocument()
{
nsCOMPtr<nsIDOMDocument> domDocument = do_QueryInterface(mDocument);
return domDocument.forget();
}
NS_IMETHODIMP
EditorBase::GetDocument(nsIDOMDocument** aDoc)
EditorBase::GetDocument(nsIDocument** aDoc)
{
*aDoc = GetDOMDocument().take();
NS_IF_ADDREF(*aDoc = mDocument);
return *aDoc ? NS_OK : NS_ERROR_NOT_INITIALIZED;
}

View File

@ -39,7 +39,6 @@
class mozInlineSpellChecker;
class nsAtom;
class nsIContent;
class nsIDOMDocument;
class nsIDOMNode;
class nsIDocumentStateListener;
class nsIEditActionListener;
@ -239,7 +238,6 @@ public:
const nsAString& aInitialValue);
bool IsInitialized() const { return !!mDocument; }
already_AddRefed<nsIDOMDocument> GetDOMDocument();
nsIDocument* GetDocument() const { return mDocument; }
nsIPresShell* GetPresShell() const
{

View File

@ -27,7 +27,6 @@
#include "TypeInState.h"
#include "nsHTMLDocument.h"
#include "nsIDOMDocument.h"
#include "nsIDocumentInlines.h"
#include "nsISelectionController.h"
#include "nsILinkHandler.h"

View File

@ -38,7 +38,6 @@ class nsDocumentFragment;
class nsHTMLDocument;
class nsITransferable;
class nsIClipboard;
class nsIDOMDocument;
class nsILinkHandler;
class nsTableWrapperFrame;
class nsIDOMRange;

View File

@ -38,7 +38,6 @@
#include "nsGkAtoms.h"
#include "nsIClipboard.h"
#include "nsIContent.h"
#include "nsIDOMDocument.h"
#include "nsIDOMNode.h"
#include "nsIDocument.h"
#include "nsIFile.h"
@ -177,15 +176,14 @@ HTMLEditor::InsertHTMLWithContext(const nsAString& aInputString,
const nsAString& aContextStr,
const nsAString& aInfoStr,
const nsAString& aFlavor,
nsIDOMDocument* aSourceDoc,
nsIDocument* aSourceDoc,
nsIDOMNode* aDestNode,
int32_t aDestOffset,
bool aDeleteSelection)
{
nsCOMPtr<nsIDocument> sourceDoc = do_QueryInterface(aSourceDoc);
nsCOMPtr<nsINode> destNode = do_QueryInterface(aDestNode);
return DoInsertHTMLWithContext(aInputString, aContextStr, aInfoStr,
aFlavor, sourceDoc, destNode, aDestOffset,
aFlavor, aSourceDoc, destNode, aDestOffset,
aDeleteSelection,
/* trusted input */ true,
/* clear style */ false);

View File

@ -19,6 +19,7 @@ interface nsIEditActionListener;
interface nsIInlineSpellChecker;
interface nsITransferable;
webidl Document;
webidl Element;
webidl Selection;
@ -84,7 +85,7 @@ interface nsIEditor : nsISupports
/**
* the DOM Document this editor is associated with, refcounted.
*/
readonly attribute nsIDOMDocument document;
readonly attribute Document document;
/** the body element, i.e. the root of the editable document.
*/

View File

@ -9,6 +9,7 @@
interface nsIContent;
interface nsIArray;
webidl Document;
webidl Element;
webidl Node;
webidl Selection;
@ -169,7 +170,7 @@ interface nsIHTMLEditor : nsISupports
in AString aContextStr,
in AString aInfoStr,
in AString aFlavor,
in nsIDOMDocument aSourceDoc,
in Document aSourceDoc,
in nsIDOMNode aDestinationNode,
in long aDestinationOffset,
in boolean aDeleteSelection);

View File

@ -6,7 +6,6 @@
#include "mozilla/SVGContextPaint.h"
#include "nsError.h"
#include "nsIDOMDocument.h"
#include "nsString.h"
#include "nsIDocument.h"
#include "nsICategoryManager.h"
@ -361,8 +360,8 @@ gfxSVGGlyphsDocument::ParseDocument(const uint8_t *aBuffer, uint32_t aBufLen)
nsCOMPtr<nsIPrincipal> principal = NullPrincipal::CreateWithoutOriginAttributes();
nsCOMPtr<nsIDOMDocument> domDoc;
rv = NS_NewDOMDocument(getter_AddRefs(domDoc),
nsCOMPtr<nsIDocument> document;
rv = NS_NewDOMDocument(getter_AddRefs(document),
EmptyString(), // aNamespaceURI
EmptyString(), // aQualifiedName
nullptr, // aDoctype
@ -372,11 +371,6 @@ gfxSVGGlyphsDocument::ParseDocument(const uint8_t *aBuffer, uint32_t aBufLen)
DocumentFlavorSVG);
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsIDocument> document(do_QueryInterface(domDoc));
if (!document) {
return NS_ERROR_FAILURE;
}
nsCOMPtr<nsIChannel> channel;
rv = NS_NewInputStreamChannel(getter_AddRefs(channel),
uri,

View File

@ -9,7 +9,6 @@
#include "HalImpl.h"
#include "HalLog.h"
#include "HalSandbox.h"
#include "nsIDOMDocument.h"
#include "nsIDOMWindow.h"
#include "nsIDocument.h"
#include "nsIDocShell.h"

View File

@ -8,10 +8,11 @@
interface imgIRequest;
interface nsIDocument;
interface nsIDOMDocument;
interface nsIProperties;
interface nsIURI;
webidl Document;
/**
* imgICache interface
*
@ -38,7 +39,7 @@ interface imgICache : nsISupports
* @throws NS_ERROR_NOT_AVAILABLE if \a uri was unable to be removed from
* the cache.
*/
[noscript] void removeEntry(in nsIURI uri, [optional] in nsIDOMDocument doc);
[noscript] void removeEntry(in nsIURI uri, [optional] in Document doc);
/**
* Find Properties
@ -57,7 +58,7 @@ interface imgICache : nsISupports
*/
[must_use]
nsIProperties findEntryProperties(in nsIURI uri,
[optional] in nsIDOMDocument doc);
[optional] in Document doc);
/**
* Make this cache instance respect private browsing notifications. This

View File

@ -11,11 +11,12 @@ interface nsIInputStream;
interface imgIContainer;
interface imgILoader;
interface imgICache;
interface nsIDOMDocument;
interface imgIScriptedNotificationObserver;
interface imgINotificationObserver;
interface imgIContainerCallback;
webidl Document;
[scriptable, builtinclass, uuid(4c2383a4-931c-484d-8c4a-973590f66e3f)]
interface imgITools : nsISupports
{
@ -118,7 +119,7 @@ interface imgITools : nsISupports
* @param doc
* A document. Must not be null.
*/
imgILoader getImgLoaderForDocument(in nsIDOMDocument doc);
imgILoader getImgLoaderForDocument(in Document doc);
/**
* getImgLoaderForDocument
@ -130,7 +131,7 @@ interface imgITools : nsISupports
* when there is no way to obtain a relevant document for
* the current context in which a cache is desired.
*/
imgICache getImgCacheForDocument(in nsIDOMDocument doc);
imgICache getImgCacheForDocument(in Document doc);
/**
* encodeCroppedImage

Some files were not shown because too many files have changed in this diff Show More