Remove unneeded nsIDOMNSHTMLAnchorElement interface by merging it into nsIDOMHTMLAnchorElement. (Bug 582303) r=jst
authorDavid Zbarsky <dzbarsky@gmail.com>
Wed, 04 Aug 2010 22:40:17 -0400
changeset 48890 6690d31dbdaae7d6b25355f566e026e86b8d7847
parent 48889 11170037df20c0c701a6d542e73f5baacab78ea3
child 48891 5bb0dd9b0192de764db80cd5a2bd2223752b895a
push idunknown
push userunknown
push dateunknown
reviewersjst
bugs582303
milestone2.0b4pre
Remove unneeded nsIDOMNSHTMLAnchorElement interface by merging it into nsIDOMHTMLAnchorElement. (Bug 582303) r=jst
content/html/content/src/nsHTMLAnchorElement.cpp
content/html/content/test/test_bug389797.html
docshell/base/nsDocShell.cpp
dom/base/nsDOMClassInfo.cpp
dom/interfaces/html/Makefile.in
dom/interfaces/html/nsIDOMHTMLAnchorElement.idl
dom/interfaces/html/nsIDOMNSHTMLAnchorElement.idl
dom/interfaces/html/nsIDOMNSHTMLAnchorElement2.idl
js/src/xpconnect/src/dom_quickstubs.qsconf
--- a/content/html/content/src/nsHTMLAnchorElement.cpp
+++ b/content/html/content/src/nsHTMLAnchorElement.cpp
@@ -36,33 +36,31 @@
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 #include "nsCOMPtr.h"
 #include "nsReadableUtils.h"
 #include "nsUnicharUtils.h"
 #include "nsIDOMHTMLAnchorElement.h"
-#include "nsIDOMNSHTMLAnchorElement2.h"
 #include "nsGenericHTMLElement.h"
 #include "nsILink.h"
 #include "nsGkAtoms.h"
 #include "nsIPresShell.h"
 #include "nsIDocument.h"
 #include "nsPresContext.h"
 #include "nsIEventStateManager.h"
 
 #include "nsHTMLDNSPrefetch.h"
 
 #include "Link.h"
 using namespace mozilla::dom;
 
 class nsHTMLAnchorElement : public nsGenericHTMLElement,
                             public nsIDOMHTMLAnchorElement,
