OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2011 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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 CSSCrossfadeValue::CSSCrossfadeValue(CSSValue* fromValue, | 107 CSSCrossfadeValue::CSSCrossfadeValue(CSSValue* fromValue, |
108 CSSValue* toValue, | 108 CSSValue* toValue, |
109 CSSPrimitiveValue* percentageValue) | 109 CSSPrimitiveValue* percentageValue) |
110 : CSSImageGeneratorValue(CrossfadeClass), | 110 : CSSImageGeneratorValue(CrossfadeClass), |
111 m_fromValue(fromValue), | 111 m_fromValue(fromValue), |
112 m_toValue(toValue), | 112 m_toValue(toValue), |
113 m_percentageValue(percentageValue), | 113 m_percentageValue(percentageValue), |
114 m_cachedFromImage(nullptr), | 114 m_cachedFromImage(nullptr), |
115 m_cachedToImage(nullptr), | 115 m_cachedToImage(nullptr), |
116 m_crossfadeSubimageObserver(this) { | 116 m_crossfadeSubimageObserver(this) { |
117 ThreadState::current()->registerPreFinalizer(this); | |
118 } | 117 } |
119 | 118 |
120 CSSCrossfadeValue::~CSSCrossfadeValue() {} | 119 CSSCrossfadeValue::~CSSCrossfadeValue() {} |
121 | 120 |
122 void CSSCrossfadeValue::dispose() { | 121 void CSSCrossfadeValue::dispose() { |
123 if (m_cachedFromImage) { | 122 if (m_cachedFromImage) { |
124 m_cachedFromImage->removeObserver(&m_crossfadeSubimageObserver); | 123 m_cachedFromImage->removeObserver(&m_crossfadeSubimageObserver); |
125 m_cachedFromImage = nullptr; | 124 m_cachedFromImage = nullptr; |
126 } | 125 } |
127 if (m_cachedToImage) { | 126 if (m_cachedToImage) { |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
296 visitor->trace(m_fromValue); | 295 visitor->trace(m_fromValue); |
297 visitor->trace(m_toValue); | 296 visitor->trace(m_toValue); |
298 visitor->trace(m_percentageValue); | 297 visitor->trace(m_percentageValue); |
299 visitor->trace(m_cachedFromImage); | 298 visitor->trace(m_cachedFromImage); |
300 visitor->trace(m_cachedToImage); | 299 visitor->trace(m_cachedToImage); |
301 visitor->trace(m_crossfadeSubimageObserver); | 300 visitor->trace(m_crossfadeSubimageObserver); |
302 CSSImageGeneratorValue::traceAfterDispatch(visitor); | 301 CSSImageGeneratorValue::traceAfterDispatch(visitor); |
303 } | 302 } |
304 | 303 |
305 } // namespace blink | 304 } // namespace blink |
OLD | NEW |