зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1418076 part 11. Eliminate the nsIDOMHTMLDocument interface. r=mystor
MozReview-Commit-ID: 4lEcUeenbg3
This commit is contained in:
Родитель
5d7b053f45
Коммит
9da3878bc9
|
@ -10,7 +10,6 @@
|
|||
#include "nsIBaseWindow.h"
|
||||
#include "nsIDocShellTreeOwner.h"
|
||||
#include "nsIDocument.h"
|
||||
#include "nsIDOMHTMLDocument.h"
|
||||
#include "nsIDOMHTMLElement.h"
|
||||
#include "nsRange.h"
|
||||
#include "nsIBoxObject.h"
|
||||
|
|
|
@ -38,7 +38,6 @@
|
|||
#include "nsIDOMMouseEvent.h"
|
||||
#include "nsIFormControl.h"
|
||||
#include "nsIDOMHTMLInputElement.h"
|
||||
#include "nsIDOMHTMLDocument.h"
|
||||
#include "nsIImageLoadingContent.h"
|
||||
#include "nsIWebNavigation.h"
|
||||
#include "nsIDOMHTMLElement.h"
|
||||
|
|
|
@ -212,7 +212,6 @@
|
|||
#include "mozilla/AutoRestore.h"
|
||||
#include "mozilla/DebugOnly.h"
|
||||
#include "mozilla/dom/Element.h"
|
||||
#include "nsIDOMHTMLDocument.h"
|
||||
#include "nsUnicodeProperties.h"
|
||||
#include "nsTextFragment.h"
|
||||
#include "nsAttrValue.h"
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
/*
|
||||
* nsBaseContentList is a basic list of content nodes; nsContentList
|
||||
* is a commonly used NodeList implementation (used for
|
||||
* getElementsByTagName, some properties on nsIDOMHTMLDocument, etc).
|
||||
* getElementsByTagName, some properties on HTMLDocument/Document, etc).
|
||||
*/
|
||||
|
||||
#include "nsContentList.h"
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
/*
|
||||
* nsBaseContentList is a basic list of content nodes; nsContentList
|
||||
* is a commonly used NodeList implementation (used for
|
||||
* getElementsByTagName, some properties on nsIDOMHTMLDocument, etc).
|
||||
* getElementsByTagName, some properties on HTMLDocument/Document, etc).
|
||||
*/
|
||||
|
||||
#ifndef nsContentList_h___
|
||||
|
|
|
@ -128,7 +128,6 @@
|
|||
|
||||
#include "nsIScriptContext.h"
|
||||
#include "nsBindingManager.h"
|
||||
#include "nsIDOMHTMLDocument.h"
|
||||
#include "nsHTMLDocument.h"
|
||||
#include "nsIDOMHTMLFormElement.h"
|
||||
#include "nsIRequest.h"
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
#include "mozilla/css/Declaration.h"
|
||||
#include "nsIDocument.h"
|
||||
#include "nsIDocumentEncoder.h"
|
||||
#include "nsIDOMHTMLDocument.h"
|
||||
#include "nsIDOMDocumentFragment.h"
|
||||
#include "nsIDOMHTMLElement.h"
|
||||
#include "nsIDOMWindow.h"
|
||||
|
|
|
@ -208,8 +208,7 @@ NS_IMPL_CYCLE_COLLECTION_INHERITED(nsHTMLDocument, nsDocument,
|
|||
|
||||
NS_IMPL_ISUPPORTS_CYCLE_COLLECTION_INHERITED(nsHTMLDocument,
|
||||
nsDocument,
|
||||
nsIHTMLDocument,
|
||||
nsIDOMHTMLDocument)
|
||||
nsIHTMLDocument)
|
||||
|
||||
JSObject*
|
||||
nsHTMLDocument::WrapNode(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
|
||||
|
@ -881,9 +880,6 @@ nsHTMLDocument::GetUnfocusedKeyEventTarget()
|
|||
return nsDocument::GetUnfocusedKeyEventTarget();
|
||||
}
|
||||
|
||||
//
|
||||
// nsIDOMHTMLDocument interface implementation
|
||||
//
|
||||
already_AddRefed<nsIURI>
|
||||
nsHTMLDocument::GetDomainURI()
|
||||
{
|
||||
|
@ -1303,8 +1299,8 @@ nsHTMLDocument::Open(JSContext* /* unused */,
|
|||
bool aReplace,
|
||||
ErrorResult& rv)
|
||||
{
|
||||
NS_ASSERTION(nsContentUtils::CanCallerAccess(static_cast<nsIDOMHTMLDocument*>(this)),
|
||||
"XOW should have caught this!");
|
||||
MOZ_ASSERT(nsContentUtils::CanCallerAccess(static_cast<nsIDOMDocument*>(this)),
|
||||
"XOW should have caught this!");
|
||||
|
||||
nsCOMPtr<nsPIDOMWindowInner> window = GetInnerWindow();
|
||||
if (!window) {
|
||||
|
@ -1333,8 +1329,8 @@ 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
|
||||
|
||||
NS_ASSERTION(nsContentUtils::CanCallerAccess(static_cast<nsIDOMHTMLDocument*>(this)),
|
||||
"XOW should have caught this!");
|
||||
MOZ_ASSERT(nsContentUtils::CanCallerAccess(static_cast<nsIDOMDocument*>(this)),
|
||||
"XOW should have caught this!");
|
||||
if (!IsHTMLDocument() || mDisableDocWrite) {
|
||||
// No calling document.open() on XHTML
|
||||
aError.Throw(NS_ERROR_DOM_INVALID_STATE_ERR);
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
#include "mozilla/Attributes.h"
|
||||
#include "nsDocument.h"
|
||||
#include "nsIHTMLDocument.h"
|
||||
#include "nsIDOMHTMLDocument.h"
|
||||
#include "nsIHTMLCollection.h"
|
||||
#include "nsIScriptElement.h"
|
||||
#include "nsTArray.h"
|
||||
|
@ -35,8 +34,7 @@ class HTMLAllCollection;
|
|||
} // namespace mozilla
|
||||
|
||||
class nsHTMLDocument : public nsDocument,
|
||||
public nsIHTMLDocument,
|
||||
public nsIDOMHTMLDocument
|
||||
public nsIHTMLDocument
|
||||
{
|
||||
public:
|
||||
using nsDocument::SetDocumentURI;
|
||||
|
@ -94,9 +92,6 @@ public:
|
|||
using nsDocument::GetLastStyleSheetSet;
|
||||
using nsDocument::MozSetImageElement;
|
||||
|
||||
// nsIDOMHTMLDocument interface
|
||||
NS_DECL_NSIDOMHTMLDOCUMENT
|
||||
|
||||
mozilla::dom::HTMLAllCollection* All();
|
||||
|
||||
nsISupports* ResolveName(const nsAString& aName, nsWrapperCache **aCache);
|
||||
|
@ -403,7 +398,6 @@ protected:
|
|||
|
||||
#define NS_HTML_DOCUMENT_INTERFACE_TABLE_BEGIN(_class) \
|
||||
NS_DOCUMENT_INTERFACE_TABLE_BEGIN(_class) \
|
||||
NS_INTERFACE_TABLE_ENTRY(_class, nsIHTMLDocument) \
|
||||
NS_INTERFACE_TABLE_ENTRY(_class, nsIDOMHTMLDocument)
|
||||
NS_INTERFACE_TABLE_ENTRY(_class, nsIHTMLDocument)
|
||||
|
||||
#endif /* nsHTMLDocument_h___ */
|
||||
|
|
|
@ -8,7 +8,6 @@ with Files("**"):
|
|||
BUG_COMPONENT = ("Core", "DOM")
|
||||
|
||||
XPIDL_SOURCES += [
|
||||
'nsIDOMHTMLDocument.idl',
|
||||
'nsIDOMHTMLElement.idl',
|
||||
'nsIDOMHTMLFormElement.idl',
|
||||
'nsIDOMHTMLInputElement.idl',
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "nsIDOMDocument.idl"
|
||||
|
||||
/**
|
||||
* The nsIDOMHTMLDocument interface is the interface to a [X]HTML
|
||||
* document object.
|
||||
*
|
||||
* @see <http://www.whatwg.org/html/>
|
||||
*/
|
||||
|
||||
[uuid(cd31e61f-cfc2-4b91-9385-17b6a2d0633d)]
|
||||
interface nsIDOMHTMLDocument : nsIDOMDocument
|
||||
{
|
||||
};
|
|
@ -18,7 +18,7 @@
|
|||
#include "nsIClassInfoImpl.h"
|
||||
#include "nsIDocShell.h"
|
||||
#include "nsIDocShellTreeItem.h"
|
||||
#include "nsIDOMHTMLDocument.h"
|
||||
#include "nsIDOMDocument.h"
|
||||
#include "nsIDOMHTMLElement.h"
|
||||
#include "nsIDOMNode.h"
|
||||
#include "nsIHttpChannel.h"
|
||||
|
|
|
@ -28,7 +28,6 @@
|
|||
#include "nsIContent.h"
|
||||
#include "nsIDOMComment.h"
|
||||
#include "nsIDOMDocument.h"
|
||||
#include "nsIDOMHTMLDocument.h"
|
||||
#include "nsIDOMHTMLInputElement.h"
|
||||
#include "nsIDOMHTMLMediaElement.h"
|
||||
#include "nsIDOMNode.h"
|
||||
|
|
|
@ -34,7 +34,6 @@
|
|||
#include "nsTableColFrame.h"
|
||||
#include "nsTableRowFrame.h"
|
||||
#include "nsTableCellFrame.h"
|
||||
#include "nsIDOMHTMLDocument.h"
|
||||
#include "nsHTMLParts.h"
|
||||
#include "nsIPresShell.h"
|
||||
#include "nsUnicharUtils.h"
|
||||
|
|
|
@ -31,7 +31,6 @@
|
|||
#include "nsLanguageAtomService.h"
|
||||
#include "mozilla/LookAndFeel.h"
|
||||
#include "nsIInterfaceRequestorUtils.h"
|
||||
#include "nsIDOMHTMLDocument.h"
|
||||
#include "nsHTMLDocument.h"
|
||||
#include "nsIDOMHTMLElement.h"
|
||||
#include "nsIWeakReferenceUtils.h"
|
||||
|
|
|
@ -38,7 +38,6 @@
|
|||
#include "nsIDOMFormData.h"
|
||||
#include "nsIDOMGeoPositionError.h"
|
||||
#include "nsIDOMHistory.h"
|
||||
#include "nsIDOMHTMLDocument.h"
|
||||
#include "nsIDOMHTMLElement.h"
|
||||
#include "nsIDOMHTMLFormElement.h"
|
||||
#include "nsIDOMHTMLInputElement.h"
|
||||
|
@ -126,7 +125,6 @@
|
|||
#include "mozilla/dom/HTMLAnchorElementBinding.h"
|
||||
#include "mozilla/dom/HTMLAreaElementBinding.h"
|
||||
#include "mozilla/dom/HTMLButtonElementBinding.h"
|
||||
#include "mozilla/dom/HTMLDocumentBinding.h"
|
||||
#include "mozilla/dom/HTMLElementBinding.h"
|
||||
#include "mozilla/dom/HTMLFormElementBinding.h"
|
||||
#include "mozilla/dom/HTMLFrameSetElementBinding.h"
|
||||
|
@ -268,7 +266,6 @@ const ComponentsInterfaceShimEntry kComponentsInterfaceShimMap[] =
|
|||
DEFINE_SHIM_WITH_CUSTOM_INTERFACE(nsIFrameLoader, FrameLoader),
|
||||
DEFINE_SHIM_WITH_CUSTOM_INTERFACE(nsIDOMGeoPositionError, PositionError),
|
||||
DEFINE_SHIM(History),
|
||||
DEFINE_SHIM(HTMLDocument),
|
||||
DEFINE_SHIM(HTMLElement),
|
||||
DEFINE_SHIM(HTMLFormElement),
|
||||
DEFINE_SHIM(HTMLInputElement),
|
||||
|
|
Загрузка…
Ссылка в новой задаче