-                            public nsIDOMNSHTMLAnchorElement2,
                             public nsILink,
                             public Link
 {
 public:
   using nsGenericElement::GetText;
   using nsGenericElement::SetText;
 
   nsHTMLAnchorElement(already_AddRefed<nsINodeInfo> aNodeInfo);
@@ -78,22 +76,16 @@ public:
   NS_FORWARD_NSIDOMELEMENT(nsGenericHTMLElement::)
 
   // nsIDOMHTMLElement
   NS_FORWARD_NSIDOMHTMLELEMENT(nsGenericHTMLElement::)
 
   // nsIDOMHTMLAnchorElement
   NS_DECL_NSIDOMHTMLANCHORELEMENT  
 
-  // nsIDOMNSHTMLAnchorElement
-  NS_DECL_NSIDOMNSHTMLANCHORELEMENT
-
-  // nsIDOMNSHTMLAnchorElement2
-  NS_DECL_NSIDOMNSHTMLANCHORELEMENT2
-
   // nsILink
   NS_IMETHOD LinkAdded() { return NS_OK; }
   NS_IMETHOD LinkRemoved() { return NS_OK; }
 
   // override from nsGenericHTMLElement
   NS_IMETHOD GetDraggable(PRBool* aDraggable);
 
   virtual nsresult BindToTree(nsIDocument* aDocument, nsIContent* aParent,
@@ -148,20 +140,18 @@ nsHTMLAnchorElement::~nsHTMLAnchorElemen
 NS_IMPL_ADDREF_INHERITED(nsHTMLAnchorElement, nsGenericElement) 
 NS_IMPL_RELEASE_INHERITED(nsHTMLAnchorElement, nsGenericElement) 
 
 
 DOMCI_NODE_DATA(HTMLAnchorElement, nsHTMLAnchorElement)
 
 // QueryInterface implementation for nsHTMLAnchorElement
 NS_INTERFACE_TABLE_HEAD(nsHTMLAnchorElement)
-  NS_HTML_CONTENT_INTERFACE_TABLE5(nsHTMLAnchorElement,
+  NS_HTML_CONTENT_INTERFACE_TABLE3(nsHTMLAnchorElement,
                                    nsIDOMHTMLAnchorElement,
-                                   nsIDOMNSHTMLAnchorElement,
-                                   nsIDOMNSHTMLAnchorElement2,
                                    nsILink,
                                    Link)
   NS_HTML_CONTENT_INTERFACE_TABLE_TO_MAP_SEGUE(nsHTMLAnchorElement,
                                                nsGenericHTMLElement)
 NS_HTML_CONTENT_INTERFACE_TABLE_TAIL_CLASSINFO(HTMLAnchorElement)
 
 
 NS_IMPL_ELEMENT_CLONE(nsHTMLAnchorElement)
--- a/content/html/content/test/test_bug389797.html
+++ b/content/html/content/test/test_bug389797.html
@@ -107,17 +107,17 @@ objectIfaces2.push("nsIImageLoadingConte
    q
    spacer
    ul
    wbr
    head
    html
  */
 
-HTML_TAG("a", "Anchor", [ "nsIDOMNSHTMLAnchorElement2" ]);
+HTML_TAG("a", "Anchor");
 HTML_TAG("abbr", ""); // HTMLElement
 HTML_TAG("acronym", ""); // HTMLElement
 HTML_TAG("address", ""); // HTMLElement
 HTML_TAG("applet", "Applet", [], objectIfaces);
 HTML_TAG("area", "Area");
 HTML_TAG("article", ""); // HTMLElement
 HTML_TAG("aside", ""); // HTMLElement
 HTML_TAG("b", ""); // HTMLElement
--- a/docshell/base/nsDocShell.cpp
+++ b/docshell/base/nsDocShell.cpp
@@ -359,17 +359,17 @@ CheckPingURI(nsIURI* uri, nsIContent* co
 }
 
 typedef void (* ForEachPingCallback)(void *closure, nsIContent *content,
                                      nsIURI *uri, nsIIOService *ios);
 
 static void
 ForEachPing(nsIContent *content, ForEachPingCallback callback, void *closure)
 {
-  // NOTE: Using nsIDOMNSHTMLAnchorElement2::GetPing isn't really worth it here
+  // NOTE: Using nsIDOMHTMLAnchorElement::GetPing isn't really worth it here
   //       since we'd still need to parse the resulting string.  Instead, we
   //       just parse the raw attribute.  It might be nice if the content node
   //       implemented an interface that exposed an enumeration of nsIURIs.
 
   // Make sure we are dealing with either an <A> or <AREA> element in the HTML
   // or XHTML namespace.
   if (!content->IsHTML())
     return;
--- a/dom/base/nsDOMClassInfo.cpp
+++ b/dom/base/nsDOMClassInfo.cpp
@@ -245,17 +245,16 @@
 #include "nsIDOMDocumentView.h"
 #include "nsIDOMElementCSSInlineStyle.h"
 #include "nsIDOMLinkStyle.h"
 #include "nsIDOMHTMLDocument.h"
 #include "nsIDOMNSHTMLDocument.h"
 #include "nsIDOMHTMLElement.h"
 #include "nsIDOMNSHTMLElement.h"
 #include "nsIDOMHTMLAnchorElement.h"
-#include "nsIDOMNSHTMLAnchorElement2.h"
 #include "nsIDOMHTMLAppletElement.h"
 #include "nsIDOMHTMLAreaElement.h"
 #include "nsIDOMHTMLBRElement.h"
 #include "nsIDOMHTMLBaseElement.h"
 #include "nsIDOMHTMLBodyElement.h"
 #include "nsIDOMHTMLButtonElement.h"
 #include "nsIDOMHTMLCanvasElement.h"
 #include "nsIDOMHTMLDListElement.h"
@@ -2425,18 +2424,16 @@ nsDOMClassInfo::Init()
   DOM_CLASSINFO_MAP_BEGIN(HTMLElement, nsIDOMHTMLElement)
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMHTMLElement)
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMNSHTMLElement)
     DOM_CLASSINFO_GENERIC_HTML_MAP_ENTRIES
   DOM_CLASSINFO_MAP_END
 
   DOM_CLASSINFO_MAP_BEGIN(HTMLAnchorElement, nsIDOMHTMLAnchorElement)
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMHTMLAnchorElement)
-    DOM_CLASSINFO_MAP_ENTRY(nsIDOMNSHTMLAnchorElement)
-    DOM_CLASSINFO_MAP_ENTRY(nsIDOMNSHTMLAnchorElement2)
     DOM_CLASSINFO_GENERIC_HTML_MAP_ENTRIES
   DOM_CLASSINFO_MAP_END
 
   DOM_CLASSINFO_MAP_BEGIN(HTMLAppletElement, nsIDOMHTMLAppletElement)
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMHTMLAppletElement)
     DOM_CLASSINFO_GENERIC_HTML_MAP_ENTRIES
   DOM_CLASSINFO_MAP_END
 
--- a/dom/interfaces/html/Makefile.in
+++ b/dom/interfaces/html/Makefile.in
@@ -111,18 +111,16 @@ SDK_XPIDLSRCS =					\
 	nsIDOMHTMLSourceElement.idl		\
 	nsIDOMHTMLVideoElement.idl		\
 	nsIDOMHTMLAudioElement.idl		\
 	nsIDOMHTMLVoidCallback.idl		\
 	$(NULL)
 
 XPIDLSRCS = 					\
 	nsIDOMHTMLCanvasElement.idl		\
-	nsIDOMNSHTMLAnchorElement.idl		\
-	nsIDOMNSHTMLAnchorElement2.idl		\
 	nsIDOMNSHTMLDocument.idl		\
 	nsIDOMNSHTMLElement.idl			\
 	nsIDOMNSHTMLFormElement.idl		\
 	nsIDOMNSHTMLFrameElement.idl		\
 	nsIDOMNSHTMLHRElement.idl		\
 	nsIDOMNSHTMLImageElement.idl		\
 	nsIDOMNSHTMLInputElement.idl		\
 	nsIDOMNSHTMLOptionCollectn.idl		\
--- a/dom/interfaces/html/nsIDOMHTMLAnchorElement.idl
+++ b/dom/interfaces/html/nsIDOMHTMLAnchorElement.idl
@@ -42,26 +42,48 @@
 /**
  * The nsIDOMHTMLAnchorElement interface is the interface to a [X]HTML
  * a element.
  *
  * For more information on this interface please see
  * http://www.w3.org/TR/DOM-Level-2-HTML/
  */
 
-[scriptable, uuid(a6cf90aa-15b3-11d2-932e-00805f8add32)]
+[scriptable, uuid(4e237175-3628-4dc8-892f-5270edc3c71a)]
 interface nsIDOMHTMLAnchorElement : nsIDOMHTMLElement
 {
+           attribute DOMString        href;
+           attribute DOMString        target;
+
+           attribute DOMString        ping;
+
+           attribute DOMString        rel;
+           attribute DOMString        hreflang;
+           attribute DOMString        type;
+
+  /**
+   * An alias for the textContent attribute.
+   */
+  [Null(Stringify)]
+           attribute DOMString        text;
+
+  // URL decomposition IDL attributes
+           attribute DOMString        protocol;
+           attribute DOMString        host;
+           attribute DOMString        hostname;
+           attribute DOMString        port;
+           attribute DOMString        pathname;
+           attribute DOMString        search;
+           attribute DOMString        hash;
+
+
            attribute DOMString        accessKey;
            attribute DOMString        charset;
            attribute DOMString        coords;
-           attribute DOMString        href;
-           attribute DOMString        hreflang;
            attribute DOMString        name;
-           attribute DOMString        rel;
            attribute DOMString        rev;
            attribute DOMString        shape;
            attribute long             tabIndex;
-           attribute DOMString        target;
-           attribute DOMString        type;
+
+  DOMString                 toString();
   void                      blur();
   void                      focus();
 };
deleted file mode 100644
--- a/dom/interfaces/html/nsIDOMNSHTMLAnchorElement.idl
+++ /dev/null
@@ -1,60 +0,0 @@
-/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 2000
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Vidur Apparao <vidur@netscape.com> (original author)
- *   Johnny Stenback <jst@netscape.com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of the GNU General Public License Version 2 or later (the "GPL"),
- * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#include "domstubs.idl"
-
-[scriptable, uuid(24c39afa-44f7-4cd4-9e63-0504a581a081)]
-interface nsIDOMNSHTMLAnchorElement : nsISupports
-{
-           attribute DOMString        protocol;
-           attribute DOMString        host;
-           attribute DOMString        hostname;
-           attribute DOMString        pathname;
-           attribute DOMString        search;
-           attribute DOMString        port;
-           attribute DOMString        hash;
-
-  /**
-   * An alias for the textContent attribute.
-   */
-  [Null(Stringify)]
-           attribute DOMString        text;
-
-  DOMString                 toString();
-};
deleted file mode 100644
--- a/dom/interfaces/html/nsIDOMNSHTMLAnchorElement2.idl
+++ /dev/null
@@ -1,45 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et cindent: */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is Google Inc.
- * Portions created by the Initial Developer are Copyright (C) 2006
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *  Darin Fisher <darin@meer.net>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#include "nsIDOMNSHTMLAnchorElement.idl"
-
-[scriptable, uuid(d7627eda-6ec0-4326-87c4-c3067fe6e324)]
-interface nsIDOMNSHTMLAnchorElement2 : nsIDOMNSHTMLAnchorElement
-{
-  attribute DOMString ping;
-};
--- a/js/src/xpconnect/src/dom_quickstubs.qsconf
+++ b/js/src/xpconnect/src/dom_quickstubs.qsconf
@@ -209,16 +209,19 @@ members = [
 
     # dom/interfaces/geolocation - None.
 
     # dom/interfaces/html
     'nsIDOMHTMLAnchorElement.href',
     'nsIDOMHTMLAnchorElement.rel',
     'nsIDOMHTMLAnchorElement.target',
     'nsIDOMHTMLAnchorElement.name',
+    'nsIDOMHTMLAnchorElement.text',
+    'nsIDOMHTMLAnchorElement.search',
+    'nsIDOMHTMLAnchorElement.hash',
     'nsIDOMHTMLBaseElement.href',
     'nsIDOMHTMLBaseElement.target',
     'nsIDOMHTMLButtonElement.name',
     'nsIDOMHTMLButtonElement.form',
     'nsIDOMHTMLButtonElement.value',
     'nsIDOMHTMLButtonElement.disabled',
     'nsIDOMHTMLCollection.item',
     # This is shadowed by nsIDOMHTMLOptionsCollection.length,
@@ -320,19 +323,16 @@ members = [
     'nsIDOMHTMLTextAreaElement.value',
     'nsIDOMHTMLTextAreaElement.type',
     'nsIDOMHTMLTextAreaElement.select',
     'nsIDOMHTMLTitleElement.text',
     'nsIDOMHTMLCanvasElement.width',
     'nsIDOMHTMLCanvasElement.height',
     'nsIDOMHTMLCanvasElement.getContext',
     'nsIDOMHTMLCanvasElement.toDataURL',
-    'nsIDOMNSHTMLAnchorElement.text',
-    'nsIDOMNSHTMLAnchorElement.search',
-    'nsIDOMNSHTMLAnchorElement.hash',
     'nsIDOMNSHTMLDocument.width',
     'nsIDOMNSHTMLDocument.height',
     'nsIDOMNSHTMLDocument.domain',
     'nsIDOMNSHTMLDocument.getSelection',
     'nsIDOMNSHTMLDocument.designMode',
     'nsIDOMNSHTMLElement.contentEditable',
     'nsIDOMNSHTMLElement.isContentEditable',
     'nsIDOMNSHTMLElement.offsetParent',