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

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

Issue 1094003002: CSSStyleDeclaration::setProperty should override important style (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Renamed addParsedProperty to addRespectingCascade Created 5 years, 8 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
Index: Source/core/css/StylePropertySet.cpp
diff --git a/Source/core/css/StylePropertySet.cpp b/Source/core/css/StylePropertySet.cpp
index 310c2a543c87b6d3dad8f560b3fe8410f56ad5d3..597f5ed9b0012f1bb9d0dbec8843f44e77003922 100644
--- a/Source/core/css/StylePropertySet.cpp
+++ b/Source/core/css/StylePropertySet.cpp
@@ -305,14 +305,13 @@ void MutableStylePropertySet::parseDeclarationList(const String& styleDeclaratio
bool MutableStylePropertySet::addParsedProperties(const WillBeHeapVector<CSSProperty, 256>& properties)
{
- bool changed = false;
Timothy Loh 2015/04/24 09:21:27 Why did we get rid of this?
sashab 2015/04/26 23:23:41 Sorry, I made a mistake. I thought this setPropert
m_propertyVector.reserveCapacity(m_propertyVector.size() + properties.size());
for (unsigned i = 0; i < properties.size(); ++i)
- changed |= addParsedProperty(properties[i]);
- return changed;
+ setProperty(properties[i]);
+ return true;
}
-bool MutableStylePropertySet::addParsedProperty(const CSSProperty& property)
+bool MutableStylePropertySet::addRespectingCascade(const CSSProperty& property)
{
// Only add properties that have no !important counterpart present
if (!propertyIsImportant(property.id()) || property.isImportant())

Powered by Google App Engine
This is Rietveld 408576698