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 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 Loading... |
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 |
OLD | NEW |