Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(13)

Side by Side Diff: third_party/WebKit/Source/core/css/CSSCrossfadeValue.cpp

Issue 1728313003: Split ImageResourceClient into ResourceClient and ImageResourceObserver [2/2] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nit refine. Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 239
240 m_generatedImage = CrossfadeGeneratedImage::create(fromImageRef, toImageRef, m_percentageValue->getFloatValue(), fixedSize(layoutObject), size); 240 m_generatedImage = CrossfadeGeneratedImage::create(fromImageRef, toImageRef, m_percentageValue->getFloatValue(), fixedSize(layoutObject), size);
241 241
242 return m_generatedImage.release(); 242 return m_generatedImage.release();
243 } 243 }
244 244
245 void CSSCrossfadeValue::crossfadeChanged(const IntRect&) 245 void CSSCrossfadeValue::crossfadeChanged(const IntRect&)
246 { 246 {
247 for (const auto& curr : clients()) { 247 for (const auto& curr : clients()) {
248 LayoutObject* client = const_cast<LayoutObject*>(curr.key); 248 LayoutObject* client = const_cast<LayoutObject*>(curr.key);
249 client->imageChanged(static_cast<WrappedImagePtr>(this)); 249 client->imageChanged(false, static_cast<WrappedImagePtr>(this));
250 } 250 }
251 } 251 }
252 252
253 void CSSCrossfadeValue::CrossfadeSubimageObserverProxy::imageChanged(ImageResour ce*, const IntRect* rect) 253 void CSSCrossfadeValue::CrossfadeSubimageObserverProxy::imageChanged(bool, Image Resource*, const IntRect* rect)
254 { 254 {
255 if (m_ready) 255 if (m_ready)
256 m_ownerValue->crossfadeChanged(*rect); 256 m_ownerValue->crossfadeChanged(*rect);
257 } 257 }
258 258
259 bool CSSCrossfadeValue::hasFailedOrCanceledSubresources() const 259 bool CSSCrossfadeValue::hasFailedOrCanceledSubresources() const
260 { 260 {
261 if (m_cachedFromImage && m_cachedFromImage->loadFailedOrCanceled()) 261 if (m_cachedFromImage && m_cachedFromImage->loadFailedOrCanceled())
262 return true; 262 return true;
263 if (m_cachedToImage && m_cachedToImage->loadFailedOrCanceled()) 263 if (m_cachedToImage && m_cachedToImage->loadFailedOrCanceled())
(...skipping 13 matching lines...) Expand all
277 visitor->trace(m_fromValue); 277 visitor->trace(m_fromValue);
278 visitor->trace(m_toValue); 278 visitor->trace(m_toValue);
279 visitor->trace(m_percentageValue); 279 visitor->trace(m_percentageValue);
280 visitor->trace(m_cachedFromImage); 280 visitor->trace(m_cachedFromImage);
281 visitor->trace(m_cachedToImage); 281 visitor->trace(m_cachedToImage);
282 visitor->trace(m_crossfadeSubimageObserver); 282 visitor->trace(m_crossfadeSubimageObserver);
283 CSSImageGeneratorValue::traceAfterDispatch(visitor); 283 CSSImageGeneratorValue::traceAfterDispatch(visitor);
284 } 284 }
285 285
286 } // namespace blink 286 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698