Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(466)

Unified Diff: Source/core/css/PropertySetCSSStyleDeclaration.cpp

Issue 180353002: Make getProperty more strict when handling the priority parameter (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add idl change to distinguish between null and empty string Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/css/CSSStyleDeclaration.idl ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/PropertySetCSSStyleDeclaration.cpp
diff --git a/Source/core/css/PropertySetCSSStyleDeclaration.cpp b/Source/core/css/PropertySetCSSStyleDeclaration.cpp
index 6d132943686b75d5d9fdcffa0b5e59874c31fb18..140976939473e0247f639ca7ff1908dcfc42801d 100644
--- a/Source/core/css/PropertySetCSSStyleDeclaration.cpp
+++ b/Source/core/css/PropertySetCSSStyleDeclaration.cpp
@@ -215,7 +215,9 @@ 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;
willMutate();
« no previous file with comments | « Source/core/css/CSSStyleDeclaration.idl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698