| Index: third_party/WebKit/Source/core/html/HTMLImageElement.cpp
|
| diff --git a/third_party/WebKit/Source/core/html/HTMLImageElement.cpp b/third_party/WebKit/Source/core/html/HTMLImageElement.cpp
|
| index 757fddb552d961d1f901387ef0d909c8f8dd3796..04344634724ef3ca6679324c4da7800f0535c088 100644
|
| --- a/third_party/WebKit/Source/core/html/HTMLImageElement.cpp
|
| +++ b/third_party/WebKit/Source/core/html/HTMLImageElement.cpp
|
| @@ -733,6 +733,7 @@ void HTMLImageElement::selectSourceURL(ImageLoader::UpdateFromElementBehavior be
|
| bool imageHasLoaded = imageLoader().image() && !imageLoader().image()->isLoading() && !imageLoader().image()->errorOccurred();
|
| bool imageStillLoading = !imageHasLoaded && imageLoader().hasPendingActivity() && !imageLoader().hasPendingError() && !imageSourceURL().isEmpty();
|
| bool imageHasImage = imageLoader().image() && imageLoader().image()->hasImage();
|
| + bool imageIsDocument = imageLoader().isLoadingImageDocument() && imageLoader().image() && !imageLoader().image()->errorOccurred();
|
|
|
| // Icky special case for deferred images:
|
| // A deferred image is not loading, does have pending activity, does not
|
| @@ -746,7 +747,7 @@ void HTMLImageElement::selectSourceURL(ImageLoader::UpdateFromElementBehavior be
|
| // Instead of dealing with that, there's a separate check that the
|
| // ImageResource has non-null image data associated with it, which isn't
|
| // folded into imageHasLoaded above.
|
| - if ((imageHasLoaded && imageHasImage) || imageStillLoading)
|
| + if ((imageHasLoaded && imageHasImage) || imageStillLoading || imageIsDocument)
|
| ensurePrimaryContent();
|
| else
|
| ensureFallbackContent();
|
|
|