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

Side by Side Diff: third_party/WebKit/Source/core/loader/ImageLoader.cpp

Issue 2471133007: Remove wasCanceled() check in ImageLoader (Closed)
Patch Set: DCHECK Created 4 years 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010 Apple Inc. All rights 4 * Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010 Apple Inc. All rights
5 * reserved. 5 * reserved.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after
503 // https://html.spec.whatwg.org/multipage/embedded-content.html#the-img-elem ent:the-img-element-55 503 // https://html.spec.whatwg.org/multipage/embedded-content.html#the-img-elem ent:the-img-element-55
504 if (!m_suppressErrorEvents) 504 if (!m_suppressErrorEvents)
505 dispatchErrorEvent(); 505 dispatchErrorEvent();
506 506
507 // Only consider updating the protection ref-count of the Element 507 // Only consider updating the protection ref-count of the Element
508 // immediately before returning from this function as doing so might result 508 // immediately before returning from this function as doing so might result
509 // in the destruction of this ImageLoader. 509 // in the destruction of this ImageLoader.
510 updatedHasPendingEvent(); 510 updatedHasPendingEvent();
511 return; 511 return;
512 } 512 }
513 if (resource->wasCanceled()) { 513 DCHECK(!resource->wasCanceled());
514 m_hasPendingLoadEvent = false;
515 // Only consider updating the protection ref-count of the Element
516 // immediately before returning from this function as doing so might result
517 // in the destruction of this ImageLoader.
518 updatedHasPendingEvent();
519 return;
520 }
521 loadEventSender().dispatchEventSoon(this); 514 loadEventSender().dispatchEventSoon(this);
522 } 515 }
523 516
524 LayoutImageResource* ImageLoader::layoutImageResource() { 517 LayoutImageResource* ImageLoader::layoutImageResource() {
525 LayoutObject* layoutObject = m_element->layoutObject(); 518 LayoutObject* layoutObject = m_element->layoutObject();
526 519
527 if (!layoutObject) 520 if (!layoutObject)
528 return 0; 521 return 0;
529 522
530 // We don't return style generated image because it doesn't belong to the 523 // We don't return style generated image because it doesn't belong to the
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
640 } 633 }
641 634
642 void ImageLoader::elementDidMoveToNewDocument() { 635 void ImageLoader::elementDidMoveToNewDocument() {
643 if (m_loadDelayCounter) 636 if (m_loadDelayCounter)
644 m_loadDelayCounter->documentChanged(m_element->document()); 637 m_loadDelayCounter->documentChanged(m_element->document());
645 clearFailedLoadURL(); 638 clearFailedLoadURL();
646 setImage(0); 639 setImage(0);
647 } 640 }
648 641
649 } // namespace blink 642 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698