Bug 1418076 part 8. Remove remaining, unused, nsIDOMHTMLDocument methods. r=mystor.
authorBoris Zbarsky <bzbarsky@mit.edu>
Fri, 26 Jan 2018 01:01:16 -0500
changeset 748760 25a8a0f535be83514061a70c624b478d0975f6fe
parent 748759 271000186433a9b754a843f55b5c8f8a08f60676
child 748761 60a9954c827b4d84c1e30da79f6cb6ad44d4735e
push id97228
push usersfraser@mozilla.com
push dateTue, 30 Jan 2018 10:21:04 +0000
reviewersmystor
bugs1418076
milestone60.0a1
Bug 1418076 part 8. Remove remaining, unused, nsIDOMHTMLDocument methods. r=mystor. MozReview-Commit-ID: AshWkds4I8Z
dom/html/nsHTMLDocument.cpp
dom/html/nsHTMLDocument.h
dom/interfaces/html/nsIDOMHTMLDocument.idl
--- a/dom/html/nsHTMLDocument.cpp
+++ b/dom/html/nsHTMLDocument.cpp
@@ -1675,23 +1675,16 @@ nsHTMLDocument::Open(JSContext* cx,
   DebugOnly<JSObject*> wrapper = GetWrapperPreserveColor();
   MOZ_ASSERT_IF(wrapper,
                 JS_GetCompartmentPrincipals(js::GetObjectCompartment(wrapper)) ==
                 nsJSPrincipals::get(NodePrincipal()));
 
   return kungFuDeathGrip.forget();
 }
 
-NS_IMETHODIMP
-nsHTMLDocument::Clear()
-{
-  // This method has been deprecated
-  return NS_OK;
-}
-
 void
 nsHTMLDocument::Close(ErrorResult& rv)
 {
   if (!IsHTMLDocument()) {
     // No calling document.close() on XHTML!
 
     rv.Throw(NS_ERROR_DOM_INVALID_STATE_ERR);
     return;
@@ -2022,36 +2015,26 @@ nsIHTMLCollection*
 nsHTMLDocument::Embeds()
 {
   if (!mEmbeds) {
     mEmbeds = new nsContentList(this, kNameSpaceID_XHTML, nsGkAtoms::embed, nsGkAtoms::embed);
   }
   return mEmbeds;
 }
 
-NS_IMETHODIMP
-nsHTMLDocument::GetSelection(nsISelection** aReturn)
-{
-  ErrorResult rv;
-  NS_IF_ADDREF(*aReturn = nsDocument::GetSelection(rv));
-  return rv.StealNSResult();
-}
-
-NS_IMETHODIMP
+void
 nsHTMLDocument::CaptureEvents()
 {
   WarnOnceAbout(nsIDocument::eUseOfCaptureEvents);
-  return NS_OK;
 }
 
-NS_IMETHODIMP
+void
 nsHTMLDocument::ReleaseEvents()
 {
   WarnOnceAbout(nsIDocument::eUseOfReleaseEvents);
-  return NS_OK;
 }
 
 // Mapped to document.embeds for NS4 compatibility
 nsIHTMLCollection*
 nsHTMLDocument::Plugins()
 {
   return Embeds();
 }
--- a/dom/html/nsHTMLDocument.h
+++ b/dom/html/nsHTMLDocument.h
@@ -233,18 +233,18 @@ public:
   void GetBgColor(nsAString& aBgColor);
   void SetBgColor(const nsAString& aBgColor);
   nsIHTMLCollection* Anchors();
   nsIHTMLCollection* Applets();
   void Clear() const
   {
     // Deprecated
   }
-  // The XPCOM CaptureEvents works fine for us.
-  // The XPCOM ReleaseEvents works fine for us.
+  void CaptureEvents();
+  void ReleaseEvents();
   // We're picking up GetLocation from Document
   already_AddRefed<mozilla::dom::Location> GetLocation() const
   {
     return nsIDocument::GetLocation();
   }
 
   virtual nsHTMLDocument* AsHTMLDocument() override { return this; }
 
--- a/dom/interfaces/html/nsIDOMHTMLDocument.idl
+++ b/dom/interfaces/html/nsIDOMHTMLDocument.idl
@@ -6,28 +6,13 @@
 #include "nsIDOMDocument.idl"
 
 /**
  * The nsIDOMHTMLDocument interface is the interface to a [X]HTML
  * document object.
  *
  * @see <http://www.whatwg.org/html/>
  */
-interface nsISelection;
 
 [uuid(cd31e61f-cfc2-4b91-9385-17b6a2d0633d)]
 interface nsIDOMHTMLDocument : nsIDOMDocument
 {
-  void                      clear();
-
-
-  // DOM Range
-  nsISelection                getSelection();
-
-
-  // More obsolete APIs
-  /**
-   * @deprecated These are old Netscape 4 methods. Do not use,
-   *             the implementation is no-op.
-   */
-  void                      captureEvents();
-  void                      releaseEvents();
 };