Index: Source/core/css/PropertySetCSSStyleDeclaration.cpp |
diff --git a/Source/core/css/PropertySetCSSStyleDeclaration.cpp b/Source/core/css/PropertySetCSSStyleDeclaration.cpp |
index 064e654dec9281772133327c1fe0ae7a2b13c631..7a7fea493afd612aab544ddb0095c75023cd1e94 100644 |
--- a/Source/core/css/PropertySetCSSStyleDeclaration.cpp |
+++ b/Source/core/css/PropertySetCSSStyleDeclaration.cpp |
@@ -215,11 +215,21 @@ void AbstractPropertySetCSSStyleDeclaration::setProperty(const String& propertyN |
if (!propertyID) |
return; |
- bool important = priority.find("important", 0, false) != kNotFound; |
+ bool important = equalIgnoringCase(priority, "important"); |
+ if (!important && !priority.isEmpty()) |
+ return; |
esprehn
2014/02/25 19:20:39
Can you make this change separately?
|
willMutate(); |
- bool changed = propertySet()->setProperty(propertyID, value, important, contextStyleSheet()); |
+ bool changed; |
+ |
+ if (priority.isNull()) { |
+ RefPtr<MutableStylePropertySet> tempPropertySet = MutableStylePropertySet::create(propertySet()->cssParserMode()); |
+ changed = tempPropertySet->setProperty(propertyID, value, important, contextStyleSheet()); |
+ propertySet()->mergeAndOverrideOnConflict(tempPropertySet.get()); |
esprehn
2014/02/25 19:20:39
This doesn't seem like the right way to fix this.
|
+ } else { |
+ changed = propertySet()->setProperty(propertyID, value, important, contextStyleSheet()); |
+ } |
didMutate(changed ? PropertyChanged : NoChanges); |