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