| Index: third_party/WebKit/Source/core/html/HTMLImageLoader.cpp
|
| diff --git a/third_party/WebKit/Source/core/html/HTMLImageLoader.cpp b/third_party/WebKit/Source/core/html/HTMLImageLoader.cpp
|
| index 717cc6b36a5ae66d5f6ff1b1d4934343818e406a..1c33485e39292924bcbe7f978bafef8f57ea1127 100644
|
| --- a/third_party/WebKit/Source/core/html/HTMLImageLoader.cpp
|
| +++ b/third_party/WebKit/Source/core/html/HTMLImageLoader.cpp
|
| @@ -42,15 +42,16 @@ HTMLImageLoader::~HTMLImageLoader() {}
|
| void HTMLImageLoader::dispatchLoadEvent() {
|
| RESOURCE_LOADING_DVLOG(1) << "HTMLImageLoader::dispatchLoadEvent " << this;
|
|
|
| - // HTMLVideoElement uses this class to load the poster image, but it should not fire events for loading or failure.
|
| + // HTMLVideoElement uses this class to load the poster image, but it should
|
| + // not fire events for loading or failure.
|
| if (isHTMLVideoElement(*element()))
|
| return;
|
|
|
| bool errorOccurred = image()->errorOccurred();
|
| - if (isHTMLObjectElement(*element()) && !errorOccurred)
|
| - errorOccurred =
|
| - (image()->response().httpStatusCode() >=
|
| - 400); // An <object> considers a 404 to be an error and should fire onerror.
|
| + if (isHTMLObjectElement(*element()) && !errorOccurred) {
|
| + // An <object> considers a 404 to be an error and should fire onerror.
|
| + errorOccurred = (image()->response().httpStatusCode() >= 400);
|
| + }
|
| element()->dispatchEvent(Event::create(errorOccurred ? EventTypeNames::error
|
| : EventTypeNames::load));
|
| }
|
| @@ -63,7 +64,8 @@ static void loadFallbackContentForElement(Element* element) {
|
| }
|
|
|
| void HTMLImageLoader::noImageResourceToLoad() {
|
| - // FIXME: Use fallback content even when there is no alt-text. The only blocker is the large amount of rebaselining it requires.
|
| + // FIXME: Use fallback content even when there is no alt-text. The only
|
| + // blocker is the large amount of rebaselining it requires.
|
| if (!toHTMLElement(element())->altText().isEmpty())
|
| loadFallbackContentForElement(element());
|
| }
|
|
|