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

Unified Diff: sky/engine/core/css/PropertySetCSSStyleDeclaration.cpp

Issue 860423004: Remove css !important (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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 | « sky/engine/core/css/PropertySetCSSStyleDeclaration.h ('k') | sky/engine/core/css/StylePropertySerializer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/css/PropertySetCSSStyleDeclaration.cpp
diff --git a/sky/engine/core/css/PropertySetCSSStyleDeclaration.cpp b/sky/engine/core/css/PropertySetCSSStyleDeclaration.cpp
index 503a0e4587299e962093ac426c851ffa0336c467..18c26c3c4a7f38ad38d3533b166d85f52d7461e0 100644
--- a/sky/engine/core/css/PropertySetCSSStyleDeclaration.cpp
+++ b/sky/engine/core/css/PropertySetCSSStyleDeclaration.cpp
@@ -166,14 +166,6 @@ String AbstractPropertySetCSSStyleDeclaration::getPropertyValue(const String &pr
return propertySet().getPropertyValue(propertyID);
}
-String AbstractPropertySetCSSStyleDeclaration::getPropertyPriority(const String& propertyName)
-{
- CSSPropertyID propertyID = cssPropertyID(propertyName);
- if (!propertyID)
- return String();
- return propertySet().propertyIsImportant(propertyID) ? "important" : "";
-}
-
String AbstractPropertySetCSSStyleDeclaration::getPropertyShorthand(const String& propertyName)
{
CSSPropertyID propertyID = cssPropertyID(propertyName);
@@ -199,11 +191,7 @@ void AbstractPropertySetCSSStyleDeclaration::setProperty(const String& propertyN
if (!propertyID)
return;
- bool important = equalIgnoringCase(priority, "important");
- if (!important && !priority.isEmpty())
- return;
-
- setPropertyInternal(propertyID, value, important, exceptionState);
+ setPropertyInternal(propertyID, value, exceptionState);
}
String AbstractPropertySetCSSStyleDeclaration::removeProperty(const String& propertyName, ExceptionState& exceptionState)
@@ -235,12 +223,12 @@ String AbstractPropertySetCSSStyleDeclaration::getPropertyValueInternal(CSSPrope
return propertySet().getPropertyValue(propertyID);
}
-void AbstractPropertySetCSSStyleDeclaration::setPropertyInternal(CSSPropertyID propertyID, const String& value, bool important, ExceptionState&)
+void AbstractPropertySetCSSStyleDeclaration::setPropertyInternal(CSSPropertyID propertyID, const String& value, ExceptionState&)
{
StyleAttributeMutationScope mutationScope(this);
willMutate();
- bool changed = propertySet().setProperty(propertyID, value, important, contextStyleSheet());
+ bool changed = propertySet().setProperty(propertyID, value, contextStyleSheet());
didMutate(changed ? PropertyChanged : NoChanges);
« no previous file with comments | « sky/engine/core/css/PropertySetCSSStyleDeclaration.h ('k') | sky/engine/core/css/StylePropertySerializer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698