Speed up edge case in RemoveProperty. Bug 131614, r=caillon, sr=jst,
a=dbaron git-svn-id: svn://10.0.0.236/trunk@116781 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -50,6 +50,7 @@
|
||||
#include "nsIURI.h"
|
||||
#include "nsINameSpaceManager.h"
|
||||
#include "nsIHTMLContentContainer.h"
|
||||
#include "nsStyleConsts.h"
|
||||
|
||||
MOZ_DECL_CTOR_COUNTER(nsDOMCSSAttributeDeclaration)
|
||||
|
||||
@@ -85,7 +86,7 @@ nsDOMCSSAttributeDeclaration::RemoveProperty(const nsAReadableString& aPropertyN
|
||||
nsHTMLAtoms::style);
|
||||
}
|
||||
|
||||
PRInt32 hint = decl->GetStyleImpact();
|
||||
PRInt32 hint = NS_STYLE_HINT_NONE;
|
||||
|
||||
nsCSSProperty prop = nsCSSProps::LookupProperty(aPropertyName);
|
||||
nsCSSValue val;
|
||||
@@ -96,6 +97,7 @@ nsDOMCSSAttributeDeclaration::RemoveProperty(const nsAReadableString& aPropertyN
|
||||
// We pass in eCSSProperty_UNKNOWN here so that we don't get the
|
||||
// property name in the return string.
|
||||
val.ToString(aReturn, eCSSProperty_UNKNOWN);
|
||||
hint = nsCSSProps::kHintTable[prop];
|
||||
} else {
|
||||
// If we tried to remove an invalid property or a property that wasn't
|
||||
// set we simply return success and an empty string
|
||||
|
||||
@@ -50,6 +50,7 @@
|
||||
#include "nsIURI.h"
|
||||
#include "nsINameSpaceManager.h"
|
||||
#include "nsIHTMLContentContainer.h"
|
||||
#include "nsStyleConsts.h"
|
||||
|
||||
MOZ_DECL_CTOR_COUNTER(nsDOMCSSAttributeDeclaration)
|
||||
|
||||
@@ -85,7 +86,7 @@ nsDOMCSSAttributeDeclaration::RemoveProperty(const nsAReadableString& aPropertyN
|
||||
nsHTMLAtoms::style);
|
||||
}
|
||||
|
||||
PRInt32 hint = decl->GetStyleImpact();
|
||||
PRInt32 hint = NS_STYLE_HINT_NONE;
|
||||
|
||||
nsCSSProperty prop = nsCSSProps::LookupProperty(aPropertyName);
|
||||
nsCSSValue val;
|
||||
@@ -96,6 +97,7 @@ nsDOMCSSAttributeDeclaration::RemoveProperty(const nsAReadableString& aPropertyN
|
||||
// We pass in eCSSProperty_UNKNOWN here so that we don't get the
|
||||
// property name in the return string.
|
||||
val.ToString(aReturn, eCSSProperty_UNKNOWN);
|
||||
hint = nsCSSProps::kHintTable[prop];
|
||||
} else {
|
||||
// If we tried to remove an invalid property or a property that wasn't
|
||||
// set we simply return success and an empty string
|
||||
|
||||
Reference in New Issue
Block a user