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

Unified Diff: third_party/WebKit/Source/core/html/HTMLImageLoader.cpp

Issue 2384273007: reflow comments in core/html/*.{cpp,h},core/html/imports (Closed)
Patch Set: comments Created 4 years, 2 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: 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());
}

Powered by Google App Engine
This is Rietveld 408576698