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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 String get4Values(const StylePropertyShorthand&) const; | 43 String get4Values(const StylePropertyShorthand&) const; |
44 String borderSpacingValue(const StylePropertyShorthand&) const; | 44 String borderSpacingValue(const StylePropertyShorthand&) const; |
45 String getShorthandValue(const StylePropertyShorthand&) const; | 45 String getShorthandValue(const StylePropertyShorthand&) const; |
46 String fontValue() const; | 46 String fontValue() const; |
47 void appendFontLonghandValueIfExplicit(CSSPropertyID, StringBuilder& result,
String& value) const; | 47 void appendFontLonghandValueIfExplicit(CSSPropertyID, StringBuilder& result,
String& value) const; |
48 String backgroundRepeatPropertyValue() const; | 48 String backgroundRepeatPropertyValue() const; |
49 String getPropertyText(CSSPropertyID, const String& value, bool isImportant,
bool isNotFirstDecl) const; | 49 String getPropertyText(CSSPropertyID, const String& value, bool isImportant,
bool isNotFirstDecl) const; |
50 bool isPropertyShorthandAvailable(const StylePropertyShorthand&) const; | 50 bool isPropertyShorthandAvailable(const StylePropertyShorthand&) const; |
51 bool shorthandHasOnlyInitialOrInheritedValue(const StylePropertyShorthand&)
const; | 51 bool shorthandHasOnlyInitialOrInheritedValue(const StylePropertyShorthand&)
const; |
52 void appendBackgroundPropertyAsText(StringBuilder& result, unsigned& numDecl
s) const; | 52 void appendBackgroundPropertyAsText(StringBuilder& result, unsigned& numDecl
s) const; |
| 53 String getAllPropertyValue() const; |
| 54 String getExpandedAllPropertyValue() const; |
| 55 bool hasAllShorthand(String& result) const; |
| 56 |
| 57 private: |
| 58 class CSSPropertyInternal { |
| 59 public: |
| 60 CSSPropertyInternal() |
| 61 : m_propertyId(CSSPropertyInvalid) |
| 62 , m_value(0) |
| 63 , m_isImportant(false) |
| 64 , m_isInherited(false) |
| 65 , m_isImplicit(false) |
| 66 { } |
| 67 |
| 68 CSSPropertyInternal(CSSPropertyID propertyId, CSSValue* value, bool isIm
portant, bool isInherited, bool isImplicit) |
| 69 : m_propertyId(propertyId) |
| 70 , m_value(value) |
| 71 , m_isImportant(isImportant) |
| 72 , m_isInherited(isInherited) |
| 73 , m_isImplicit(isImplicit) |
| 74 { } |
| 75 |
| 76 CSSPropertyInternal(StylePropertySet::PropertyReference property) |
| 77 : m_propertyId(property.id()) |
| 78 , m_value(property.value()) |
| 79 , m_isImportant(property.isImportant()) |
| 80 , m_isInherited(property.isInherited()) |
| 81 , m_isImplicit(property.isImplicit()) |
| 82 { } |
| 83 |
| 84 CSSPropertyID id() const { return m_propertyId; } |
| 85 CSSValue* value() const { return m_value; } |
| 86 bool isImportant() const { return m_isImportant; } |
| 87 bool isInherited() const { return m_isInherited; } |
| 88 bool isImplicit() const { return m_isImplicit; } |
| 89 |
| 90 private: |
| 91 CSSPropertyID m_propertyId; |
| 92 CSSValue* m_value; |
| 93 bool m_isImportant; |
| 94 bool m_isInherited; |
| 95 bool m_isImplicit; |
| 96 }; |
| 97 |
| 98 void expandAll(); |
| 99 unsigned propertyCount() const; |
| 100 CSSPropertyInternal propertyAt(unsigned index) const; |
| 101 String propertyValue(CSSPropertyID) const; |
| 102 CSSValue* getPropertyCSSValue(CSSPropertyID) const; |
| 103 int findPropertyIndex(CSSPropertyID) const; |
| 104 bool isPropertyImplicit(CSSPropertyID) const; |
| 105 bool propertyIsImportant(CSSPropertyID) const; |
53 | 106 |
54 const StylePropertySet& m_propertySet; | 107 const StylePropertySet& m_propertySet; |
| 108 Vector<CSSPropertyInternal> m_propertyVector; |
55 }; | 109 }; |
56 | 110 |
57 } // namespace WebCore | 111 } // namespace WebCore |
58 | 112 |
59 #endif | 113 #endif |
OLD | NEW |