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 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 void addParsedProperties(const Vector<CSSProperty, 256>&); | 186 void addParsedProperties(const Vector<CSSProperty, 256>&); |
187 void addParsedProperty(const CSSProperty&); | 187 void addParsedProperty(const CSSProperty&); |
188 | 188 |
189 // These expand shorthand properties into multiple properties. | 189 // These expand shorthand properties into multiple properties. |
190 bool setProperty(CSSPropertyID, const String& value, bool important = false,
StyleSheetContents* contextStyleSheet = 0); | 190 bool setProperty(CSSPropertyID, const String& value, bool important = false,
StyleSheetContents* contextStyleSheet = 0); |
191 void setProperty(CSSPropertyID, PassRefPtr<CSSValue>, bool important = false
); | 191 void setProperty(CSSPropertyID, PassRefPtr<CSSValue>, bool important = false
); |
192 | 192 |
193 // These do not. FIXME: This is too messy, we can do better. | 193 // These do not. FIXME: This is too messy, we can do better. |
194 bool setProperty(CSSPropertyID, CSSValueID identifier, bool important = fals
e); | 194 bool setProperty(CSSPropertyID, CSSValueID identifier, bool important = fals
e); |
195 bool setProperty(CSSPropertyID, CSSPropertyID identifier, bool important = f
alse); | 195 bool setProperty(CSSPropertyID, CSSPropertyID identifier, bool important = f
alse); |
196 void appendPrefixingVariantProperty(const CSSProperty&); | 196 void appendProperty(const CSSProperty&); |
197 void setPrefixingVariantProperty(const CSSProperty&); | |
198 void setProperty(const CSSProperty&, CSSProperty* slot = 0); | 197 void setProperty(const CSSProperty&, CSSProperty* slot = 0); |
199 | 198 |
200 bool removeProperty(CSSPropertyID, String* returnText = 0); | 199 bool removeProperty(CSSPropertyID, String* returnText = 0); |
201 void removePrefixedOrUnprefixedProperty(CSSPropertyID); | |
202 void removeBlockProperties(); | 200 void removeBlockProperties(); |
203 bool removePropertiesInSet(const CSSPropertyID* set, unsigned length); | 201 bool removePropertiesInSet(const CSSPropertyID* set, unsigned length); |
204 void removeEquivalentProperties(const StylePropertySet*); | 202 void removeEquivalentProperties(const StylePropertySet*); |
205 void removeEquivalentProperties(const CSSStyleDeclaration*); | 203 void removeEquivalentProperties(const CSSStyleDeclaration*); |
206 | 204 |
207 void mergeAndOverrideOnConflict(const StylePropertySet*); | |
208 | |
209 void clear(); | 205 void clear(); |
210 void parseDeclaration(const String& styleDeclaration, StyleSheetContents* co
ntextStyleSheet); | 206 void parseDeclaration(const String& styleDeclaration, StyleSheetContents* co
ntextStyleSheet); |
211 | 207 |
212 CSSStyleDeclaration* ensureCSSStyleDeclaration(); | 208 CSSStyleDeclaration* ensureCSSStyleDeclaration(); |
213 int findPropertyIndex(CSSPropertyID) const; | 209 int findPropertyIndex(CSSPropertyID) const; |
214 | 210 |
215 private: | 211 private: |
216 explicit MutableStylePropertySet(CSSParserMode); | 212 explicit MutableStylePropertySet(CSSParserMode); |
217 explicit MutableStylePropertySet(const StylePropertySet&); | 213 explicit MutableStylePropertySet(const StylePropertySet&); |
218 MutableStylePropertySet(const CSSProperty* properties, unsigned count); | 214 MutableStylePropertySet(const CSSProperty* properties, unsigned count); |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
275 inline int StylePropertySet::findPropertyIndex(CSSPropertyID propertyID) const | 271 inline int StylePropertySet::findPropertyIndex(CSSPropertyID propertyID) const |
276 { | 272 { |
277 if (m_isMutable) | 273 if (m_isMutable) |
278 return toMutableStylePropertySet(this)->findPropertyIndex(propertyID); | 274 return toMutableStylePropertySet(this)->findPropertyIndex(propertyID); |
279 return toImmutableStylePropertySet(this)->findPropertyIndex(propertyID); | 275 return toImmutableStylePropertySet(this)->findPropertyIndex(propertyID); |
280 } | 276 } |
281 | 277 |
282 } // namespace blink | 278 } // namespace blink |
283 | 279 |
284 #endif // SKY_ENGINE_CORE_CSS_STYLEPROPERTYSET_H_ | 280 #endif // SKY_ENGINE_CORE_CSS_STYLEPROPERTYSET_H_ |
OLD | NEW |