[Bug 868701] Remove classinfo for Attr r=Ms2ger

This commit is contained in:
David Zbarsky 2013-05-04 03:55:53 -04:00
parent cff213613e
commit bf42e48d0e
5 changed files with 4 additions and 49 deletions

View File

@ -29,8 +29,6 @@
#include "nsAsyncDOMEvent.h" #include "nsAsyncDOMEvent.h"
#include "nsWrapperCacheInlines.h" #include "nsWrapperCacheInlines.h"
DOMCI_NODE_DATA(Attr, mozilla::dom::Attr)
namespace mozilla { namespace mozilla {
namespace dom { namespace dom {
@ -78,7 +76,6 @@ NS_INTERFACE_TABLE_HEAD(Attr)
new nsNodeSupportsWeakRefTearoff(this)) new nsNodeSupportsWeakRefTearoff(this))
NS_INTERFACE_MAP_ENTRY_TEAROFF(nsIDOMXPathNSResolver, NS_INTERFACE_MAP_ENTRY_TEAROFF(nsIDOMXPathNSResolver,
new nsNode3Tearoff(this)) new nsNode3Tearoff(this))
NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(Attr)
NS_INTERFACE_MAP_END NS_INTERFACE_MAP_END
NS_IMPL_CYCLE_COLLECTING_ADDREF(Attr) NS_IMPL_CYCLE_COLLECTING_ADDREF(Attr)

View File

@ -41,10 +41,10 @@ public:
NS_FORWARD_NSIDOMNODE_TO_NSINODE NS_FORWARD_NSIDOMNODE_TO_NSINODE
virtual void GetTextContentInternal(nsAString& aTextContent); virtual void GetTextContentInternal(nsAString& aTextContent);
virtual void SetTextContentInternal(const nsAString& aTextContent, virtual void SetTextContentInternal(const nsAString& aTextContent,
mozilla::ErrorResult& aError); ErrorResult& aError);
virtual void GetNodeValueInternal(nsAString& aNodeValue); virtual void GetNodeValueInternal(nsAString& aNodeValue);
virtual void SetNodeValueInternal(const nsAString& aNodeValue, virtual void SetNodeValueInternal(const nsAString& aNodeValue,
mozilla::ErrorResult& aError); ErrorResult& aError);
// nsIDOMAttr interface // nsIDOMAttr interface
NS_DECL_NSIDOMATTR NS_DECL_NSIDOMATTR
@ -75,8 +75,6 @@ public:
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_AMBIGUOUS(Attr, NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_AMBIGUOUS(Attr,
nsIAttribute) nsIAttribute)
virtual nsXPCClassInfo* GetClassInfo();
virtual nsIDOMNode* AsDOMNode() { return this; } virtual nsIDOMNode* AsDOMNode() { return this; }
// WebIDL // WebIDL
@ -97,7 +95,7 @@ public:
Element* GetOwnerElement(ErrorResult& aRv); Element* GetOwnerElement(ErrorResult& aRv);
protected: protected:
virtual mozilla::dom::Element* GetNameSpaceElement() virtual Element* GetNameSpaceElement()
{ {
return GetContentInternal(); return GetContentInternal();
} }
@ -106,7 +104,7 @@ protected:
private: private:
already_AddRefed<nsIAtom> GetNameAtom(nsIContent* aContent); already_AddRefed<nsIAtom> GetNameAtom(nsIContent* aContent);
mozilla::dom::Element* GetContentInternal() const; Element* GetContentInternal() const;
nsString mValue; nsString mValue;
}; };

View File

