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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 | 106 |
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 } | |
118 | 117 |
119 CSSCrossfadeValue::~CSSCrossfadeValue() {} | 118 CSSCrossfadeValue::~CSSCrossfadeValue() {} |
120 | 119 |
121 void CSSCrossfadeValue::dispose() { | 120 void CSSCrossfadeValue::dispose() { |
122 if (m_cachedFromImage) { | 121 if (m_cachedFromImage) { |
123 m_cachedFromImage->removeObserver(&m_crossfadeSubimageObserver); | 122 m_cachedFromImage->removeObserver(&m_crossfadeSubimageObserver); |
124 m_cachedFromImage = nullptr; | 123 m_cachedFromImage = nullptr; |
125 } | 124 } |
126 if (m_cachedToImage) { | 125 if (m_cachedToImage) { |
127 m_cachedToImage->removeObserver(&m_crossfadeSubimageObserver); | 126 m_cachedToImage->removeObserver(&m_crossfadeSubimageObserver); |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
295 visitor->trace(m_fromValue); | 294 visitor->trace(m_fromValue); |
296 visitor->trace(m_toValue); | 295 visitor->trace(m_toValue); |
297 visitor->trace(m_percentageValue); | 296 visitor->trace(m_percentageValue); |
298 visitor->trace(m_cachedFromImage); | 297 visitor->trace(m_cachedFromImage); |
299 visitor->trace(m_cachedToImage); | 298 visitor->trace(m_cachedToImage); |
300 visitor->trace(m_crossfadeSubimageObserver); | 299 visitor->trace(m_crossfadeSubimageObserver); |
301 CSSImageGeneratorValue::traceAfterDispatch(visitor); | 300 CSSImageGeneratorValue::traceAfterDispatch(visitor); |
302 } | 301 } |
303 | 302 |
304 } // namespace blink | 303 } // namespace blink |
OLD | NEW |