Bug 679499 - Add nsHTMLAnchorElement, nsHTMLSpanElement and nsHTMLDivElement to the DOM Memory Reporter. r=jst

This commit is contained in:
Mounir Lamouri 2011-08-18 00:14:53 +02:00
parent 75809b99c5
commit fe50c38240
3 changed files with 15 additions and 0 deletions

View File

@ -51,6 +51,7 @@
#include "nsIDocument.h"
#include "nsPresContext.h"
#include "nsHTMLDNSPrefetch.h"
#include "nsDOMMemoryReporter.h"
using namespace mozilla::dom;
@ -81,6 +82,11 @@ public:
// nsIDOMHTMLAnchorElement
NS_DECL_NSIDOMHTMLANCHORELEMENT
// TODO: we do not really count Link::mCachedURI but given that it's a
// nsCOMPtr<nsIURI>, that would be required adding SizeOf() to the interface.
NS_DECL_AND_IMPL_DOM_MEMORY_REPORTER_SIZEOF(nsHTMLAnchorElement,
nsGenericHTMLElement)
// nsILink
NS_IMETHOD LinkAdded() { return NS_OK; }
NS_IMETHOD LinkRemoved() { return NS_OK; }
@ -454,3 +460,4 @@ nsHTMLAnchorElement::IntrinsicState() const
{
return Link::LinkState() | nsGenericHTMLElement::IntrinsicState();
}

View File

@ -40,6 +40,7 @@
#include "nsGkAtoms.h"
#include "nsStyleConsts.h"
#include "nsMappedAttributes.h"
#include "nsDOMMemoryReporter.h"
class nsHTMLDivElement : public nsGenericHTMLElement,
public nsIDOMHTMLDivElement
@ -63,6 +64,9 @@ public:
// nsIDOMHTMLDivElement
NS_DECL_NSIDOMHTMLDIVELEMENT
NS_DECL_AND_IMPL_DOM_MEMORY_REPORTER_SIZEOF(nsHTMLDivElement,
nsGenericHTMLElement)
virtual PRBool ParseAttribute(PRInt32 aNamespaceID,
nsIAtom* aAttribute,
const nsAString& aValue,

View File

@ -41,6 +41,7 @@
#include "nsStyleConsts.h"
#include "nsIAtom.h"
#include "nsRuleData.h"
#include "nsDOMMemoryReporter.h"
class nsHTMLSpanElement : public nsGenericHTMLElement,
public nsIDOMHTMLElement
@ -61,6 +62,9 @@ public:
// nsIDOMHTMLElement
NS_FORWARD_NSIDOMHTMLELEMENT(nsGenericHTMLElement::)
NS_DECL_AND_IMPL_DOM_MEMORY_REPORTER_SIZEOF(nsHTMLSpanElement,
nsGenericHTMLElement)
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
virtual nsXPCClassInfo* GetClassInfo();