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

Unified Diff: Source/core/layout/LayoutImage.cpp

Issue 1277013005: Images from content:url() aren't loading if the alt attribute is present (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Updated Created 5 years, 4 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
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()) {
« Source/core/html/HTMLImageElement.cpp ('K') | « Source/core/html/HTMLImageElement.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698