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

Side by Side Diff: third_party/WebKit/Source/core/css/StylePropertySerializer.cpp

Issue 2188343002: Fix serialization of css-wide keywords in custom properties (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address review comments 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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSCustomPropertyDeclaration.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * (C) 1999-2003 Lars Knoll (knoll@kde.org) 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All r ights reserved. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All r ights reserved.
4 * Copyright (C) 2011 Research In Motion Limited. All rights reserved. 4 * Copyright (C) 2011 Research In Motion Limited. All rights reserved.
5 * Copyright (C) 2013 Intel Corporation. All rights reserved. 5 * Copyright (C) 2013 Intel Corporation. All rights reserved.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 177
178 String StylePropertySerializer::getCustomPropertyText(const PropertyValueForSeri alizer& property, bool isNotFirstDecl) const 178 String StylePropertySerializer::getCustomPropertyText(const PropertyValueForSeri alizer& property, bool isNotFirstDecl) const
179 { 179 {
180 ASSERT(property.id() == CSSPropertyVariable); 180 ASSERT(property.id() == CSSPropertyVariable);
181 StringBuilder result; 181 StringBuilder result;
182 if (isNotFirstDecl) 182 if (isNotFirstDecl)
183 result.append(' '); 183 result.append(' ');
184 const CSSCustomPropertyDeclaration* value = toCSSCustomPropertyDeclaration(p roperty.value()); 184 const CSSCustomPropertyDeclaration* value = toCSSCustomPropertyDeclaration(p roperty.value());
185 result.append(value->name()); 185 result.append(value->name());
186 result.append(':'); 186 result.append(':');
187 if (!value->value())
188 result.append(' ');
187 result.append(value->customCSSText()); 189 result.append(value->customCSSText());
188 if (property.isImportant()) 190 if (property.isImportant())
189 result.append(" !important"); 191 result.append(" !important");
190 result.append(';'); 192 result.append(';');
191 return result.toString(); 193 return result.toString();
192 } 194 }
193 195
194 static String getApplyAtRuleText(const CSSValue* value, bool isNotFirstDecl) 196 static String getApplyAtRuleText(const CSSValue* value, bool isNotFirstDecl)
195 { 197 {
196 StringBuilder result; 198 StringBuilder result;
(...skipping 691 matching lines...) Expand 10 before | Expand all | Expand 10 after
888 builder.append(", "); 890 builder.append(", ");
889 891
890 const CSSValue& xValue = repeatXList ? repeatXList->item(i % repeatXList ->length()) : repeatX; 892 const CSSValue& xValue = repeatXList ? repeatXList->item(i % repeatXList ->length()) : repeatX;
891 const CSSValue& yValue = repeatYList ? repeatYList->item(i % repeatYList ->length()) : repeatY; 893 const CSSValue& yValue = repeatYList ? repeatYList->item(i % repeatYList ->length()) : repeatY;
892 appendBackgroundRepeatValue(builder, xValue, yValue); 894 appendBackgroundRepeatValue(builder, xValue, yValue);
893 } 895 }
894 return builder.toString(); 896 return builder.toString();
895 } 897 }
896 898
897 } // namespace blink 899 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSCustomPropertyDeclaration.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698