Bug 762119 - Simplify ParseMappedAttrAnimValueCallback. r=dholbert

This commit is contained in:
Robert Longson 2012-06-08 08:54:39 +01:00
parent 019aa486f7
commit 6d57bbf31d

View File

@ -1073,7 +1073,7 @@ public:
// Parses a mapped attribute value.
void ParseMappedAttrValue(nsIAtom* aMappedAttrName,
nsAString& aMappedAttrValue);
const nsAString& aMappedAttrValue);
// If we've parsed any values for mapped attributes, this method returns
// a new already_AddRefed css::StyleRule that incorporates the parsed
@ -1121,7 +1121,7 @@ MappedAttrParser::~MappedAttrParser()
void
MappedAttrParser::ParseMappedAttrValue(nsIAtom* aMappedAttrName,
nsAString& aMappedAttrValue)
const nsAString& aMappedAttrValue)
{
if (!mDecl) {
mDecl = new css::Declaration();
@ -1243,11 +1243,7 @@ ParseMappedAttrAnimValueCallback(void* aObject,
static_cast<MappedAttrParser*>(aData);
nsStringBuffer* valueBuf = static_cast<nsStringBuffer*>(aPropertyValue);
nsAutoString value;
PRUint32 len = NS_strlen(static_cast<PRUnichar*>(valueBuf->Data()));
valueBuf->ToString(len, value);
mappedAttrParser->ParseMappedAttrValue(aPropertyName, value);
mappedAttrParser->ParseMappedAttrValue(aPropertyName, nsCheapString(valueBuf));
}
// Callback for freeing animated content style rule, in property table.