From 39a3c92b6b91bd5a16948f2eacee2bee2bb4fea3 Mon Sep 17 00:00:00 2001 From: "attinasi%netscape.com" Date: Thu, 16 Mar 2000 23:04:21 +0000 Subject: [PATCH] Removed code that was causing a reframe when the class of an element changed. This is unnecessary and causes performance problems (reframes are expensive). b=21225 r=dcone,pierre git-svn-id: svn://10.0.0.236/trunk@63187 18797224-902f-48f8-a5cc-f745e15eee43 --- .../content/html/content/src/nsGenericHTMLElement.cpp | 10 +++++++++- .../layout/html/content/src/nsGenericHTMLElement.cpp | 10 +++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/mozilla/content/html/content/src/nsGenericHTMLElement.cpp b/mozilla/content/html/content/src/nsGenericHTMLElement.cpp index d55b80ef64f..129e7902fed 100644 --- a/mozilla/content/html/content/src/nsGenericHTMLElement.cpp +++ b/mozilla/content/html/content/src/nsGenericHTMLElement.cpp @@ -1537,7 +1537,7 @@ nsGenericHTMLElement::SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult, sum += (PRUint32) aInstanceSize; if (mAttributes) { PRUint32 attrs = 0; - mAttributes->SizeOf(aSizer, &attrs); + mAttributes->SizeOf(aSizer, attrs); sum += attrs; } #endif @@ -2416,10 +2416,18 @@ nsGenericHTMLElement::GetCommonMappedAttributesImpact(const nsIAtom* aAttribute, aHint = NS_STYLE_HINT_REFLOW; // XXX really? possibly FRAMECHANGE? return PR_TRUE; } + /* + We should not REFRAME for a class change; + let the resulting style decide the impact + (bug 21225, mja) + */ +#if 0 else if (nsHTMLAtoms::kClass == aAttribute) { // bug 8862 aHint = NS_STYLE_HINT_FRAMECHANGE; return PR_TRUE; } +#endif + else if (nsHTMLAtoms::_baseHref == aAttribute) { aHint = NS_STYLE_HINT_VISUAL; // at a minimum, elements may need to override return PR_TRUE; diff --git a/mozilla/layout/html/content/src/nsGenericHTMLElement.cpp b/mozilla/layout/html/content/src/nsGenericHTMLElement.cpp index d55b80ef64f..129e7902fed 100644 --- a/mozilla/layout/html/content/src/nsGenericHTMLElement.cpp +++ b/mozilla/layout/html/content/src/nsGenericHTMLElement.cpp @@ -1537,7 +1537,7 @@ nsGenericHTMLElement::SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult, sum += (PRUint32) aInstanceSize; if (mAttributes) { PRUint32 attrs = 0; - mAttributes->SizeOf(aSizer, &attrs); + mAttributes->SizeOf(aSizer, attrs); sum += attrs; } #endif @@ -2416,10 +2416,18 @@ nsGenericHTMLElement::GetCommonMappedAttributesImpact(const nsIAtom* aAttribute, aHint = NS_STYLE_HINT_REFLOW; // XXX really? possibly FRAMECHANGE? return PR_TRUE; } + /* + We should not REFRAME for a class change; + let the resulting style decide the impact + (bug 21225, mja) + */ +#if 0 else if (nsHTMLAtoms::kClass == aAttribute) { // bug 8862 aHint = NS_STYLE_HINT_FRAMECHANGE; return PR_TRUE; } +#endif + else if (nsHTMLAtoms::_baseHref == aAttribute) { aHint = NS_STYLE_HINT_VISUAL; // at a minimum, elements may need to override return PR_TRUE;