OLD | NEW |
---|---|
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 Loading... | |
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 result.append(value->customCSSText()); | 187 String customPropertyValue = value->customCSSText(); |
Timothy Loh
2016/07/29 01:15:06
I'd rather this line just left as is (looks odd to
rwlbuis
2016/07/29 01:25:17
Well spotted, I had a check on customPropertyValue
| |
188 if (!value->value()) | |
189 result.append(' '); | |
190 result.append(customPropertyValue); | |
188 if (property.isImportant()) | 191 if (property.isImportant()) |
189 result.append(" !important"); | 192 result.append(" !important"); |
190 result.append(';'); | 193 result.append(';'); |
191 return result.toString(); | 194 return result.toString(); |
192 } | 195 } |
193 | 196 |
194 static String getApplyAtRuleText(const CSSValue* value, bool isNotFirstDecl) | 197 static String getApplyAtRuleText(const CSSValue* value, bool isNotFirstDecl) |
195 { | 198 { |
196 StringBuilder result; | 199 StringBuilder result; |
197 if (isNotFirstDecl) | 200 if (isNotFirstDecl) |
(...skipping 690 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
888 builder.append(", "); | 891 builder.append(", "); |
889 | 892 |
890 const CSSValue& xValue = repeatXList ? repeatXList->item(i % repeatXList ->length()) : repeatX; | 893 const CSSValue& xValue = repeatXList ? repeatXList->item(i % repeatXList ->length()) : repeatX; |
891 const CSSValue& yValue = repeatYList ? repeatYList->item(i % repeatYList ->length()) : repeatY; | 894 const CSSValue& yValue = repeatYList ? repeatYList->item(i % repeatYList ->length()) : repeatY; |
892 appendBackgroundRepeatValue(builder, xValue, yValue); | 895 appendBackgroundRepeatValue(builder, xValue, yValue); |
893 } | 896 } |
894 return builder.toString(); | 897 return builder.toString(); |
895 } | 898 } |
896 | 899 |
897 } // namespace blink | 900 } // namespace blink |
OLD | NEW |