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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutImageResource.cpp

Issue 1411693006: Make LayoutImageResource::image() parameter explicit (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Avoid RefPtr churn Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/layout/LayoutImageResource.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutImageResource.cpp b/third_party/WebKit/Source/core/layout/LayoutImageResource.cpp
index 85e24d61d56493228c2276e38b94076d114c9807..4c4ceb9546f712360ef16e57b4015ed70190d999 100644
--- a/third_party/WebKit/Source/core/layout/LayoutImageResource.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutImageResource.cpp
@@ -83,7 +83,7 @@ void LayoutImageResource::resetAnimation()
if (!m_cachedImage)
return;
- image()->resetAnimation();
+ m_cachedImage->image()->resetAnimation();
m_layoutObject->setShouldDoFullPaintInvalidation();
}
@@ -105,4 +105,10 @@ LayoutSize LayoutImageResource::getImageSize(float multiplier, ImageResource::Si
return size;
}
+bool LayoutImageResource::maybeAnimated() const
+{
+ Image* image = m_cachedImage ? m_cachedImage->image() : Image::nullImage();
+ return image->maybeAnimated();
+}
+
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698