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 28 matching lines...) Expand all Loading... |
39 Persistent<CSSValuePool>& poolHandle = *threadSpecificPool; | 39 Persistent<CSSValuePool>& poolHandle = *threadSpecificPool; |
40 if (!poolHandle) { | 40 if (!poolHandle) { |
41 poolHandle = new CSSValuePool; | 41 poolHandle = new CSSValuePool; |
42 poolHandle.registerAsStaticReference(); | 42 poolHandle.registerAsStaticReference(); |
43 } | 43 } |
44 return *poolHandle; | 44 return *poolHandle; |
45 } | 45 } |
46 | 46 |
47 CSSValuePool::CSSValuePool() | 47 CSSValuePool::CSSValuePool() |
48 : m_inheritedValue(new CSSInheritedValue) | 48 : m_inheritedValue(new CSSInheritedValue) |
49 , m_implicitInitialValue(new CSSInitialValue(/* implicit */ true)) | 49 , m_initialValue(new CSSInitialValue()) |
50 , m_explicitInitialValue(new CSSInitialValue(/* implicit */ false)) | |
51 , m_unsetValue(new CSSUnsetValue) | 50 , m_unsetValue(new CSSUnsetValue) |
52 , m_colorTransparent(new CSSColorValue(Color::transparent)) | 51 , m_colorTransparent(new CSSColorValue(Color::transparent)) |
53 , m_colorWhite(new CSSColorValue(Color::white)) | 52 , m_colorWhite(new CSSColorValue(Color::white)) |
54 , m_colorBlack(new CSSColorValue(Color::black)) | 53 , m_colorBlack(new CSSColorValue(Color::black)) |
55 { | 54 { |
56 m_identifierValueCache.resize(numCSSValueKeywords); | 55 m_identifierValueCache.resize(numCSSValueKeywords); |
57 m_pixelValueCache.resize(maximumCacheableIntegerValue + 1); | 56 m_pixelValueCache.resize(maximumCacheableIntegerValue + 1); |
58 m_percentValueCache.resize(maximumCacheableIntegerValue + 1); | 57 m_percentValueCache.resize(maximumCacheableIntegerValue + 1); |
59 m_numberValueCache.resize(maximumCacheableIntegerValue + 1); | 58 m_numberValueCache.resize(maximumCacheableIntegerValue + 1); |
60 } | 59 } |
61 | 60 |
62 DEFINE_TRACE(CSSValuePool) | 61 DEFINE_TRACE(CSSValuePool) |
63 { | 62 { |
64 visitor->trace(m_inheritedValue); | 63 visitor->trace(m_inheritedValue); |
65 visitor->trace(m_implicitInitialValue); | 64 visitor->trace(m_initialValue); |
66 visitor->trace(m_explicitInitialValue); | |
67 visitor->trace(m_unsetValue); | 65 visitor->trace(m_unsetValue); |
68 visitor->trace(m_colorTransparent); | 66 visitor->trace(m_colorTransparent); |
69 visitor->trace(m_colorWhite); | 67 visitor->trace(m_colorWhite); |
70 visitor->trace(m_colorBlack); | 68 visitor->trace(m_colorBlack); |
71 visitor->trace(m_identifierValueCache); | 69 visitor->trace(m_identifierValueCache); |
72 visitor->trace(m_pixelValueCache); | 70 visitor->trace(m_pixelValueCache); |
73 visitor->trace(m_percentValueCache); | 71 visitor->trace(m_percentValueCache); |
74 visitor->trace(m_numberValueCache); | 72 visitor->trace(m_numberValueCache); |
75 visitor->trace(m_colorValueCache); | 73 visitor->trace(m_colorValueCache); |
76 visitor->trace(m_fontFaceValueCache); | 74 visitor->trace(m_fontFaceValueCache); |
77 visitor->trace(m_fontFamilyValueCache); | 75 visitor->trace(m_fontFamilyValueCache); |
78 } | 76 } |
79 | 77 |
80 } // namespace blink | 78 } // namespace blink |
OLD | NEW |