OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011, 2012 Apple Inc. All rights reserved. | 2 * Copyright (C) 2011, 2012 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 11 matching lines...) Expand all Loading... |
22 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF | 22 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF |
23 * THE POSSIBILITY OF SUCH DAMAGE. | 23 * THE POSSIBILITY OF SUCH DAMAGE. |
24 */ | 24 */ |
25 | 25 |
26 #include "config.h" | 26 #include "config.h" |
27 #include "core/css/CSSValuePool.h" | 27 #include "core/css/CSSValuePool.h" |
28 | 28 |
29 #include "core/css/CSSValueList.h" | 29 #include "core/css/CSSValueList.h" |
30 #include "core/css/parser/CSSParser.h" | 30 #include "core/css/parser/CSSParser.h" |
31 #include "core/style/ComputedStyle.h" | 31 #include "core/style/ComputedStyle.h" |
| 32 #include "wtf/LeakAnnotations.h" |
32 | 33 |
33 namespace blink { | 34 namespace blink { |
34 | 35 |
35 CSSValuePool& cssValuePool() | 36 CSSValuePool& cssValuePool() |
36 { | 37 { |
| 38 WTF_ANNOTATE_SCOPED_MEMORY_LEAK; |
37 DEFINE_STATIC_LOCAL(OwnPtrWillBePersistent<CSSValuePool>, pool, (adoptPtrWil
lBeNoop(new CSSValuePool()))); | 39 DEFINE_STATIC_LOCAL(OwnPtrWillBePersistent<CSSValuePool>, pool, (adoptPtrWil
lBeNoop(new CSSValuePool()))); |
38 return *pool; | 40 return *pool; |
39 } | 41 } |
40 | 42 |
41 CSSValuePool::CSSValuePool() | 43 CSSValuePool::CSSValuePool() |
42 : m_inheritedValue(CSSInheritedValue::create()) | 44 : m_inheritedValue(CSSInheritedValue::create()) |
43 , m_implicitInitialValue(CSSInitialValue::createImplicit()) | 45 , m_implicitInitialValue(CSSInitialValue::createImplicit()) |
44 , m_explicitInitialValue(CSSInitialValue::createExplicit()) | 46 , m_explicitInitialValue(CSSInitialValue::createExplicit()) |
45 , m_unsetValue(CSSUnsetValue::create()) | 47 , m_unsetValue(CSSUnsetValue::create()) |
46 , m_colorTransparent(CSSColorValue::create(Color::transparent)) | 48 , m_colorTransparent(CSSColorValue::create(Color::transparent)) |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 visitor->trace(m_colorBlack); | 167 visitor->trace(m_colorBlack); |
166 visitor->trace(m_pixelValueCache); | 168 visitor->trace(m_pixelValueCache); |
167 visitor->trace(m_percentValueCache); | 169 visitor->trace(m_percentValueCache); |
168 visitor->trace(m_numberValueCache); | 170 visitor->trace(m_numberValueCache); |
169 visitor->trace(m_fontFaceValueCache); | 171 visitor->trace(m_fontFaceValueCache); |
170 visitor->trace(m_fontFamilyValueCache); | 172 visitor->trace(m_fontFamilyValueCache); |
171 #endif | 173 #endif |
172 } | 174 } |
173 | 175 |
174 } | 176 } |
OLD | NEW |