summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--third_party/WebKit/Source/core/css/CSSCrossfadeValue.cpp2
-rw-r--r--third_party/WebKit/Source/core/fetch/ImageResource.h3
-rw-r--r--third_party/WebKit/Source/core/style/StyleFetchedImage.cpp2
-rw-r--r--third_party/WebKit/Source/core/style/StyleFetchedImageSet.cpp2
4 files changed, 3 insertions, 6 deletions
diff --git a/third_party/WebKit/Source/core/css/CSSCrossfadeValue.cpp b/third_party/WebKit/Source/core/css/CSSCrossfadeValue.cpp
index f852653..426c6b5 100644
--- a/third_party/WebKit/Source/core/css/CSSCrossfadeValue.cpp
+++ b/third_party/WebKit/Source/core/css/CSSCrossfadeValue.cpp
@@ -88,7 +88,7 @@ static Image* renderableImageForCSSValue(CSSValue* value, const LayoutObject* la
{
ImageResource* cachedImage = cachedImageForCSSValue(value, &layoutObject->document());
- if (!cachedImage || !cachedImage->canRender())
+ if (!cachedImage || cachedImage->errorOccurred() || cachedImage->image()->isNull())
return nullptr;
return cachedImage->image();
diff --git a/third_party/WebKit/Source/core/fetch/ImageResource.h b/third_party/WebKit/Source/core/fetch/ImageResource.h
index c17849a..afbd05f 100644
--- a/third_party/WebKit/Source/core/fetch/ImageResource.h
+++ b/third_party/WebKit/Source/core/fetch/ImageResource.h
@@ -71,9 +71,6 @@ public:
static std::pair<blink::Image*, float> brokenImage(float deviceScaleFactor); // Returns an image and the image's resolution scale factor.
bool willPaintBrokenImage() const;
- // Assumes that image rotation or scale doesn't effect the image size being empty or not.
- bool canRender() { return !errorOccurred() && !imageSize(DoNotRespectImageOrientation, 1).isEmpty(); }
-
bool usesImageContainerSize() const;
bool imageHasRelativeSize() const;
// The device pixel ratio we got from the server for this image, or 1.0.
diff --git a/third_party/WebKit/Source/core/style/StyleFetchedImage.cpp b/third_party/WebKit/Source/core/style/StyleFetchedImage.cpp
index f2e15b3..938f53e 100644
--- a/third_party/WebKit/Source/core/style/StyleFetchedImage.cpp
+++ b/third_party/WebKit/Source/core/style/StyleFetchedImage.cpp
@@ -78,7 +78,7 @@ PassRefPtrWillBeRawPtr<CSSValue> StyleFetchedImage::computedCSSValue() const
bool StyleFetchedImage::canRender() const
{
- return m_image->canRender();
+ return !m_image->errorOccurred() && !m_image->image()->isNull();
}
bool StyleFetchedImage::isLoaded() const
diff --git a/third_party/WebKit/Source/core/style/StyleFetchedImageSet.cpp b/third_party/WebKit/Source/core/style/StyleFetchedImageSet.cpp
index 0eeb5bb..e42aefb 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