| 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 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 241 Vector<CSSProperty, 4> m_propertyVector; | 241 Vector<CSSProperty, 4> m_propertyVector; |
| 242 }; | 242 }; |
| 243 | 243 |
| 244 DEFINE_TYPE_CASTS(MutableStylePropertySet, StylePropertySet, set, set->isMutable
(), set.isMutable()); | 244 DEFINE_TYPE_CASTS(MutableStylePropertySet, StylePropertySet, set, set->isMutable
(), set.isMutable()); |
| 245 | 245 |
| 246 inline MutableStylePropertySet* toMutableStylePropertySet(const RefPtr<StyleProp
ertySet>& set) | 246 inline MutableStylePropertySet* toMutableStylePropertySet(const RefPtr<StyleProp
ertySet>& set) |
| 247 { | 247 { |
| 248 return toMutableStylePropertySet(set.get()); | 248 return toMutableStylePropertySet(set.get()); |
| 249 } | 249 } |
| 250 | 250 |
| 251 inline MutableStylePropertySet* toMutableStylePropertySet(const Persistent<Style
PropertySet>& set) | |
| 252 { | |
| 253 return toMutableStylePropertySet(set.get()); | |
| 254 } | |
| 255 | |
| 256 inline MutableStylePropertySet* toMutableStylePropertySet(const Member<StyleProp
ertySet>& set) | |
| 257 { | |
| 258 return toMutableStylePropertySet(set.get()); | |
| 259 } | |
| 260 | |
| 261 inline const StylePropertyMetadata& StylePropertySet::PropertyReference::propert
yMetadata() const | 251 inline const StylePropertyMetadata& StylePropertySet::PropertyReference::propert
yMetadata() const |
| 262 { | 252 { |
| 263 if (m_propertySet.isMutable()) | 253 if (m_propertySet.isMutable()) |
| 264 return toMutableStylePropertySet(m_propertySet).m_propertyVector.at(m_in
dex).metadata(); | 254 return toMutableStylePropertySet(m_propertySet).m_propertyVector.at(m_in
dex).metadata(); |
| 265 return toImmutableStylePropertySet(m_propertySet).metadataArray()[m_index]; | 255 return toImmutableStylePropertySet(m_propertySet).metadataArray()[m_index]; |
| 266 } | 256 } |
| 267 | 257 |
| 268 inline const CSSValue* StylePropertySet::PropertyReference::propertyValue() cons
t | 258 inline const CSSValue* StylePropertySet::PropertyReference::propertyValue() cons
t |
| 269 { | 259 { |
| 270 if (m_propertySet.isMutable()) | 260 if (m_propertySet.isMutable()) |
| (...skipping 29 matching lines...) Expand all Loading... |
| 300 inline int StylePropertySet::findPropertyIndex(CSSPropertyID propertyID) const | 290 inline int StylePropertySet::findPropertyIndex(CSSPropertyID propertyID) const |
| 301 { | 291 { |
| 302 if (m_isMutable) | 292 if (m_isMutable) |
| 303 return toMutableStylePropertySet(this)->findPropertyIndex(propertyID); | 293 return toMutableStylePropertySet(this)->findPropertyIndex(propertyID); |
| 304 return toImmutableStylePropertySet(this)->findPropertyIndex(propertyID); | 294 return toImmutableStylePropertySet(this)->findPropertyIndex(propertyID); |
| 305 } | 295 } |
| 306 | 296 |
| 307 } // namespace blink | 297 } // namespace blink |
| 308 | 298 |
| 309 #endif // StylePropertySet_h | 299 #endif // StylePropertySet_h |
| OLD | NEW |