| 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, 2007, 2008, 2009, 2010, 2012 Apple Inc. All r
ights reserved. | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All r
ights reserved. |
| 4 * Copyright (C) 2011 Research In Motion Limited. All rights reserved. | 4 * Copyright (C) 2011 Research In Motion Limited. All rights reserved. |
| 5 * | 5 * |
| 6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
| 7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
| 8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
| 9 * 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. |
| 10 * | 10 * |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 | 46 |
| 47 typedef HashMap<const StylePropertySet*, OwnPtr<PropertySetCSSStyleDeclaration>
> PropertySetCSSOMWrapperMap; | 47 typedef HashMap<const StylePropertySet*, OwnPtr<PropertySetCSSStyleDeclaration>
> PropertySetCSSOMWrapperMap; |
| 48 static PropertySetCSSOMWrapperMap& propertySetCSSOMWrapperMap() | 48 static PropertySetCSSOMWrapperMap& propertySetCSSOMWrapperMap() |
| 49 { | 49 { |
| 50 DEFINE_STATIC_LOCAL(PropertySetCSSOMWrapperMap, propertySetCSSOMWrapperMapIn
stance, ()); | 50 DEFINE_STATIC_LOCAL(PropertySetCSSOMWrapperMap, propertySetCSSOMWrapperMapIn
stance, ()); |
| 51 return propertySetCSSOMWrapperMapInstance; | 51 return propertySetCSSOMWrapperMapInstance; |
| 52 } | 52 } |
| 53 | 53 |
| 54 static size_t immutableStylePropertySetSize(unsigned count) | 54 static size_t immutableStylePropertySetSize(unsigned count) |
| 55 { | 55 { |
| 56 return sizeof(StylePropertySet) + sizeof(CSSProperty) * count; | 56 return sizeof(ImmutableStylePropertySet) + sizeof(CSSProperty) * count; |
| 57 } | 57 } |
| 58 | 58 |
| 59 PassRefPtr<StylePropertySet> StylePropertySet::createImmutable(const CSSProperty
* properties, unsigned count, CSSParserMode cssParserMode) | 59 PassRefPtr<StylePropertySet> StylePropertySet::createImmutable(const CSSProperty
* properties, unsigned count, CSSParserMode cssParserMode) |
| 60 { | 60 { |
| 61 void* slot = WTF::fastMalloc(immutableStylePropertySetSize(count)); | 61 void* slot = WTF::fastMalloc(immutableStylePropertySetSize(count)); |
| 62 return adoptRef(new (slot) ImmutableStylePropertySet(properties, count, cssP
arserMode)); | 62 return adoptRef(new (slot) ImmutableStylePropertySet(properties, count, cssP
arserMode)); |
| 63 } | 63 } |
| 64 | 64 |
| 65 PassRefPtr<StylePropertySet> StylePropertySet::immutableCopyIfNeeded() const | 65 PassRefPtr<StylePropertySet> StylePropertySet::immutableCopyIfNeeded() const |
| 66 { | 66 { |
| (...skipping 1068 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1135 { | 1135 { |
| 1136 return adoptRef(new MutableStylePropertySet(cssParserMode)); | 1136 return adoptRef(new MutableStylePropertySet(cssParserMode)); |
| 1137 } | 1137 } |
| 1138 | 1138 |
| 1139 PassRefPtr<StylePropertySet> StylePropertySet::create(const CSSProperty* propert
ies, unsigned count) | 1139 PassRefPtr<StylePropertySet> StylePropertySet::create(const CSSProperty* propert
ies, unsigned count) |
| 1140 { | 1140 { |
| 1141 return adoptRef(new MutableStylePropertySet(properties, count)); | 1141 return adoptRef(new MutableStylePropertySet(properties, count)); |
| 1142 } | 1142 } |
| 1143 | 1143 |
| 1144 } // namespace WebCore | 1144 } // namespace WebCore |
| OLD | NEW |