зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1460940 - Clean up most remaining C++-side uses of nsIDOMDocument. r=bz
MozReview-Commit-ID: LKRnyDPNlle --HG-- extra : rebase_source : a48b7c72a0f7ede38c91149a04d5de53987736f1
This commit is contained in:
Родитель
5c8a9e8239
Коммит
c501e3beb0
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -1769,7 +1769,7 @@ nsSHistory::Stop(uint32_t aStopFlags)
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsSHistory::GetDocument(nsIDOMDocument** aDocument)
|
||||
nsSHistory::GetDocument(nsIDocument** aDocument)
|
||||
{
|
||||
// Not implemented
|
||||
return NS_OK;
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
@ -1656,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());
|
||||
}
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -5645,7 +5645,7 @@ nsIDocument::GetController() const
|
|||
}
|
||||
|
||||
//
|
||||
// nsIDOMDocument interface
|
||||
// nsIDocument interface
|
||||
//
|
||||
DocumentType*
|
||||
nsIDocument::GetDoctype() const
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -93,7 +93,6 @@ class nsIDocShell;
|
|||
class nsIDocShellTreeItem;
|
||||
class nsIDocumentEncoder;
|
||||
class nsIDocumentObserver;
|
||||
class nsIDOMDocument;
|
||||
class nsIHTMLCollection;
|
||||
class nsILayoutHistoryState;
|
||||
class nsILoadContext;
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
|
||||
#include "DataTransfer.h"
|
||||
|
||||
#include "nsIDOMDocument.h"
|
||||
#include "nsISupportsPrimitives.h"
|
||||
#include "nsIScriptSecurityManager.h"
|
||||
#include "mozilla/dom/DOMStringList.h"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
|
||||
#include "nsIDocument.h"
|
||||
#include "nsIPluginDocument.h"
|
||||
#include "nsIDOMDocument.h"
|
||||
#include "nsThreadUtils.h"
|
||||
#include "nsIScriptError.h"
|
||||
#include "nsIWidget.h"
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -36,7 +36,6 @@
|
|||
|
||||
#include "nsGenericHTMLElement.h"
|
||||
|
||||
#include "nsIDOMDocument.h"
|
||||
#include "nsIScriptElement.h"
|
||||
|
||||
#include "nsIComponentManager.h"
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -12,7 +12,6 @@
|
|||
|
||||
#include "nsIDOMWindow.h"
|
||||
#include "nsPIDOMWindow.h"
|
||||
#include "nsIDOMDocument.h"
|
||||
#include "nsIScriptObjectPrincipal.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsIServiceManager.h"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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).
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
|
||||
#include "nsISupports.idl"
|
||||
|
||||
interface nsIDOMDocument;
|
||||
interface nsIInputStream;
|
||||
interface nsIOutputStream;
|
||||
interface nsITabParent;
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -605,7 +605,7 @@ XMLDocument::DocAddSizeOfExcludingThis(nsWindowSizes& aWindowSizes) const
|
|||
nsDocument::DocAddSizeOfExcludingThis(aWindowSizes);
|
||||
}
|
||||
|
||||
// nsIDOMDocument interface
|
||||
// nsIDocument interface
|
||||
|
||||
nsresult
|
||||
XMLDocument::Clone(mozilla::dom::NodeInfo *aNodeInfo, nsINode **aResult,
|
||||
|
|
|
@ -1057,7 +1057,7 @@ XULDocument::ResolveForwardReferences()
|
|||
|
||||
//----------------------------------------------------------------------
|
||||
//
|
||||
// nsIDOMDocument interface
|
||||
// nsIDocument interface
|
||||
//
|
||||
|
||||
already_AddRefed<nsINodeList>
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
#include "WrapperFactory.h"
|
||||
|
||||
#include "nsIDocShellTreeItem.h"
|
||||
#include "nsIDOMDocument.h"
|
||||
#include "nsIDocument.h"
|
||||
|
||||
using namespace js;
|
||||
using namespace JS;
|
||||
|
@ -1110,7 +1110,7 @@ GetRemoteObjectTag(JS::Handle<JSObject*> obj)
|
|||
if (treeItem)
|
||||
return NS_LITERAL_CSTRING("ContentDocShellTreeItem");
|
||||
|
||||
nsCOMPtr<nsIDOMDocument> doc(do_QueryInterface(supports));
|
||||
nsCOMPtr<nsIDocument> doc(do_QueryInterface(supports));
|
||||
if (doc)
|
||||
return NS_LITERAL_CSTRING("ContentDocument");
|
||||
}
|
||||
|
|
|
@ -1836,10 +1836,12 @@ nsDocumentViewer::Stop(void)
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDocumentViewer::GetDOMDocument(nsISupports **aResult)
|
||||
nsDocumentViewer::GetDOMDocument(nsIDocument **aResult)
|
||||
{
|
||||
NS_ENSURE_TRUE(mDocument, NS_ERROR_NOT_AVAILABLE);
|
||||
return CallQueryInterface(mDocument, aResult);
|
||||
nsCOMPtr<nsIDocument> document = mDocument;
|
||||
document.forget(aResult);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsIDocument*
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
#include "gfxContext.h"
|
||||
#include "nsReadableUtils.h"
|
||||
#include "nsIComponentManager.h"
|
||||
#include "nsIDOMDocument.h"
|
||||
#include "nsIDOMWindow.h"
|
||||
#include "nsIInterfaceRequestor.h"
|
||||
#include "nsIInterfaceRequestorUtils.h"
|
||||
|
@ -748,7 +747,7 @@ nsWebBrowser::GetSessionHistoryXPCOM(nsISupports** aSessionHistory)
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsWebBrowser::GetDocument(nsIDOMDocument** aDocument)
|
||||
nsWebBrowser::GetDocument(nsIDocument** aDocument)
|
||||
{
|
||||
NS_ENSURE_STATE(mDocShell);
|
||||
|
||||
|
@ -1101,7 +1100,7 @@ nsWebBrowser::SaveDocument(nsISupports* aDocumentish,
|
|||
if (aDocumentish) {
|
||||
doc = aDocumentish;
|
||||
} else {
|
||||
nsCOMPtr<nsIDOMDocument> domDoc;
|
||||
nsCOMPtr<nsIDocument> domDoc;
|
||||
GetDocument(getter_AddRefs(domDoc));
|
||||
doc = domDoc.forget();
|
||||
}
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
#include "nsGkAtoms.h"
|
||||
#include "nsIChannel.h"
|
||||
#include "nsIContentPolicy.h"
|
||||
#include "nsIDOMDocument.h"
|
||||
#include "nsIDocument.h"
|
||||
#include "nsILoadInfo.h"
|
||||
#include "nsIXULRuntime.h"
|
||||
|
|
|
@ -29,7 +29,6 @@
|
|||
#include "nsIFrame.h"
|
||||
#include "nsFrameTraversal.h"
|
||||
#include "nsIImageDocument.h"
|
||||
#include "nsIDOMDocument.h"
|
||||
#include "nsIDocument.h"
|
||||
#include "nsIContent.h"
|
||||
#include "nsTextFragment.h"
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
#include "nsIDocShellTreeOwner.h"
|
||||
#include "nsIDocumentLoader.h"
|
||||
#include "nsIDocument.h"
|
||||
#include "nsIDOMDocument.h"
|
||||
#include "nsIDOMWindow.h"
|
||||
#include "nsIDOMChromeWindow.h"
|
||||
#include "nsIPrompt.h"
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
#include "mozilla/dom/Element.h"
|
||||
#include "nsIWidget.h"
|
||||
#include "nsIDocument.h"
|
||||
#include "nsIDOMDocument.h"
|
||||
|
||||
#include "nsINode.h"
|
||||
|
||||
|
|
|
@ -15,7 +15,6 @@
|
|||
#include "nsGkAtoms.h"
|
||||
#include "nsGlobalWindowInner.h"
|
||||
#include "nsIDocument.h"
|
||||
#include "nsIDOMDocument.h"
|
||||
#include "nsPIDOMWindow.h"
|
||||
#include "nsQueryObject.h"
|
||||
#include "mozilla/dom/XULCommandEvent.h"
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
|
||||
#include "nsIDocument.h"
|
||||
#include "nsIContent.h"
|
||||
#include "nsIDOMDocument.h"
|
||||
#include "nsIDocumentObserver.h"
|
||||
#include "nsIComponentManager.h"
|
||||
#include "nsIRollupListener.h"
|
||||
|
|
|
@ -36,7 +36,6 @@
|
|||
#include "mozilla/BrowserElementParent.h"
|
||||
#include "nsIDocShellLoadInfo.h"
|
||||
|
||||
#include "nsIDOMDocument.h"
|
||||
#include "nsIScriptObjectPrincipal.h"
|
||||
#include "nsIURI.h"
|
||||
#include "nsIDocument.h"
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
#include "nsIServiceManager.h"
|
||||
#include "nsIContentViewer.h"
|
||||
#include "nsIDocument.h"
|
||||
#include "nsIDOMDocument.h"
|
||||
#include "nsPIDOMWindow.h"
|
||||
#include "nsScreen.h"
|
||||
#include "nsIEmbeddingSiteWindow.h"
|
||||
|
|
Загрузка…
Ссылка в новой задаче