Fix for bug 552712 (Remove some NS_DEFINE_CLASSINFO_DATA_WITH_NAME use). r=jst.

--HG--
extra : rebase_source : 0e4b74d5c731a2bdff8da75f9c4edf6757c8b355
This commit is contained in:
Peter Van der Beken 2010-03-17 16:09:01 +01:00
Родитель 3732c25789
Коммит 9d0b83613f
6 изменённых файлов: 11 добавлений и 85 удалений

Просмотреть файл

@ -36,7 +36,6 @@
* ***** END LICENSE BLOCK ***** */
#include "nsHTMLFormElement.h"
#include "nsIHTMLDocument.h"
#include "nsIDOMNSHTMLFormControlList.h"
#include "nsIDOMEventTarget.h"
#include "nsEventStateManager.h"
#include "nsGkAtoms.h"
@ -89,8 +88,7 @@ PRBool nsHTMLFormElement::gPasswordManagerInitialized = PR_FALSE;
// nsFormControlList
class nsFormControlList : public nsIDOMNSHTMLFormControlList,
public nsIHTMLCollection
class nsFormControlList : public nsIHTMLCollection
{
public:
nsFormControlList(nsHTMLFormElement* aForm);
@ -105,9 +103,6 @@ public:
// nsIDOMHTMLCollection interface
NS_DECL_NSIDOMHTMLCOLLECTION
// nsIDOMNSHTMLFormControlList interface
NS_DECL_NSIDOMNSHTMLFORMCONTROLLIST
virtual nsISupports* GetNodeAt(PRUint32 aIndex, nsresult* aResult)
{
FlushPendingNotifications();
@ -1882,12 +1877,11 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
// XPConnect interface list for nsFormControlList
NS_INTERFACE_TABLE_HEAD(nsFormControlList)
NS_INTERFACE_TABLE3(nsFormControlList,
NS_INTERFACE_TABLE2(nsFormControlList,
nsIHTMLCollection,
nsIDOMHTMLCollection,
nsIDOMNSHTMLFormControlList)
nsIDOMHTMLCollection)
NS_INTERFACE_TABLE_TO_MAP_SEGUE_CYCLE_COLLECTION(nsFormControlList)
NS_INTERFACE_MAP_ENTRY_CONTENT_CLASSINFO(HTMLFormControlCollection)
NS_INTERFACE_MAP_ENTRY_CONTENT_CLASSINFO(HTMLCollection)
NS_INTERFACE_MAP_END
@ -1954,14 +1948,6 @@ nsFormControlList::NamedItem(const nsAString& aName,
return rv;
}
NS_IMETHODIMP
nsFormControlList::NamedItem(const nsAString& aName,
nsISupports** aReturn)
{
NS_IF_ADDREF(*aReturn = NamedItemInternal(aName, PR_TRUE));
return NS_OK;
}
nsISupports*
nsFormControlList::NamedItemInternal(const nsAString& aName,
PRBool aFlushContent)

Просмотреть файл

@ -158,7 +158,7 @@ NS_INTERFACE_TABLE_HEAD(TableRowsCollection)
NS_INTERFACE_TABLE2(TableRowsCollection, nsIHTMLCollection,
nsIDOMHTMLCollection)
NS_INTERFACE_TABLE_TO_MAP_SEGUE_CYCLE_COLLECTION(TableRowsCollection)
NS_INTERFACE_MAP_ENTRY_CONTENT_CLASSINFO(HTMLGenericCollection)
NS_INTERFACE_MAP_ENTRY_CONTENT_CLASSINFO(HTMLCollection)
NS_INTERFACE_MAP_END
nsresult

Просмотреть файл

@ -132,7 +132,6 @@
#include "nsIForm.h"
#include "nsIFormControl.h"
#include "nsIDOMHTMLFormElement.h"
#include "nsIDOMNSHTMLFormControlList.h"
#include "nsIDOMHTMLCollection.h"
#include "nsIHTMLCollection.h"
#include "nsHTMLDocument.h"
@ -673,12 +672,9 @@ static nsDOMClassInfoData sClassInfoData[] = {
nsHTMLOptionsCollectionSH,
ARRAY_SCRIPTABLE_FLAGS |
nsIXPCScriptable::WANT_SETPROPERTY)
NS_DEFINE_CLASSINFO_DATA_WITH_NAME(HTMLFormControlCollection, HTMLCollection,
nsHTMLCollectionSH,
ARRAY_SCRIPTABLE_FLAGS)
NS_DEFINE_CLASSINFO_DATA_WITH_NAME(HTMLGenericCollection, HTMLCollection,
nsHTMLCollectionSH,
ARRAY_SCRIPTABLE_FLAGS)
NS_DEFINE_CLASSINFO_DATA(HTMLCollection,
nsHTMLCollectionSH,
ARRAY_SCRIPTABLE_FLAGS)
// HTML element classes
NS_DEFINE_CLASSINFO_DATA(HTMLAnchorElement, nsElementSH,
@ -2262,14 +2258,7 @@ nsDOMClassInfo::Init()
DOM_CLASSINFO_MAP_ENTRY(nsIDOMHTMLCollection)
DOM_CLASSINFO_MAP_END
DOM_CLASSINFO_MAP_BEGIN_NO_CLASS_IF(HTMLFormControlCollection,
nsIDOMHTMLCollection)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMHTMLCollection)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMNSHTMLFormControlList)
DOM_CLASSINFO_MAP_END
DOM_CLASSINFO_MAP_BEGIN_NO_CLASS_IF(HTMLGenericCollection,
nsIDOMHTMLCollection)
DOM_CLASSINFO_MAP_BEGIN(HTMLCollection, nsIDOMHTMLCollection)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMHTMLCollection)
DOM_CLASSINFO_MAP_END
@ -7891,8 +7880,7 @@ nsNodeListSH::PreCreate(nsISupports *nativeObj, JSContext *cx,
nsWrapperCache* cache = nsnull;
CallQueryInterface(nativeObj, &cache);
if (!cache) {
*parentObj = globalObj;
return NS_OK;
return nsDOMClassInfo::PreCreate(nativeObj, cx, globalObj, parentObj);
}
// nsChildContentList is the only class that uses nsNodeListSH and has a

Просмотреть файл

@ -90,8 +90,7 @@ enum nsDOMClassInfoID {
// HTML classes
eDOMClassInfo_HTMLDocument_id,
eDOMClassInfo_HTMLOptionsCollection_id,
eDOMClassInfo_HTMLFormControlCollection_id,
eDOMClassInfo_HTMLGenericCollection_id,
eDOMClassInfo_HTMLCollection_id,
// HTML element classes
eDOMClassInfo_HTMLAnchorElement_id,

Просмотреть файл

@ -123,7 +123,6 @@ XPIDLSRCS = \
nsIDOMNSHTMLButtonElement.idl \
nsIDOMNSHTMLDocument.idl \
nsIDOMNSHTMLElement.idl \
nsIDOMNSHTMLFormControlList.idl \
nsIDOMNSHTMLFormElement.idl \
nsIDOMNSHTMLFrameElement.idl \
nsIDOMNSHTMLHRElement.idl \

Просмотреть файл

@ -1,46 +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 "nsISupports.idl"
[scriptable, uuid(a6cf911a-15b3-11d2-932e-00805f8add32)]
interface nsIDOMNSHTMLFormControlList : nsISupports
{
nsISupports namedItem(in DOMString name);
};