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

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

Issue 1215503009: Remove an instance of isPropertyImplicit from StylePropertySerializer.cpp. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 6 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 | « LayoutTests/fast/multicol/columns-shorthand-parsing-2-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/StylePropertySerializer.cpp
diff --git a/Source/core/css/StylePropertySerializer.cpp b/Source/core/css/StylePropertySerializer.cpp
index cc600be7409478e8f9127891d98ece28ed323c22..93a7993b43e942240943cc36b69a8a15a7273bdd 100644
--- a/Source/core/css/StylePropertySerializer.cpp
+++ b/Source/core/css/StylePropertySerializer.cpp
@@ -732,27 +732,22 @@ String StylePropertySerializer::getShorthandValue(const StylePropertyShorthand&
String commonValue;
StringBuilder result;
for (unsigned i = 0; i < shorthand.length(); ++i) {
- if (!m_propertySet.isPropertyImplicit(shorthand.properties()[i])) {
- const CSSValue* value = m_propertySet.getPropertyCSSValue(shorthand.properties()[i]);
- if (!value)
- return String();
- String valueText = value->cssText();
- if (!i)
- commonValue = valueText;
- else if (!commonValue.isNull() && commonValue != valueText)
- commonValue = String();
- if (value->isInitialValue())
- continue;
- if (!result.isEmpty())
- result.append(separator);
- result.append(valueText);
- } else
+ const CSSValue* value = m_propertySet.getPropertyCSSValue(shorthand.properties()[i]);
+ if (!value)
+ return String();
+ String valueText = value->cssText();
+ if (!i)
+ commonValue = valueText;
+ else if (!commonValue.isNull() && commonValue != valueText)
commonValue = String();
+ if (value->isInitialValue())
+ continue;
+ if (!result.isEmpty())
+ result.append(separator);
+ result.append(valueText);
}
if (isInitialOrInherit(commonValue))
return commonValue;
- if (result.isEmpty())
- return String();
return result.toString();
}
« no previous file with comments | « LayoutTests/fast/multicol/columns-shorthand-parsing-2-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698