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 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 inline const StylePropertyMetadata* ImmutableStylePropertySet::metadataArray() c
onst | 179 inline const StylePropertyMetadata* ImmutableStylePropertySet::metadataArray() c
onst |
180 { | 180 { |
181 return reinterpret_cast<const StylePropertyMetadata*>(&reinterpret_cast<cons
t char*>(&(this->m_storage))[m_arraySize * sizeof(RawPtrWillBeMember<CSSValue>)]
); | 181 return reinterpret_cast<const StylePropertyMetadata*>(&reinterpret_cast<cons
t char*>(&(this->m_storage))[m_arraySize * sizeof(RawPtrWillBeMember<CSSValue>)]
); |
182 } | 182 } |
183 | 183 |
184 DEFINE_TYPE_CASTS(ImmutableStylePropertySet, StylePropertySet, set, !set->isMuta
ble(), !set.isMutable()); | 184 DEFINE_TYPE_CASTS(ImmutableStylePropertySet, StylePropertySet, set, !set->isMuta
ble(), !set.isMutable()); |
185 | 185 |
186 class CORE_EXPORT MutableStylePropertySet : public StylePropertySet { | 186 class CORE_EXPORT MutableStylePropertySet : public StylePropertySet { |
187 public: | 187 public: |
188 ~MutableStylePropertySet() { } | 188 ~MutableStylePropertySet() { } |
189 static PassRefPtrWillBeRawPtr<MutableStylePropertySet> create(CSSParserMode
= HTMLQuirksMode); | 189 static PassRefPtrWillBeRawPtr<MutableStylePropertySet> create(CSSParserMode)
; |
190 static PassRefPtrWillBeRawPtr<MutableStylePropertySet> create(const CSSPrope
rty* properties, unsigned count); | 190 static PassRefPtrWillBeRawPtr<MutableStylePropertySet> create(const CSSPrope
rty* properties, unsigned count); |
191 | 191 |
192 unsigned propertyCount() const { return m_propertyVector.size(); } | 192 unsigned propertyCount() const { return m_propertyVector.size(); } |
193 | 193 |
194 // Returns whether this style set was changed. | 194 // Returns whether this style set was changed. |
195 bool addParsedProperties(const WillBeHeapVector<CSSProperty, 256>&); | 195 bool addParsedProperties(const WillBeHeapVector<CSSProperty, 256>&); |
196 bool addRespectingCascade(const CSSProperty&); | 196 bool addRespectingCascade(const CSSProperty&); |
197 | 197 |
198 // These expand shorthand properties into multiple properties. | 198 // These expand shorthand properties into multiple properties. |
199 bool setProperty(CSSPropertyID unresolvedProperty, const String& value, bool
important = false, StyleSheetContents* contextStyleSheet = 0); | 199 bool setProperty(CSSPropertyID unresolvedProperty, const String& value, bool
important = false, StyleSheetContents* contextStyleSheet = 0); |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
291 inline int StylePropertySet::findPropertyIndex(CSSPropertyID propertyID) const | 291 inline int StylePropertySet::findPropertyIndex(CSSPropertyID propertyID) const |
292 { | 292 { |
293 if (m_isMutable) | 293 if (m_isMutable) |
294 return toMutableStylePropertySet(this)->findPropertyIndex(propertyID); | 294 return toMutableStylePropertySet(this)->findPropertyIndex(propertyID); |
295 return toImmutableStylePropertySet(this)->findPropertyIndex(propertyID); | 295 return toImmutableStylePropertySet(this)->findPropertyIndex(propertyID); |
296 } | 296 } |
297 | 297 |
298 } // namespace blink | 298 } // namespace blink |
299 | 299 |
300 #endif // StylePropertySet_h | 300 #endif // StylePropertySet_h |
OLD | NEW |