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

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

Issue 2261533002: Fix serializing of 'unset' sub-properties (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: V2 Created 4 years, 4 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 | « third_party/WebKit/LayoutTests/fast/css/background-serialize.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/css/StylePropertySerializer.cpp
diff --git a/third_party/WebKit/Source/core/css/StylePropertySerializer.cpp b/third_party/WebKit/Source/core/css/StylePropertySerializer.cpp
index 72ace2c4594534ac0464970a4c34c23a34c52b59..911704e775f27b58193277f85033bcdcbf29a27a 100644
--- a/third_party/WebKit/Source/core/css/StylePropertySerializer.cpp
+++ b/third_party/WebKit/Source/core/css/StylePropertySerializer.cpp
@@ -354,9 +354,7 @@ String StylePropertySerializer::commonShorthandChecks(const StylePropertyShortha
if (hasImportant && hasNonImportant)
return emptyString();
- // TODO(timloh): This should be isCSSWideKeyword()
- if (longhands[0]->isInitialValue() || longhands[0]->isInheritedValue()
- || longhands[0]->isPendingSubstitutionValue()) {
+ if (longhands[0]->isCSSWideKeyword() || longhands[0]->isPendingSubstitutionValue()) {
bool success = true;
for (int i = 1; i < longhandCount; i++) {
if (!longhands[i]->equals(*longhands[0])) {
@@ -384,8 +382,7 @@ String StylePropertySerializer::commonShorthandChecks(const StylePropertyShortha
}
if (!allowInitial && value.isInitialValue())
return emptyString();
- // TODO(timloh): This should also check unset
- if (value.isInheritedValue() || value.isPendingSubstitutionValue())
+ if (value.isInheritedValue() || value.isUnsetValue() || value.isPendingSubstitutionValue())
return emptyString();
if (value.isVariableReferenceValue())
return emptyString();
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/css/background-serialize.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698