Bug 1418076 part 3. Get rid of nsIDOMHTMLDocument's head attribute. r=mystor
authorBoris Zbarsky <bzbarsky@mit.edu>
Fri, 26 Jan 2018 01:00:33 -0500
changeset 748755 e0146922d6a1aaf13fd077ea687498f8db98f949
parent 748754 ffbb8173065025fea677f9cfa678d376288eb739
child 748756 d57a1d68c0d8ad254c459dc120ac15b8779e015f
push id97228
push usersfraser@mozilla.com
push dateTue, 30 Jan 2018 10:21:04 +0000
reviewersmystor
bugs1418076
milestone60.0a1
Bug 1418076 part 3. Get rid of nsIDOMHTMLDocument's head attribute. r=mystor MozReview-Commit-ID: Cj7l9TqmAby
dom/html/nsHTMLDocument.cpp
dom/interfaces/html/nsIDOMHTMLDocument.idl
--- a/dom/html/nsHTMLDocument.cpp
+++ b/dom/html/nsHTMLDocument.cpp
@@ -1062,26 +1062,16 @@ nsHTMLDocument::SetDomain(const nsAStrin
     rv.Throw(NS_ERROR_DOM_BAD_DOCUMENT_DOMAIN);
     return;
   }
 
   NS_TryToSetImmutable(newURI);
   rv = NodePrincipal()->SetDomain(newURI);
 }
 
-NS_IMETHODIMP
-nsHTMLDocument::GetHead(nsISupports** aHead)
-{
-  *aHead = nullptr;
-
-  Element* head = GetHeadElement();
-
-  return head ? CallQueryInterface(head, aHead) : NS_OK;
-}
-
 nsIHTMLCollection*
 nsHTMLDocument::Images()
 {
   if (!mImages) {
     mImages = new nsContentList(this, kNameSpaceID_XHTML, nsGkAtoms::img, nsGkAtoms::img);
   }
   return mImages;
 }
--- a/dom/interfaces/html/nsIDOMHTMLDocument.idl
+++ b/dom/interfaces/html/nsIDOMHTMLDocument.idl
@@ -11,18 +11,16 @@
  *
  * @see <http://www.whatwg.org/html/>
  */
 interface nsISelection;
 
 [uuid(cd31e61f-cfc2-4b91-9385-17b6a2d0633d)]
 interface nsIDOMHTMLDocument : nsIDOMDocument
 {
-  readonly attribute nsISupports          head;
-
   // If aContentType is not something supported by nsHTMLDocument and
   // the HTML content sink, trying to write to the document will
   // probably throw.
   // Pass aReplace = true to trigger a replacement of the previous
   // document in session history; pass false for normal history handling.
   [implicit_jscontext, optional_argc]
   nsISupports               open([optional] in DOMString aContentTypeOrUrl,
                                  [optional] in DOMString aReplaceOrName,