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

Unified Diff: third_party/WebKit/Source/core/style/StyleFetchedImageSet.cpp

Issue 1773503002: Shortcut ImageResource::canRender() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/style/StyleFetchedImage.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/style/StyleFetchedImageSet.cpp
diff --git a/third_party/WebKit/Source/core/style/StyleFetchedImageSet.cpp b/third_party/WebKit/Source/core/style/StyleFetchedImageSet.cpp
index 0eeb5bb14664187b58e582eeb290f1cd9947ccf1..e42aefb82e73ac564c804e62a3afb9a0b371d455 100644
--- a/third_party/WebKit/Source/core/style/StyleFetchedImageSet.cpp
+++ b/third_party/WebKit/Source/core/style/StyleFetchedImageSet.cpp
@@ -80,7 +80,7 @@ PassRefPtrWillBeRawPtr<CSSValue> StyleFetchedImageSet::computedCSSValue() const
bool StyleFetchedImageSet::canRender() const
{
- return m_bestFitImage->canRender();
+ return !m_bestFitImage->errorOccurred() && !m_bestFitImage->image()->isNull();
}
bool StyleFetchedImageSet::isLoaded() const
« no previous file with comments | « third_party/WebKit/Source/core/style/StyleFetchedImage.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698