diff --git a/devtools/client/shared/widgets/VariablesView.jsm b/devtools/client/shared/widgets/VariablesView.jsm index fb72b34d9113..e3f176f6b8f4 100644 --- a/devtools/client/shared/widgets/VariablesView.jsm +++ b/devtools/client/shared/widgets/VariablesView.jsm @@ -986,7 +986,7 @@ VariablesView.prototype = { /** * Gets the owner document holding this view. - * @return nsIHTMLDocument + * @return HTMLDocument */ get document() { return this._document || (this._document = this._parent.ownerDocument); @@ -2048,7 +2048,7 @@ Scope.prototype = { /** * Gets the owner document holding this scope. - * @return nsIHTMLDocument + * @return HTMLDocument */ get document() { return this._document || (this._document = this.ownerView.document); diff --git a/docshell/base/nsDocShellEditorData.h b/docshell/base/nsDocShellEditorData.h index 03a981e3a4e9..5bbb140aa586 100644 --- a/docshell/base/nsDocShellEditorData.h +++ b/docshell/base/nsDocShellEditorData.h @@ -45,7 +45,7 @@ class nsDocShellEditorData { // If this frame is editable, store HTML editor here. It's owned here. RefPtr mHTMLEditor; - // Backup for the corresponding nsIHTMLDocument's editing state while + // Backup for the corresponding HTMLDocument's editing state while // the editor is detached. mozilla::dom::Document::EditingState mDetachedEditingState; diff --git a/dom/base/WindowNamedPropertiesHandler.cpp b/dom/base/WindowNamedPropertiesHandler.cpp index 936d7cab109f..623b36b0683c 100644 --- a/dom/base/WindowNamedPropertiesHandler.cpp +++ b/dom/base/WindowNamedPropertiesHandler.cpp @@ -117,11 +117,11 @@ bool WindowNamedPropertiesHandler::getOwnPropDescriptor( } // The rest of this function is for HTML documents only. - nsCOMPtr htmlDoc = do_QueryInterface(win->GetExtantDoc()); - if (!htmlDoc) { + Document* doc = win->GetExtantDoc(); + if (!doc || !doc->IsHTMLOrXHTML()) { return true; } - nsHTMLDocument* document = static_cast(htmlDoc.get()); + nsHTMLDocument* document = doc->AsHTMLDocument(); JS::Rooted v(aCx); Element* element = document->GetElementById(str); @@ -197,11 +197,11 @@ bool WindowNamedPropertiesHandler::ownPropNames( } names.Clear(); - nsCOMPtr htmlDoc = do_QueryInterface(win->GetExtantDoc()); - if (!htmlDoc) { + Document* doc = win->GetExtantDoc(); + if (!doc || !doc->IsHTMLOrXHTML()) { return true; } - nsHTMLDocument* document = static_cast(htmlDoc.get()); + nsHTMLDocument* document = doc->AsHTMLDocument(); // Document names are enumerable, so we want to get them no matter what flags // is. document->GetSupportedNames(names); diff --git a/dom/base/nsContentUtils.cpp b/dom/base/nsContentUtils.cpp index 6aba9d135898..3de975c98582 100644 --- a/dom/base/nsContentUtils.cpp +++ b/dom/base/nsContentUtils.cpp @@ -158,7 +158,6 @@ #include "nsIForm.h" #include "nsIFragmentContentSink.h" #include "nsContainerFrame.h" -#include "nsIHTMLDocument.h" #include "nsIHttpChannelInternal.h" #include "nsIIdleService.h" #include "nsIImageLoadingContent.h" @@ -2656,14 +2655,13 @@ nsresult nsContentUtils::GenerateStateKey(nsIContent* aContent, return NS_OK; } - nsCOMPtr htmlDocument = - do_QueryInterface(aContent->GetUncomposedDoc()); + RefPtr doc = aContent->GetUncomposedDoc(); KeyAppendInt(partID, aKey); // first append a partID bool generatedUniqueKey = false; - if (htmlDocument) { - nsHTMLDocument* htmlDoc = static_cast(htmlDocument.get()); + if (doc && doc->IsHTMLOrXHTML()) { + nsHTMLDocument* htmlDoc = doc->AsHTMLDocument(); RefPtr htmlForms; RefPtr htmlFormControls; htmlDoc->GetFormsAndFormControls(getter_AddRefs(htmlForms), @@ -2708,7 +2706,7 @@ nsresult nsContentUtils::GenerateStateKey(nsIContent* aContent, // highly likely guess that the highest form parsed so far is the one. // This code should not be on trunk, only branch. // - index = htmlDocument->GetNumFormsSynchronous() - 1; + index = htmlDoc->GetNumFormsSynchronous() - 1; } if (index > -1) { KeyAppendInt(index, aKey); @@ -4520,10 +4518,6 @@ already_AddRefed nsContentUtils::CreateContextualFragment( // for compiling event handlers... so just bail out. RefPtr document = aContextNode->OwnerDoc(); bool isHTML = document->IsHTMLDocument(); -#ifdef DEBUG - nsCOMPtr htmlDoc = do_QueryInterface(document); - NS_ASSERTION(!isHTML || htmlDoc, "Should have HTMLDocument here!"); -#endif if (isHTML) { RefPtr frag = diff --git a/dom/base/nsCopySupport.cpp b/dom/base/nsCopySupport.cpp index f3fab379d163..9d1d901e72b8 100644 --- a/dom/base/nsCopySupport.cpp +++ b/dom/base/nsCopySupport.cpp @@ -28,7 +28,7 @@ #include "nsPIDOMWindow.h" #include "mozilla/dom/Document.h" -#include "nsIHTMLDocument.h" +#include "nsHTMLDocument.h" #include "nsGkAtoms.h" #include "nsIFrame.h" #include "nsIURI.h" @@ -122,10 +122,9 @@ static nsresult EncodeForTextUnicode(nsIDocumentEncoder& aEncoder, if (!selForcedTextPlain && mimeType.EqualsLiteral(kTextMime)) { // SetSelection and EncodeToString use this case to signal that text/plain - // was forced because the document is either not an nsIHTMLDocument or it's - // XHTML. We want to pretty print XHTML but not non-nsIHTMLDocuments. - nsCOMPtr htmlDoc = do_QueryInterface(&aDocument); - if (!htmlDoc) { + // was forced because the document is either not an HTMLDocument or it's + // XHTML. We want to pretty print XHTML but not non-HTMLDocuments. + if (!aDocument.IsHTMLOrXHTML()) { selForcedTextPlain = true; } } @@ -562,10 +561,6 @@ static nsresult AppendDOMNode(nsITransferable* aTransferable, // Note that XHTML is not counted as HTML here, because we can't copy it // properly (all the copy code for non-plaintext assumes using HTML // serializers and parsers is OK, and those mess up XHTML). - DebugOnly> htmlDoc = - nsCOMPtr(do_QueryInterface(document, &rv)); - NS_ENSURE_SUCCESS(rv, NS_OK); - NS_ENSURE_TRUE(document->IsHTMLDocument(), NS_OK); // init encoder with document and node diff --git a/dom/base/nsDocumentEncoder.cpp b/dom/base/nsDocumentEncoder.cpp index 232aed180008..cb40936b3271 100644 --- a/dom/base/nsDocumentEncoder.cpp +++ b/dom/base/nsDocumentEncoder.cpp @@ -17,13 +17,13 @@ #include "nsIFactory.h" #include "nsISupports.h" #include "mozilla/dom/Document.h" -#include "nsIHTMLDocument.h" #include "nsCOMPtr.h" #include "nsIContentSerializer.h" #include "mozilla/Encoding.h" #include "nsIOutputStream.h" #include "nsRange.h" #include "nsGkAtoms.h" +#include "nsHTMLDocument.h" #include "nsIContent.h" #include "nsIScriptContext.h" #include "nsIScriptGlobalObject.h" @@ -1347,8 +1347,7 @@ nsHTMLCopyEncoder::SetSelection(Selection* aSelection) { // XXX bug 1245883 // also consider ourselves in a text widget if we can't find an html document - nsCOMPtr htmlDoc = do_QueryInterface(mDocument); - if (!(htmlDoc && mDocument->IsHTMLDocument())) { + if (!(mDocument && mDocument->IsHTMLDocument())) { mIsTextWidget = true; mEncodingScope.mSelection = aSelection; // mMimeType is set to text/plain when encoding starts. diff --git a/dom/base/nsFocusManager.cpp b/dom/base/nsFocusManager.cpp index 82b7fcd61e28..a8ae3249121a 100644 --- a/dom/base/nsFocusManager.cpp +++ b/dom/base/nsFocusManager.cpp @@ -16,7 +16,6 @@ #include "ContentParent.h" #include "nsPIDOMWindow.h" #include "nsIDOMChromeWindow.h" -#include "nsIHTMLDocument.h" #include "nsIDocShell.h" #include "nsIDocShellTreeOwner.h" #include "nsIFormControl.h" @@ -40,6 +39,7 @@ #include "nsStyleCoord.h" #include "BrowserChild.h" #include "nsFrameLoader.h" +#include "nsHTMLDocument.h" #include "nsNumberControlFrame.h" #include "nsNetUtil.h" #include "nsRange.h" @@ -3839,8 +3839,7 @@ Element* nsFocusManager::GetRootForFocus(nsPIDOMWindowOuter* aWindow, } // Finally, check if this is a frameset - nsCOMPtr htmlDoc = do_QueryInterface(aDocument); - if (htmlDoc) { + if (aDocument && aDocument->IsHTMLOrXHTML()) { Element* htmlChild = aDocument->GetHtmlChildElement(nsGkAtoms::frameset); if (htmlChild) { // In document navigation mode, return the frameset so that navigation diff --git a/dom/html/HTMLFormElement.cpp b/dom/html/HTMLFormElement.cpp index 9cf8a526a086..65e4fac99c64 100644 --- a/dom/html/HTMLFormElement.cpp +++ b/dom/html/HTMLFormElement.cpp @@ -18,8 +18,8 @@ #include "mozilla/dom/HTMLFormControlsCollection.h" #include "mozilla/dom/HTMLFormElementBinding.h" #include "mozilla/Move.h" -#include "nsIHTMLDocument.h" #include "nsGkAtoms.h" +#include "nsHTMLDocument.h" #include "nsStyleConsts.h" #include "nsPresContext.h" #include "mozilla/dom/Document.h" @@ -358,7 +358,7 @@ static void CollectOrphans(nsINode* aRemovalRoot, void HTMLFormElement::UnbindFromTree(bool aNullParent) { // Note, this is explicitly using uncomposed doc, since we count // only forms in document. - nsCOMPtr oldDocument = do_QueryInterface(GetUncomposedDoc()); + RefPtr oldDocument = GetUncomposedDoc(); // Mark all of our controls as maybe being orphans MarkOrphans(mControls->mElements); @@ -396,8 +396,8 @@ void HTMLFormElement::UnbindFromTree(bool aNullParent) { #endif ); - if (oldDocument) { - oldDocument->RemovedForm(); + if (oldDocument && oldDocument->IsHTMLOrXHTML()) { + oldDocument->AsHTMLDocument()->RemovedForm(); } ForgetCurrentSubmission(); } @@ -1483,8 +1483,7 @@ nsresult HTMLFormElement::GetActionURL(nsIURI** aActionURL, nsCOMPtr actionURL; if (action.IsEmpty()) { - nsCOMPtr htmlDoc(do_QueryInterface(document)); - if (!htmlDoc) { + if (!document->IsHTMLOrXHTML()) { // Must be a XML, XUL or other non-HTML document type // so do nothing. return NS_OK; diff --git a/dom/html/moz.build b/dom/html/moz.build index 7ac525b06f47..4fececd4eba8 100644 --- a/dom/html/moz.build +++ b/dom/html/moz.build @@ -39,7 +39,6 @@ EXPORTS += [ 'nsIFormControl.h', 'nsIFormProcessor.h', 'nsIHTMLCollection.h', - 'nsIHTMLDocument.h', 'nsIRadioGroupContainer.h', 'nsIRadioVisitor.h', 'nsITextControlElement.h', diff --git a/dom/html/nsGenericHTMLElement.cpp b/dom/html/nsGenericHTMLElement.cpp index ac272e68457f..ca1ef2ab5237 100644 --- a/dom/html/nsGenericHTMLElement.cpp +++ b/dom/html/nsGenericHTMLElement.cpp @@ -32,7 +32,6 @@ #include "nsIDOMWindow.h" #include "nsMappedAttributes.h" #include "nsHTMLStyleSheet.h" -#include "nsIHTMLDocument.h" #include "nsPIDOMWindow.h" #include "nsIURL.h" #include "nsEscape.h" diff --git a/dom/html/nsHTMLContentSink.cpp b/dom/html/nsHTMLContentSink.cpp index 41c39b9a3a0a..e9460e45c8d0 100644 --- a/dom/html/nsHTMLContentSink.cpp +++ b/dom/html/nsHTMLContentSink.cpp @@ -49,7 +49,7 @@ #include "nsIDocShell.h" #include "mozilla/dom/Document.h" #include "nsStubDocumentObserver.h" -#include "nsIHTMLDocument.h" +#include "nsHTMLDocument.h" #include "nsICookieService.h" #include "nsTArray.h" #include "nsIScriptSecurityManager.h" @@ -137,7 +137,7 @@ class HTMLContentSink : public nsContentSink, public nsIHTMLContentSink { protected: virtual ~HTMLContentSink(); - nsCOMPtr mHTMLDocument; + RefPtr mHTMLDocument; // The maximum length of a text run int32_t mMaxTextRun; @@ -612,7 +612,7 @@ nsresult HTMLContentSink::Init(Document* aDoc, nsIURI* aURI, aDoc->AddObserver(this); mIsDocumentObserver = true; - mHTMLDocument = do_QueryInterface(aDoc); + mHTMLDocument = aDoc->AsHTMLDocument(); NS_ASSERTION(mDocShell, "oops no docshell!"); @@ -960,6 +960,6 @@ void HTMLContentSink::ContinueInterruptedParsingAsync() { "HTMLContentSink::ContinueInterruptedParsingIfEnabled", this, &HTMLContentSink::ContinueInterruptedParsingIfEnabled); - nsCOMPtr doc = do_QueryInterface(mHTMLDocument); + RefPtr doc = mHTMLDocument; doc->Dispatch(mozilla::TaskCategory::Other, ev.forget()); } diff --git a/dom/html/nsHTMLDocument.cpp b/dom/html/nsHTMLDocument.cpp index ea8df551c317..e8bcd56d8783 100644 --- a/dom/html/nsHTMLDocument.cpp +++ b/dom/html/nsHTMLDocument.cpp @@ -160,8 +160,7 @@ nsHTMLDocument::~nsHTMLDocument() {} NS_IMPL_CYCLE_COLLECTION_INHERITED(nsHTMLDocument, Document, mAll) -NS_IMPL_ISUPPORTS_CYCLE_COLLECTION_INHERITED(nsHTMLDocument, Document, - nsIHTMLDocument) +NS_IMPL_ISUPPORTS_CYCLE_COLLECTION_INHERITED_0(nsHTMLDocument, Document) JSObject* nsHTMLDocument::WrapNode(JSContext* aCx, JS::Handle aGivenProto) { diff --git a/dom/html/nsHTMLDocument.h b/dom/html/nsHTMLDocument.h index 9423015f9613..125213a8f398 100644 --- a/dom/html/nsHTMLDocument.h +++ b/dom/html/nsHTMLDocument.h @@ -9,7 +9,6 @@ #include "mozilla/Attributes.h" #include "nsContentList.h" #include "mozilla/dom/Document.h" -#include "nsIHTMLDocument.h" #include "nsIHTMLCollection.h" #include "nsIScriptElement.h" #include "nsTArray.h" @@ -35,7 +34,7 @@ class WindowProxyHolder; } // namespace dom } // namespace mozilla -class nsHTMLDocument : public mozilla::dom::Document, public nsIHTMLDocument { +class nsHTMLDocument : public mozilla::dom::Document { protected: typedef mozilla::net::ReferrerPolicy ReferrerPolicy; typedef mozilla::dom::Document Document; @@ -70,7 +69,6 @@ class nsHTMLDocument : public mozilla::dom::Document, public nsIHTMLDocument { virtual bool UseWidthDeviceWidthFallbackViewport() const override; public: - // nsIHTMLDocument virtual Element* GetUnfocusedKeyEventTarget() override; nsContentList* GetExistingForms() const { return mForms; } @@ -82,9 +80,23 @@ class nsHTMLDocument : public mozilla::dom::Document, public nsIHTMLDocument { JS::MutableHandle aRetval, mozilla::ErrorResult& aError); - virtual void AddedForm() override; - virtual void RemovedForm() override; - virtual int32_t GetNumFormsSynchronous() override; + /** + * Called when form->BindToTree() is called so that document knows + * immediately when a form is added + */ + void AddedForm(); + /** + * Called when form->SetDocument() is called so that document knows + * immediately when a form is removed + */ + void RemovedForm(); + /** + * Called to get a better count of forms than document.forms can provide + * without calling FlushPendingNotifications (bug 138892). + */ + // XXXbz is this still needed now that we can flush just content, + // not the rest? + int32_t GetNumFormsSynchronous(); void SetIsXHTML(bool aXHTML) { mType = (aXHTML ? eXHTML : eHTML); } virtual nsresult Clone(mozilla::dom::NodeInfo*, @@ -217,8 +229,4 @@ inline nsHTMLDocument* Document::AsHTMLDocument() { } // namespace dom } // namespace mozilla -#define NS_HTML_DOCUMENT_INTERFACE_TABLE_BEGIN(_class) \ - NS_DOCUMENT_INTERFACE_TABLE_BEGIN(_class) \ - NS_INTERFACE_TABLE_ENTRY(_class, nsIHTMLDocument) - #endif /* nsHTMLDocument_h___ */ diff --git a/dom/html/nsIHTMLDocument.h b/dom/html/nsIHTMLDocument.h deleted file mode 100644 index 0e54a2fa8681..000000000000 --- a/dom/html/nsIHTMLDocument.h +++ /dev/null @@ -1,51 +0,0 @@ -/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* vim: set ts=8 sts=2 et sw=2 tw=80: */ -/* 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/. */ - -#ifndef nsIHTMLDocument_h -#define nsIHTMLDocument_h - -#include "nsISupports.h" -#include "nsCompatibility.h" - -class nsIContent; -class nsContentList; - -#define NS_IHTMLDOCUMENT_IID \ - { \ - 0xcf814492, 0x303c, 0x4718, { \ - 0x9a, 0x3e, 0x39, 0xbc, 0xd5, 0x2c, 0x10, 0xdb \ - } \ - } - -/** - * HTML document extensions to Document. - */ -class nsIHTMLDocument : public nsISupports { - public: - NS_DECLARE_STATIC_IID_ACCESSOR(NS_IHTMLDOCUMENT_IID) - - /** - * Called when form->BindToTree() is called so that document knows - * immediately when a form is added - */ - virtual void AddedForm() = 0; - /** - * Called when form->SetDocument() is called so that document knows - * immediately when a form is removed - */ - virtual void RemovedForm() = 0; - /** - * Called to get a better count of forms than document.forms can provide - * without calling FlushPendingNotifications (bug 138892). - */ - // XXXbz is this still needed now that we can flush just content, - // not the rest? - virtual int32_t GetNumFormsSynchronous() = 0; -}; - -NS_DEFINE_STATIC_IID_ACCESSOR(nsIHTMLDocument, NS_IHTMLDOCUMENT_IID) - -#endif /* nsIHTMLDocument_h */ diff --git a/dom/prototype/PrototypeDocumentContentSink.cpp b/dom/prototype/PrototypeDocumentContentSink.cpp index 2c5741f604c1..dc7e00c115ab 100644 --- a/dom/prototype/PrototypeDocumentContentSink.cpp +++ b/dom/prototype/PrototypeDocumentContentSink.cpp @@ -45,7 +45,6 @@ #include "nsError.h" #include "nsNodeUtils.h" #include "nsIScriptGlobalObject.h" -#include "nsIHTMLDocument.h" #include "mozAutoDocUpdate.h" #include "nsMimeTypes.h" #include "nsHtml5SVGLoadDispatcher.h" diff --git a/dom/xhr/XMLHttpRequestMainThread.cpp b/dom/xhr/XMLHttpRequestMainThread.cpp index ba070b657cde..28a9a0f72bde 100644 --- a/dom/xhr/XMLHttpRequestMainThread.cpp +++ b/dom/xhr/XMLHttpRequestMainThread.cpp @@ -67,7 +67,6 @@ #include "nsContentUtils.h" #include "nsCycleCollectionParticipant.h" #include "nsError.h" -#include "nsIHTMLDocument.h" #include "nsIStorageStream.h" #include "nsIPromptFactory.h" #include "nsIWindowWatcher.h" diff --git a/dom/xml/nsXMLContentSink.cpp b/dom/xml/nsXMLContentSink.cpp index 8ad71fcb360a..57a05ea39a25 100644 --- a/dom/xml/nsXMLContentSink.cpp +++ b/dom/xml/nsXMLContentSink.cpp @@ -45,7 +45,6 @@ #include "nsError.h" #include "nsNodeUtils.h" #include "nsIScriptGlobalObject.h" -#include "nsIHTMLDocument.h" #include "mozAutoDocUpdate.h" #include "nsMimeTypes.h" #include "nsHtml5SVGLoadDispatcher.h" diff --git a/dom/xslt/xslt/txMozillaXMLOutput.cpp b/dom/xslt/xslt/txMozillaXMLOutput.cpp index dbb703e34978..80f79adfb13d 100644 --- a/dom/xslt/xslt/txMozillaXMLOutput.cpp +++ b/dom/xslt/xslt/txMozillaXMLOutput.cpp @@ -20,7 +20,6 @@ #include "nsNameSpaceManager.h" #include "txStringUtils.h" #include "txURIUtils.h" -#include "nsIHTMLDocument.h" #include "nsIStyleSheetLinkingElement.h" #include "nsIDocumentTransformer.h" #include "mozilla/StyleSheetInlines.h" diff --git a/editor/composer/nsEditingSession.cpp b/editor/composer/nsEditingSession.cpp index 4c2051561220..aeed721ea5ea 100644 --- a/editor/composer/nsEditingSession.cpp +++ b/editor/composer/nsEditingSession.cpp @@ -30,7 +30,6 @@ #include "mozilla/dom/Document.h" // for Document #include "nsIDocumentStateListener.h" #include "nsIEditor.h" // for nsIEditor -#include "nsIHTMLDocument.h" // for nsIHTMLDocument, etc #include "nsIInterfaceRequestorUtils.h" // for do_GetInterface #include "nsIPlaintextEditor.h" // for nsIPlaintextEditor, etc #include "nsIRefreshURI.h" // for nsIRefreshURI diff --git a/editor/libeditor/EditorBase.cpp b/editor/libeditor/EditorBase.cpp index 38c8de17044f..6873e5b446d5 100644 --- a/editor/libeditor/EditorBase.cpp +++ b/editor/libeditor/EditorBase.cpp @@ -83,7 +83,6 @@ #include "nsIEditorObserver.h" // for nsIEditorObserver #include "nsIEditorSpellCheck.h" // for nsIEditorSpellCheck #include "nsIFrame.h" // for nsIFrame -#include "nsIHTMLDocument.h" // for nsIHTMLDocument #include "nsIInlineSpellChecker.h" // for nsIInlineSpellChecker, etc. #include "nsNameSpaceManager.h" // for kNameSpaceID_None, etc. #include "nsINode.h" // for nsINode, etc. diff --git a/layout/generic/nsGfxScrollFrame.cpp b/layout/generic/nsGfxScrollFrame.cpp index c3a2f9962a9a..5b6d5e4dccec 100644 --- a/layout/generic/nsGfxScrollFrame.cpp +++ b/layout/generic/nsGfxScrollFrame.cpp @@ -31,8 +31,8 @@ #include "nsNodeInfoManager.h" #include "nsContentCreatorFunctions.h" #include "mozilla/PresState.h" -#include "nsIHTMLDocument.h" #include "nsContentUtils.h" +#include "nsHTMLDocument.h" #include "nsLayoutUtils.h" #include "nsBidiPresUtils.h" #include "nsBidiUtils.h" @@ -5331,8 +5331,7 @@ nsIFrame* ScrollFrameHelper::GetFrameForDir() const { Element* root = document->GetRootElement(); // But for HTML and XHTML we want the body element. - nsCOMPtr htmlDoc = do_QueryInterface(document); - if (htmlDoc) { + if (document && document->IsHTMLOrXHTML()) { Element* bodyElement = document->GetBodyElement(); if (bodyElement) { root = bodyElement; // we can trust the document to hold on to it diff --git a/parser/html/nsHtml5DocumentBuilder.cpp b/parser/html/nsHtml5DocumentBuilder.cpp index 94470092238f..9400aab4fe91 100644 --- a/parser/html/nsHtml5DocumentBuilder.cpp +++ b/parser/html/nsHtml5DocumentBuilder.cpp @@ -7,7 +7,6 @@ #include "nsHtml5DocumentBuilder.h" #include "mozilla/dom/ScriptLoader.h" -#include "nsIHTMLDocument.h" #include "nsIStyleSheetLinkingElement.h" #include "nsNameSpaceManager.h" #include "nsStyleLinkElement.h" diff --git a/parser/html/nsHtml5OplessBuilder.cpp b/parser/html/nsHtml5OplessBuilder.cpp index a6058764f96d..60bbe72928d6 100644 --- a/parser/html/nsHtml5OplessBuilder.cpp +++ b/parser/html/nsHtml5OplessBuilder.cpp @@ -9,7 +9,6 @@ #include "mozilla/css/Loader.h" #include "mozilla/dom/ScriptLoader.h" #include "nsIDocShell.h" -#include "nsIHTMLDocument.h" nsHtml5OplessBuilder::nsHtml5OplessBuilder() : nsHtml5DocumentBuilder(true) {} diff --git a/parser/html/nsHtml5TreeOpExecutor.cpp b/parser/html/nsHtml5TreeOpExecutor.cpp index 93763dd78b83..d543c9a57e8e 100644 --- a/parser/html/nsHtml5TreeOpExecutor.cpp +++ b/parser/html/nsHtml5TreeOpExecutor.cpp @@ -29,7 +29,6 @@ #include "nsIContentViewer.h" #include "nsIDocShell.h" #include "nsIDocShellTreeItem.h" -#include "nsIHTMLDocument.h" #include "nsINestedURI.h" #include "nsIScriptContext.h" #include "nsIScriptError.h" diff --git a/parser/html/nsHtml5TreeOperation.cpp b/parser/html/nsHtml5TreeOperation.cpp index 6cd8f0cf6cc4..af7ee7ef53e8 100644 --- a/parser/html/nsHtml5TreeOperation.cpp +++ b/parser/html/nsHtml5TreeOperation.cpp @@ -28,7 +28,6 @@ #include "nsIDTD.h" #include "nsIFormControl.h" #include "nsIFormProcessor.h" -#include "nsIHTMLDocument.h" #include "nsIMutationObserver.h" #include "nsINode.h" #include "nsIObserverService.h"