Remove unneeded nsIDOMNSHTMLAnchorElement interface by merging it into nsIDOMHTMLAnchorElement. (Bug 582303) r=jst

This commit is contained in:
David Zbarsky 2010-08-04 22:40:17 -04:00
parent ed732b9f7f
commit f185611489
9 changed files with 34 additions and 132 deletions

View File

@ -41,7 +41,6 @@
#include "nsReadableUtils.h"
#include "nsUnicharUtils.h"
#include "nsIDOMHTMLAnchorElement.h"
#include "nsIDOMNSHTMLAnchorElement2.h"
#include "nsGenericHTMLElement.h"
#include "nsILink.h"
#include "nsGkAtoms.h"
@ -57,7 +56,6 @@ using namespace mozilla::dom;
class nsHTMLAnchorElement : public nsGenericHTMLElement,
public nsIDOMHTMLAnchorElement,
public nsIDOMNSHTMLAnchorElement2,
public nsILink,
public Link
{
@ -83,12 +81,6 @@ public:
// 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; }
@ -153,10 +145,8 @@ 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,

View File

@ -112,7 +112,7 @@ objectIfaces2.push("nsIImageLoadingContent");
html
*/
HTML_TAG("a", "Anchor", [ "nsIDOMNSHTMLAnchorElement2" ]);
HTML_TAG("a", "Anchor");
HTML_TAG("abbr", ""); // HTMLElement
HTML_TAG("acronym", ""); // HTMLElement
HTML_TAG("address", ""); // HTMLElement

View File

@ -364,7 +364,7 @@ typedef void (* ForEachPingCallback)(void *closure, nsIContent *content,
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.

View File

@ -250,7 +250,6 @@
#include "nsIDOMHTMLElement.h"
#include "nsIDOMNSHTMLElement.h"
#include "nsIDOMHTMLAnchorElement.h"
#include "nsIDOMNSHTMLAnchorElement2.h"
#include "nsIDOMHTMLAppletElement.h"
#include "nsIDOMHTMLAreaElement.h"
#include "nsIDOMHTMLBRElement.h"
@ -2430,8 +2429,6 @@ nsDOMClassInfo::Init()
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

View File

@ -116,8 +116,6 @@ SDK_XPIDLSRCS = \
XPIDLSRCS = \
nsIDOMHTMLCanvasElement.idl \
nsIDOMNSHTMLAnchorElement.idl \
nsIDOMNSHTMLAnchorElement2.idl \
nsIDOMNSHTMLDocument.idl \
nsIDOMNSHTMLElement.idl \
nsIDOMNSHTMLFormElement.idl \

View File

@ -47,21 +47,43 @@
* 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();
};

View File

@ -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();
};

View File

@ -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;
};

View File

@ -214,6 +214,9 @@ members = [
'nsIDOMHTMLAnchorElement.rel',
'nsIDOMHTMLAnchorElement.target',
'nsIDOMHTMLAnchorElement.name',
'nsIDOMHTMLAnchorElement.text',
'nsIDOMHTMLAnchorElement.search',
'nsIDOMHTMLAnchorElement.hash',
'nsIDOMHTMLBaseElement.href',
'nsIDOMHTMLBaseElement.target',
'nsIDOMHTMLButtonElement.name',
@ -325,9 +328,6 @@ members = [
'nsIDOMHTMLCanvasElement.height',
'nsIDOMHTMLCanvasElement.getContext',
'nsIDOMHTMLCanvasElement.toDataURL',
'nsIDOMNSHTMLAnchorElement.text',
'nsIDOMNSHTMLAnchorElement.search',
'nsIDOMNSHTMLAnchorElement.hash',
'nsIDOMNSHTMLDocument.width',
'nsIDOMNSHTMLDocument.height',
'nsIDOMNSHTMLDocument.domain',