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 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
302 result.append(m_propertySet.propertyAt(repeatYPropertyIndex).cssText
()); | 302 result.append(m_propertySet.propertyAt(repeatYPropertyIndex).cssText
()); |
303 } | 303 } |
304 } | 304 } |
305 | 305 |
306 ASSERT(!numDecls ^ !result.isEmpty()); | 306 ASSERT(!numDecls ^ !result.isEmpty()); |
307 return result.toString(); | 307 return result.toString(); |
308 } | 308 } |
309 | 309 |
310 String StylePropertySerializer::getPropertyValue(CSSPropertyID propertyID) const | 310 String StylePropertySerializer::getPropertyValue(CSSPropertyID propertyID) const |
311 { | 311 { |
312 // Only enabled properties should be part of the style. | |
313 ASSERT(RuntimeCSSEnabled::isCSSPropertyEnabled(propertyID)); | |
314 // Shorthand and 4-values properties | 312 // Shorthand and 4-values properties |
315 switch (propertyID) { | 313 switch (propertyID) { |
316 case CSSPropertyBorderSpacing: | 314 case CSSPropertyBorderSpacing: |
317 return borderSpacingValue(borderSpacingShorthand()); | 315 return borderSpacingValue(borderSpacingShorthand()); |
318 case CSSPropertyBackgroundPosition: | 316 case CSSPropertyBackgroundPosition: |
319 return getLayeredShorthandValue(backgroundPositionShorthand()); | 317 return getLayeredShorthandValue(backgroundPositionShorthand()); |
320 case CSSPropertyBackgroundRepeat: | 318 case CSSPropertyBackgroundRepeat: |
321 return getLayeredShorthandValue(backgroundRepeatShorthand()); | 319 return getLayeredShorthandValue(backgroundRepeatShorthand()); |
322 case CSSPropertyBackground: | 320 case CSSPropertyBackground: |
323 return getLayeredShorthandValue(backgroundShorthand()); | 321 return getLayeredShorthandValue(backgroundShorthand()); |
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
751 if (!result.isEmpty()) | 749 if (!result.isEmpty()) |
752 result.append(' '); | 750 result.append(' '); |
753 result.append(value); | 751 result.append(value); |
754 } | 752 } |
755 if (isInitialOrInherit(commonValue)) | 753 if (isInitialOrInherit(commonValue)) |
756 return commonValue; | 754 return commonValue; |
757 return result.isEmpty() ? String() : result.toString(); | 755 return result.isEmpty() ? String() : result.toString(); |
758 } | 756 } |
759 | 757 |
760 } | 758 } |
OLD | NEW |