summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/css/CSSStyleDeclaration.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/css/CSSStyleDeclaration.cpp')
-rw-r--r--Source/WebCore/css/CSSStyleDeclaration.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/Source/WebCore/css/CSSStyleDeclaration.cpp b/Source/WebCore/css/CSSStyleDeclaration.cpp
index 0a7aa1c..67dc6e0 100644
--- a/Source/WebCore/css/CSSStyleDeclaration.cpp
+++ b/Source/WebCore/css/CSSStyleDeclaration.cpp
@@ -107,10 +107,13 @@ bool CSSStyleDeclaration::isPropertyImplicit(const String& propertyName)
void CSSStyleDeclaration::setProperty(const String& propertyName, const String& value, ExceptionCode& ec)
{
size_t important = value.find("!important", 0, false);
+ int propertyID = cssPropertyID(propertyName);
+ if (!propertyID)
+ return;
if (important == notFound)
- setProperty(propertyName, value, "", ec);
+ setProperty(propertyID, value, false, ec);
else
- setProperty(propertyName, value.left(important - 1), "important", ec);
+ setProperty(propertyID, value.left(important - 1), true, ec);
}
void CSSStyleDeclaration::setProperty(const String& propertyName, const String& value, const String& priority, ExceptionCode& ec)