@ -57,7 +57,6 @@
#include "nsGlobalWindow.h" #include "nsGlobalWindow.h"
#include "nsHistory.h" #include "nsHistory.h"
#include "nsIContent.h" #include "nsIContent.h"
#include "nsIAttribute.h"
#include "nsIDocument.h" #include "nsIDocument.h"
#include "nsIDOMDocument.h" #include "nsIDOMDocument.h"
#include "nsIDOMEvent.h" #include "nsIDOMEvent.h"
@ -152,7 +151,6 @@
// includes needed for the prototype chain interfaces // includes needed for the prototype chain interfaces
#include "nsIDOMNavigator.h" #include "nsIDOMNavigator.h"
#include "nsIDOMBarProp.h" #include "nsIDOMBarProp.h"
#include "mozilla/dom/Attr.h"
#include "nsIDOMDataContainerEvent.h" #include "nsIDOMDataContainerEvent.h"
#include "nsIDOMKeyEvent.h" #include "nsIDOMKeyEvent.h"
#include "nsIDOMCompositionEvent.h" #include "nsIDOMCompositionEvent.h"
@ -558,8 +556,6 @@ static nsDOMClassInfoData sClassInfoData[] = {
DOM_DEFAULT_SCRIPTABLE_FLAGS) DOM_DEFAULT_SCRIPTABLE_FLAGS)
NS_DEFINE_CLASSINFO_DATA(Element, nsElementSH, NS_DEFINE_CLASSINFO_DATA(Element, nsElementSH,
ELEMENT_SCRIPTABLE_FLAGS) ELEMENT_SCRIPTABLE_FLAGS)
NS_DEFINE_CLASSINFO_DATA(Attr, nsAttributeSH,
NODE_SCRIPTABLE_FLAGS)
// Misc Core related classes // Misc Core related classes
@ -1709,11 +1705,6 @@ nsDOMClassInfo::Init()
nsDOMTouchEvent::PrefEnabled()) nsDOMTouchEvent::PrefEnabled())
DOM_CLASSINFO_MAP_END DOM_CLASSINFO_MAP_END
DOM_CLASSINFO_MAP_BEGIN(Attr, nsIDOMAttr)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMAttr)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMEventTarget)
DOM_CLASSINFO_MAP_END
DOM_CLASSINFO_MAP_BEGIN(Event, nsIDOMEvent) DOM_CLASSINFO_MAP_BEGIN(Event, nsIDOMEvent)
DOM_CLASSINFO_EVENT_MAP_ENTRIES DOM_CLASSINFO_EVENT_MAP_ENTRIES
DOM_CLASSINFO_MAP_END DOM_CLASSINFO_MAP_END
@ -7563,15 +7554,6 @@ nsNonDOMObjectSH::GetFlags(uint32_t *aFlags)
return NS_OK; return NS_OK;
} }
NS_IMETHODIMP
nsAttributeSH::GetFlags(uint32_t *aFlags)
{
// Just like nsNodeSH, but without CONTENT_NODE
*aFlags = DOMCLASSINFO_STANDARD_FLAGS;
return NS_OK;
}
// nsOfflineResourceListSH // nsOfflineResourceListSH
nsresult nsresult
nsOfflineResourceListSH::GetStringAt(nsISupports *aNative, int32_t aIndex, nsOfflineResourceListSH::GetStringAt(nsISupports *aNative, int32_t aIndex,

View File

@ -1076,27 +1076,6 @@ public:
} }
}; };
// Need this to override GetFlags() on nsNodeSH
class nsAttributeSH : public nsNodeSH
{
protected:
nsAttributeSH(nsDOMClassInfoData* aData) : nsNodeSH(aData)
{
}
virtual ~nsAttributeSH()
{
}
public:
NS_IMETHOD GetFlags(uint32_t *aFlags);
static nsIClassInfo *doCreate(nsDOMClassInfoData* aData)
{
return new nsAttributeSH(aData);
}
};
class nsOfflineResourceListSH : public nsStringArraySH class nsOfflineResourceListSH : public nsStringArraySH
{ {
protected: protected:

View File

@ -18,7 +18,6 @@ DOMCI_CLASS(DOMConstructor)
// Core classes // Core classes
DOMCI_CLASS(DOMException) DOMCI_CLASS(DOMException)
DOMCI_CLASS(Element) DOMCI_CLASS(Element)
DOMCI_CLASS(Attr)
// Event classes // Event classes
DOMCI_CLASS(Event) DOMCI_CLASS(Event)