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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 , m_arraySize(std::min(immutableArraySize, unsigned(MaxArraySize))) | 144 , m_arraySize(std::min(immutableArraySize, unsigned(MaxArraySize))) |
145 { } | 145 { } |
146 | 146 |
147 unsigned m_cssParserMode : 3; | 147 unsigned m_cssParserMode : 3; |
148 mutable unsigned m_isMutable : 1; | 148 mutable unsigned m_isMutable : 1; |
149 unsigned m_arraySize : 28; | 149 unsigned m_arraySize : 28; |
150 | 150 |
151 friend class PropertySetCSSStyleDeclaration; | 151 friend class PropertySetCSSStyleDeclaration; |
152 }; | 152 }; |
153 | 153 |
154 class ImmutableStylePropertySet : public StylePropertySet { | 154 class CORE_EXPORT ImmutableStylePropertySet : public StylePropertySet { |
155 public: | 155 public: |
156 ~ImmutableStylePropertySet(); | 156 ~ImmutableStylePropertySet(); |
157 static PassRefPtrWillBeRawPtr<ImmutableStylePropertySet> create(const CSSPro
perty* properties, unsigned count, CSSParserMode); | 157 static PassRefPtrWillBeRawPtr<ImmutableStylePropertySet> create(const CSSPro
perty* properties, unsigned count, CSSParserMode); |
158 | 158 |
159 unsigned propertyCount() const { return m_arraySize; } | 159 unsigned propertyCount() const { return m_arraySize; } |
160 | 160 |
161 const RawPtrWillBeMember<CSSValue>* valueArray() const; | 161 const RawPtrWillBeMember<CSSValue>* valueArray() const; |
162 const StylePropertyMetadata* metadataArray() const; | 162 const StylePropertyMetadata* metadataArray() const; |
163 int findPropertyIndex(CSSPropertyID) const; | 163 int findPropertyIndex(CSSPropertyID) const; |
164 | 164 |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
298 inline int StylePropertySet::findPropertyIndex(CSSPropertyID propertyID) const | 298 inline int StylePropertySet::findPropertyIndex(CSSPropertyID propertyID) const |
299 { | 299 { |
300 if (m_isMutable) | 300 if (m_isMutable) |
301 return toMutableStylePropertySet(this)->findPropertyIndex(propertyID); | 301 return toMutableStylePropertySet(this)->findPropertyIndex(propertyID); |
302 return toImmutableStylePropertySet(this)->findPropertyIndex(propertyID); | 302 return toImmutableStylePropertySet(this)->findPropertyIndex(propertyID); |
303 } | 303 } |
304 | 304 |
305 } // namespace blink | 305 } // namespace blink |
306 | 306 |
307 #endif // StylePropertySet_h | 307 #endif // StylePropertySet_h |
OLD | NEW |