| 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, 2008, 2012 Apple Inc. All rights reserved. | 3 * Copyright (C) 2004, 2005, 2006, 2008, 2012 Apple Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
| 6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
| 7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
| 8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
| 9 * | 9 * |
| 10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 const CSSValue* propertyValue() const; | 78 const CSSValue* propertyValue() const; |
| 79 | 79 |
| 80 const StylePropertySet& m_propertySet; | 80 const StylePropertySet& m_propertySet; |
| 81 unsigned m_index; | 81 unsigned m_index; |
| 82 }; | 82 }; |
| 83 | 83 |
| 84 unsigned propertyCount() const; | 84 unsigned propertyCount() const; |
| 85 bool isEmpty() const; | 85 bool isEmpty() const; |
| 86 PropertyReference propertyAt(unsigned index) const { return PropertyReferenc
e(*this, index); } | 86 PropertyReference propertyAt(unsigned index) const { return PropertyReferenc
e(*this, index); } |
| 87 int findPropertyIndex(CSSPropertyID) const; | 87 int findPropertyIndex(CSSPropertyID) const; |
| 88 size_t findVariableIndex(const AtomicString& name) const; |
| 88 | 89 |
| 89 PassRefPtr<CSSValue> getPropertyCSSValue(CSSPropertyID) const; | 90 PassRefPtr<CSSValue> getPropertyCSSValue(CSSPropertyID) const; |
| 90 String getPropertyValue(CSSPropertyID) const; | 91 String getPropertyValue(CSSPropertyID) const; |
| 92 unsigned variableCount() const; |
| 93 String variableValue(const AtomicString& name) const; |
| 94 |
| 91 bool propertyIsImportant(CSSPropertyID) const; | 95 bool propertyIsImportant(CSSPropertyID) const; |
| 92 CSSPropertyID getPropertyShorthand(CSSPropertyID) const; | 96 CSSPropertyID getPropertyShorthand(CSSPropertyID) const; |
| 93 bool isPropertyImplicit(CSSPropertyID) const; | 97 bool isPropertyImplicit(CSSPropertyID) const; |
| 94 | 98 |
| 95 PassRefPtr<MutableStylePropertySet> copyBlockProperties() const; | 99 PassRefPtr<MutableStylePropertySet> copyBlockProperties() const; |
| 96 | 100 |
| 97 CSSParserMode cssParserMode() const { return static_cast<CSSParserMode>(m_cs
sParserMode); } | 101 CSSParserMode cssParserMode() const { return static_cast<CSSParserMode>(m_cs
sParserMode); } |
| 98 | 102 |
| 99 void addSubresourceStyleURLs(ListHashSet<KURL>&, StyleSheetContents* context
StyleSheet) const; | 103 void addSubresourceStyleURLs(ListHashSet<KURL>&, StyleSheetContents* context
StyleSheet) const; |
| 100 | 104 |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 // These expand shorthand properties into multiple properties. | 194 // These expand shorthand properties into multiple properties. |
| 191 bool setProperty(CSSPropertyID, const String& value, bool important = false,
StyleSheetContents* contextStyleSheet = 0); | 195 bool setProperty(CSSPropertyID, const String& value, bool important = false,
StyleSheetContents* contextStyleSheet = 0); |
| 192 void setProperty(CSSPropertyID, PassRefPtr<CSSValue>, bool important = false
); | 196 void setProperty(CSSPropertyID, PassRefPtr<CSSValue>, bool important = false
); |
| 193 | 197 |
| 194 // These do not. FIXME: This is too messy, we can do better. | 198 // These do not. FIXME: This is too messy, we can do better. |
| 195 bool setProperty(CSSPropertyID, CSSValueID identifier, bool important = fals
e); | 199 bool setProperty(CSSPropertyID, CSSValueID identifier, bool important = fals
e); |
| 196 bool setProperty(CSSPropertyID, CSSPropertyID identifier, bool important = f
alse); | 200 bool setProperty(CSSPropertyID, CSSPropertyID identifier, bool important = f
alse); |
| 197 void appendPrefixingVariantProperty(const CSSProperty&); | 201 void appendPrefixingVariantProperty(const CSSProperty&); |
| 198 void setPrefixingVariantProperty(const CSSProperty&); | 202 void setPrefixingVariantProperty(const CSSProperty&); |
| 199 void setProperty(const CSSProperty&, CSSProperty* slot = 0); | 203 void setProperty(const CSSProperty&, CSSProperty* slot = 0); |
| 204 bool setVariableValue(const AtomicString& name, const String& value, bool im
portant = false); |
| 200 | 205 |
| 201 bool removeProperty(CSSPropertyID, String* returnText = 0); | 206 bool removeProperty(CSSPropertyID, String* returnText = 0); |
| 202 void removePrefixedOrUnprefixedProperty(CSSPropertyID); | 207 void removePrefixedOrUnprefixedProperty(CSSPropertyID); |
| 203 void removeBlockProperties(); | 208 void removeBlockProperties(); |
| 204 bool removePropertiesInSet(const CSSPropertyID* set, unsigned length); | 209 bool removePropertiesInSet(const CSSPropertyID* set, unsigned length); |
| 205 void removeEquivalentProperties(const StylePropertySet*); | 210 void removeEquivalentProperties(const StylePropertySet*); |
| 206 void removeEquivalentProperties(const CSSStyleDeclaration*); | 211 void removeEquivalentProperties(const CSSStyleDeclaration*); |
| 212 bool removeVariable(const AtomicString& name); |
| 213 bool clearVariables(); |
| 207 | 214 |
| 208 void mergeAndOverrideOnConflict(const StylePropertySet*); | 215 void mergeAndOverrideOnConflict(const StylePropertySet*); |
| 209 | 216 |
| 210 void clear(); | 217 void clear(); |
| 211 void parseDeclaration(const String& styleDeclaration, StyleSheetContents* co
ntextStyleSheet); | 218 void parseDeclaration(const String& styleDeclaration, StyleSheetContents* co
ntextStyleSheet); |
| 212 | 219 |
| 213 CSSStyleDeclaration* ensureCSSStyleDeclaration(); | 220 CSSStyleDeclaration* ensureCSSStyleDeclaration(); |
| 214 CSSStyleDeclaration* ensureInlineCSSStyleDeclaration(Element* parentElement)
; | 221 CSSStyleDeclaration* ensureInlineCSSStyleDeclaration(Element* parentElement)
; |
| 215 | 222 |
| 216 Vector<CSSProperty, 4> m_propertyVector; | 223 Vector<CSSProperty, 4> m_propertyVector; |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 259 | 266 |
| 260 if (m_isMutable) | 267 if (m_isMutable) |
| 261 delete static_cast<MutableStylePropertySet*>(this); | 268 delete static_cast<MutableStylePropertySet*>(this); |
| 262 else | 269 else |
| 263 delete static_cast<ImmutableStylePropertySet*>(this); | 270 delete static_cast<ImmutableStylePropertySet*>(this); |
| 264 } | 271 } |
| 265 | 272 |
| 266 } // namespace WebCore | 273 } // namespace WebCore |
| 267 | 274 |
| 268 #endif // StylePropertySet_h | 275 #endif // StylePropertySet_h |
| OLD | NEW |