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 23 matching lines...) Expand all Loading... |
34 | 34 |
35 class StylePropertySerializer { | 35 class StylePropertySerializer { |
36 STACK_ALLOCATED(); | 36 STACK_ALLOCATED(); |
37 public: | 37 public: |
38 explicit StylePropertySerializer(const StylePropertySet&); | 38 explicit StylePropertySerializer(const StylePropertySet&); |
39 | 39 |
40 String asText() const; | 40 String asText() const; |
41 String getPropertyValue(CSSPropertyID) const; | 41 String getPropertyValue(CSSPropertyID) const; |
42 private: | 42 private: |
43 String getCommonValue(const StylePropertyShorthand&) const; | 43 String getCommonValue(const StylePropertyShorthand&) const; |
44 enum CommonValueMode { OmitUncommonValues, ReturnNullOnUncommonValues }; | 44 String borderPropertyValue() const; |
45 String borderPropertyValue(CommonValueMode) const; | |
46 String getLayeredShorthandValue(const StylePropertyShorthand&) const; | 45 String getLayeredShorthandValue(const StylePropertyShorthand&) const; |
47 String get4Values(const StylePropertyShorthand&) const; | 46 String get4Values(const StylePropertyShorthand&) const; |
48 String borderSpacingValue(const StylePropertyShorthand&) const; | 47 String borderSpacingValue(const StylePropertyShorthand&) const; |
49 String getShorthandValue(const StylePropertyShorthand&, String separator = "
") const; | 48 String getShorthandValue(const StylePropertyShorthand&, String separator = "
") const; |
50 String fontValue() const; | 49 String fontValue() const; |
51 String fontVariantValue() const; | 50 String fontVariantValue() const; |
52 void appendFontLonghandValueIfNotNormal(CSSPropertyID, StringBuilder& result
, String& value) const; | 51 void appendFontLonghandValueIfNotNormal(CSSPropertyID, StringBuilder& result
, String& value) const; |
53 String backgroundRepeatPropertyValue() const; | 52 String backgroundRepeatPropertyValue() const; |
54 String getPropertyText(CSSPropertyID, const String& value, bool isImportant,
bool isNotFirstDecl) const; | 53 String getPropertyText(CSSPropertyID, const String& value, bool isImportant,
bool isNotFirstDecl) const; |
55 bool isPropertyShorthandAvailable(const StylePropertyShorthand&) const; | 54 bool isPropertyShorthandAvailable(const StylePropertyShorthand&) const; |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 std::bitset<numCSSProperties> m_longhandPropertyUsed; | 115 std::bitset<numCSSProperties> m_longhandPropertyUsed; |
117 bool m_needToExpandAll; | 116 bool m_needToExpandAll; |
118 }; | 117 }; |
119 | 118 |
120 const StylePropertySetForSerializer m_propertySet; | 119 const StylePropertySetForSerializer m_propertySet; |
121 }; | 120 }; |
122 | 121 |
123 } // namespace blink | 122 } // namespace blink |
124 | 123 |
125 #endif // StylePropertySerializer_h | 124 #endif // StylePropertySerializer_h |
OLD | NEW |