| 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 * Copyright (C) 2013 Intel Corporation. All rights reserved. |
| 4 * | 5 * |
| 5 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
| 6 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
| 7 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
| 8 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
| 9 * | 10 * |
| 10 * This library is distributed in the hope that it will be useful, | 11 * This library is distributed in the hope that it will be useful, |
| 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 13 * Library General Public License for more details. | 14 * Library General Public License for more details. |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 const StylePropertyMetadata* metadataArray() const; | 158 const StylePropertyMetadata* metadataArray() const; |
| 158 | 159 |
| 159 void* m_storage; | 160 void* m_storage; |
| 160 | 161 |
| 161 private: | 162 private: |
| 162 ImmutableStylePropertySet(const CSSProperty*, unsigned count, CSSParserMode)
; | 163 ImmutableStylePropertySet(const CSSProperty*, unsigned count, CSSParserMode)
; |
| 163 }; | 164 }; |
| 164 | 165 |
| 165 inline const CSSValue** ImmutableStylePropertySet::valueArray() const | 166 inline const CSSValue** ImmutableStylePropertySet::valueArray() const |
| 166 { | 167 { |
| 167 return reinterpret_cast<const CSSValue**>(const_cast<const void**>((&static_
cast<const ImmutableStylePropertySet*>(this)->m_storage))); | 168 return reinterpret_cast<const CSSValue**>(const_cast<const void**>(&(this->m
_storage))); |
| 168 } | 169 } |
| 169 | 170 |
| 170 inline const StylePropertyMetadata* ImmutableStylePropertySet::metadataArray() c
onst | 171 inline const StylePropertyMetadata* ImmutableStylePropertySet::metadataArray() c
onst |
| 171 { | 172 { |
| 172 return reinterpret_cast<const StylePropertyMetadata*>(&reinterpret_cast<cons
t char*>((&static_cast<const ImmutableStylePropertySet*>(this)->m_storage))[m_ar
raySize * sizeof(CSSValue*)]); | 173 return reinterpret_cast<const StylePropertyMetadata*>(&reinterpret_cast<cons
t char*>(&(this->m_storage))[m_arraySize * sizeof(CSSValue*)]); |
| 173 } | 174 } |
| 174 | 175 |
| 175 class MutableStylePropertySet : public StylePropertySet { | 176 class MutableStylePropertySet : public StylePropertySet { |
| 176 public: | 177 public: |
| 177 ~MutableStylePropertySet(); | 178 ~MutableStylePropertySet(); |
| 178 | 179 |
| 179 static PassRefPtr<MutableStylePropertySet> create(CSSParserMode = CSSQuirksM
ode); | 180 static PassRefPtr<MutableStylePropertySet> create(CSSParserMode = CSSQuirksM
ode); |
| 180 static PassRefPtr<MutableStylePropertySet> create(const CSSProperty* propert
ies, unsigned count); | 181 static PassRefPtr<MutableStylePropertySet> create(const CSSProperty* propert
ies, unsigned count); |
| 181 | 182 |
| 182 MutableStylePropertySet(const StylePropertySet&); | 183 MutableStylePropertySet(const StylePropertySet&); |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 259 | 260 |
| 260 if (m_isMutable) | 261 if (m_isMutable) |
| 261 delete static_cast<MutableStylePropertySet*>(this); | 262 delete static_cast<MutableStylePropertySet*>(this); |
| 262 else | 263 else |
| 263 delete static_cast<ImmutableStylePropertySet*>(this); | 264 delete static_cast<ImmutableStylePropertySet*>(this); |
| 264 } | 265 } |
| 265 | 266 |
| 266 } // namespace WebCore | 267 } // namespace WebCore |
| 267 | 268 |
| 268 #endif // StylePropertySet_h | 269 #endif // StylePropertySet_h |
| OLD | NEW |