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

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

Issue 2888953004: Check that SVGImage is loaded in ImageNotifyFinished() (Closed)
Patch Set: Rebase Created 3 years, 7 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/svg/graphics/SVGImage.h » ('j') | 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 537 matching lines...) Expand 10 before | Expand all | Expand 10 after
548 548
549 image_complete_ = true; 549 image_complete_ = true;
550 delay_until_image_notify_finished_ = nullptr; 550 delay_until_image_notify_finished_ = nullptr;
551 551
552 // Update ImageAnimationPolicy for image_. 552 // Update ImageAnimationPolicy for image_.
553 if (image_) 553 if (image_)
554 image_->UpdateImageAnimationPolicy(); 554 image_->UpdateImageAnimationPolicy();
555 555
556 UpdateLayoutObject(); 556 UpdateLayoutObject();
557 557
558 if (image_ && image_->GetImage() && image_->GetImage()->IsSVGImage()) 558 if (image_ && image_->GetImage() && image_->GetImage()->IsSVGImage()) {
559 ToSVGImage(image_->GetImage())->CheckLoaded();
pdr. 2017/05/19 17:16:42 Can you add a comment here describing why it would
hiroshige 2017/05/19 20:51:44 Added comments here and in CheckLoaded(). SVG peop
559 ToSVGImage(image_->GetImage()) 560 ToSVGImage(image_->GetImage())
560 ->UpdateUseCounters(GetElement()->GetDocument()); 561 ->UpdateUseCounters(GetElement()->GetDocument());
562 }
561 563
562 if (loading_image_document_) { 564 if (loading_image_document_) {
563 CHECK(!has_pending_load_event_); 565 CHECK(!has_pending_load_event_);
564 return; 566 return;
565 } 567 }
566 568
567 CHECK(has_pending_load_event_); 569 CHECK(has_pending_load_event_);
568 570
569 if (resource->ErrorOccurred()) { 571 if (resource->ErrorOccurred()) {
570 LoadEventSender().CancelEvent(this); 572 LoadEventSender().CancelEvent(this);
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
719 } 721 }
720 if (delay_until_image_notify_finished_) { 722 if (delay_until_image_notify_finished_) {
721 delay_until_image_notify_finished_->DocumentChanged( 723 delay_until_image_notify_finished_->DocumentChanged(
722 element_->GetDocument()); 724 element_->GetDocument());
723 } 725 }
724 ClearFailedLoadURL(); 726 ClearFailedLoadURL();
725 ClearImage(); 727 ClearImage();
726 } 728 }
727 729
728 } // namespace blink 730 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/svg/graphics/SVGImage.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698