Index: Source/core/layout/LayoutImage.cpp |
diff --git a/Source/core/layout/LayoutImage.cpp b/Source/core/layout/LayoutImage.cpp |
index f1587f40e6d9ca2bf36a3cef928a2370da841441..53fa66bdae50ef55887434f8153c654b47680a81 100644 |
--- a/Source/core/layout/LayoutImage.cpp |
+++ b/Source/core/layout/LayoutImage.cpp |
@@ -110,6 +110,11 @@ void LayoutImage::imageChanged(WrappedImagePtr newImage, const IntRect* rect) |
if (newImage != m_imageResource->imagePtr()) |
return; |
+ if (isGeneratedContent() && isHTMLImageElement(node()) && m_imageResource->errorOccurred()) { |
+ toHTMLImageElement(node())->ensureFallbackForGeneratedContent(); |
+ return; |
+ } |
+ |
// Per the spec, we let the server-sent header override srcset/other sources of dpr. |
// https://github.com/igrigorik/http-client-hints/blob/master/draft-grigorik-http-client-hints-01.txt#L255 |
if (m_imageResource->cachedImage() && m_imageResource->cachedImage()->hasDevicePixelRatioHeaderValue()) { |