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 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
197 StylePropertySet, | 197 StylePropertySet, |
198 set, | 198 set, |
199 !set->isMutable(), | 199 !set->isMutable(), |
200 !set.isMutable()); | 200 !set.isMutable()); |
201 | 201 |
202 class CORE_EXPORT MutableStylePropertySet : public StylePropertySet { | 202 class CORE_EXPORT MutableStylePropertySet : public StylePropertySet { |
203 public: | 203 public: |
204 ~MutableStylePropertySet() {} | 204 ~MutableStylePropertySet() {} |
205 static MutableStylePropertySet* create(CSSParserMode); | 205 static MutableStylePropertySet* create(CSSParserMode); |
206 static MutableStylePropertySet* create(const CSSProperty* properties, | 206 static MutableStylePropertySet* create(const CSSProperty* properties, |
207 unsigned count); | 207 unsigned count, |
208 CSSParserMode = HTMLStandardMode); | |
Timothy Loh
2016/10/05 03:08:54
Doesn't look like any of these changes are needed.
rwlbuis
2016/10/05 14:21:37
Well spotted, I think I was trying multiple approa
| |
208 | 209 |
209 unsigned propertyCount() const { return m_propertyVector.size(); } | 210 unsigned propertyCount() const { return m_propertyVector.size(); } |
210 | 211 |
211 // Returns whether this style set was changed. | 212 // Returns whether this style set was changed. |
212 bool addParsedProperties(const HeapVector<CSSProperty, 256>&); | 213 bool addParsedProperties(const HeapVector<CSSProperty, 256>&); |
213 bool addRespectingCascade(const CSSProperty&); | 214 bool addRespectingCascade(const CSSProperty&); |
214 | 215 |
215 // These expand shorthand properties into multiple properties. | 216 // These expand shorthand properties into multiple properties. |
216 bool setProperty(CSSPropertyID unresolvedProperty, | 217 bool setProperty(CSSPropertyID unresolvedProperty, |
217 const String& value, | 218 const String& value, |
(...skipping 26 matching lines...) Expand all Loading... | |
244 CSSStyleDeclaration* ensureCSSStyleDeclaration(); | 245 CSSStyleDeclaration* ensureCSSStyleDeclaration(); |
245 | 246 |
246 template <typename T> // CSSPropertyID or AtomicString | 247 template <typename T> // CSSPropertyID or AtomicString |
247 int findPropertyIndex(T property) const; | 248 int findPropertyIndex(T property) const; |
248 | 249 |
249 DECLARE_TRACE_AFTER_DISPATCH(); | 250 DECLARE_TRACE_AFTER_DISPATCH(); |
250 | 251 |
251 private: | 252 private: |
252 explicit MutableStylePropertySet(CSSParserMode); | 253 explicit MutableStylePropertySet(CSSParserMode); |
253 explicit MutableStylePropertySet(const StylePropertySet&); | 254 explicit MutableStylePropertySet(const StylePropertySet&); |
254 MutableStylePropertySet(const CSSProperty* properties, unsigned count); | 255 MutableStylePropertySet(const CSSProperty* properties, |
256 unsigned count, | |
257 CSSParserMode); | |
255 | 258 |
256 bool removePropertyAtIndex(int, String* returnText); | 259 bool removePropertyAtIndex(int, String* returnText); |
257 | 260 |
258 bool removeShorthandProperty(CSSPropertyID); | 261 bool removeShorthandProperty(CSSPropertyID); |
259 bool removeShorthandProperty(const AtomicString& customPropertyName) { | 262 bool removeShorthandProperty(const AtomicString& customPropertyName) { |
260 return false; | 263 return false; |
261 } | 264 } |
262 CSSProperty* findCSSPropertyWithID( | 265 CSSProperty* findCSSPropertyWithID( |
263 CSSPropertyID, | 266 CSSPropertyID, |
264 const AtomicString& customPropertyName = nullAtom); | 267 const AtomicString& customPropertyName = nullAtom); |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
316 template <typename T> | 319 template <typename T> |
317 inline int StylePropertySet::findPropertyIndex(T property) const { | 320 inline int StylePropertySet::findPropertyIndex(T property) const { |
318 if (m_isMutable) | 321 if (m_isMutable) |
319 return toMutableStylePropertySet(this)->findPropertyIndex(property); | 322 return toMutableStylePropertySet(this)->findPropertyIndex(property); |
320 return toImmutableStylePropertySet(this)->findPropertyIndex(property); | 323 return toImmutableStylePropertySet(this)->findPropertyIndex(property); |
321 } | 324 } |
322 | 325 |
323 } // namespace blink | 326 } // namespace blink |
324 | 327 |
325 #endif // StylePropertySet_h | 328 #endif // StylePropertySet_h |
OLD | NEW |