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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 | 86 |
87 static Image* renderableImageForCSSValue(CSSValue* value, const LayoutObject* la
youtObject) | 87 static Image* renderableImageForCSSValue(CSSValue* value, const LayoutObject* la
youtObject) |
88 { | 88 { |
89 ImageResource* cachedImage = cachedImageForCSSValue(value, &layoutObject->do
cument()); | 89 ImageResource* cachedImage = cachedImageForCSSValue(value, &layoutObject->do
cument()); |
90 | 90 |
91 // If the image can be rendered at 1 zoom it will have non-empty dimension | 91 // If the image can be rendered at 1 zoom it will have non-empty dimension |
92 // and should be able to render at other scales as well. | 92 // and should be able to render at other scales as well. |
93 if (!cachedImage || !cachedImage->canRender(*layoutObject, 1)) | 93 if (!cachedImage || !cachedImage->canRender(*layoutObject, 1)) |
94 return nullptr; | 94 return nullptr; |
95 | 95 |
96 return cachedImage->imageForLayoutObject(layoutObject); | 96 return cachedImage->image(); |
97 } | 97 } |
98 | 98 |
99 CSSCrossfadeValue::~CSSCrossfadeValue() | 99 CSSCrossfadeValue::~CSSCrossfadeValue() |
100 { | 100 { |
101 if (m_cachedFromImage) | 101 if (m_cachedFromImage) |
102 m_cachedFromImage->removeClient(&m_crossfadeSubimageObserver); | 102 m_cachedFromImage->removeClient(&m_crossfadeSubimageObserver); |
103 if (m_cachedToImage) | 103 if (m_cachedToImage) |
104 m_cachedToImage->removeClient(&m_crossfadeSubimageObserver); | 104 m_cachedToImage->removeClient(&m_crossfadeSubimageObserver); |
105 } | 105 } |
106 | 106 |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
235 DEFINE_TRACE_AFTER_DISPATCH(CSSCrossfadeValue) | 235 DEFINE_TRACE_AFTER_DISPATCH(CSSCrossfadeValue) |
236 { | 236 { |
237 visitor->trace(m_fromValue); | 237 visitor->trace(m_fromValue); |
238 visitor->trace(m_toValue); | 238 visitor->trace(m_toValue); |
239 visitor->trace(m_percentageValue); | 239 visitor->trace(m_percentageValue); |
240 visitor->trace(m_crossfadeSubimageObserver); | 240 visitor->trace(m_crossfadeSubimageObserver); |
241 CSSImageGeneratorValue::traceAfterDispatch(visitor); | 241 CSSImageGeneratorValue::traceAfterDispatch(visitor); |
242 } | 242 } |
243 | 243 |
244 } // namespace blink | 244 } // namespace blink |
OLD | NEW |