| 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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 // These expand shorthand properties into multiple properties. | 186 // These expand shorthand properties into multiple properties. |
| 183 bool setProperty(CSSPropertyID, const String& value, bool important = false,
StyleSheetContents* contextStyleSheet = 0); | 187 bool setProperty(CSSPropertyID, const String& value, bool important = false,
StyleSheetContents* contextStyleSheet = 0); |
| 184 void setProperty(CSSPropertyID, PassRefPtr<CSSValue>, bool important = false
); | 188 void setProperty(CSSPropertyID, PassRefPtr<CSSValue>, bool important = false
); |
| 185 | 189 |
| 186 // These do not. FIXME: This is too messy, we can do better. | 190 // These do not. FIXME: This is too messy, we can do better. |
| 187 bool setProperty(CSSPropertyID, CSSValueID identifier, bool important = fals
e); | 191 bool setProperty(CSSPropertyID, CSSValueID identifier, bool important = fals
e); |
| 188 bool setProperty(CSSPropertyID, CSSPropertyID identifier, bool important = f
alse); | 192 bool setProperty(CSSPropertyID, CSSPropertyID identifier, bool important = f
alse); |
| 189 void appendPrefixingVariantProperty(const CSSProperty&); | 193 void appendPrefixingVariantProperty(const CSSProperty&); |
| 190 void setPrefixingVariantProperty(const CSSProperty&); | 194 void setPrefixingVariantProperty(const CSSProperty&); |
| 191 void setProperty(const CSSProperty&, CSSProperty* slot = 0); | 195 void setProperty(const CSSProperty&, CSSProperty* slot = 0); |
| 196 bool setVariableValue(const AtomicString& name, const String& value, bool im
portant = false); |
| 192 | 197 |
| 193 bool removeProperty(CSSPropertyID, String* returnText = 0); | 198 bool removeProperty(CSSPropertyID, String* returnText = 0); |
| 194 void removePrefixedOrUnprefixedProperty(CSSPropertyID); | 199 void removePrefixedOrUnprefixedProperty(CSSPropertyID); |
| 195 void removeBlockProperties(); | 200 void removeBlockProperties(); |
| 196 bool removePropertiesInSet(const CSSPropertyID* set, unsigned length); | 201 bool removePropertiesInSet(const CSSPropertyID* set, unsigned length); |
| 197 void removeEquivalentProperties(const StylePropertySet*); | 202 void removeEquivalentProperties(const StylePropertySet*); |
| 198 void removeEquivalentProperties(const CSSStyleDeclaration*); | 203 void removeEquivalentProperties(const CSSStyleDeclaration*); |
| 204 bool removeVariable(const AtomicString& name); |
| 205 bool clearVariables(); |
| 199 | 206 |
| 200 void mergeAndOverrideOnConflict(const StylePropertySet*); | 207 void mergeAndOverrideOnConflict(const StylePropertySet*); |
| 201 | 208 |
| 202 void clear(); | 209 void clear(); |
| 203 void parseDeclaration(const String& styleDeclaration, StyleSheetContents* co
ntextStyleSheet); | 210 void parseDeclaration(const String& styleDeclaration, StyleSheetContents* co
ntextStyleSheet); |
| 204 | 211 |
| 205 CSSStyleDeclaration* ensureCSSStyleDeclaration(); | 212 CSSStyleDeclaration* ensureCSSStyleDeclaration(); |
| 206 CSSStyleDeclaration* ensureInlineCSSStyleDeclaration(Element* parentElement)
; | 213 CSSStyleDeclaration* ensureInlineCSSStyleDeclaration(Element* parentElement)
; |
| 207 | 214 |
| 208 Vector<CSSProperty, 4> m_propertyVector; | 215 Vector<CSSProperty, 4> m_propertyVector; |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 252 | 259 |
| 253 if (m_isMutable) | 260 if (m_isMutable) |
| 254 delete static_cast<MutableStylePropertySet*>(this); | 261 delete static_cast<MutableStylePropertySet*>(this); |
| 255 else | 262 else |
| 256 delete static_cast<ImmutableStylePropertySet*>(this); | 263 delete static_cast<ImmutableStylePropertySet*>(this); |
| 257 } | 264 } |
| 258 | 265 |
| 259 } // namespace WebCore | 266 } // namespace WebCore |
| 260 | 267 |
| 261 #endif // StylePropertySet_h | 268 #endif // StylePropertySet_h |
| OLD | NEW |