| OLD | NEW |
| 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 544 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 555 | 555 |
| 556 image_complete_ = true; | 556 image_complete_ = true; |
| 557 delay_until_image_notify_finished_ = nullptr; | 557 delay_until_image_notify_finished_ = nullptr; |
| 558 | 558 |
| 559 // Update ImageAnimationPolicy for image_. | 559 // Update ImageAnimationPolicy for image_. |
| 560 if (image_) | 560 if (image_) |
| 561 image_->UpdateImageAnimationPolicy(); | 561 image_->UpdateImageAnimationPolicy(); |
| 562 | 562 |
| 563 UpdateLayoutObject(); | 563 UpdateLayoutObject(); |
| 564 | 564 |
| 565 if (image_ && image_->GetImage() && image_->GetImage()->IsSVGImage()) | 565 if (image_ && image_->GetImage() && image_->GetImage()->IsSVGImage()) { |
| 566 // SVG's document should be completely loaded before access control |
| 567 // checks, which can occur anytime after ImageNotifyFinished() |
| 568 // (See SVGImage::CurrentFrameHasSingleSecurityOrigin()). |
| 569 // We check the document is loaded here to catch violation of the |
| 570 // assumption reliably. |
| 571 ToSVGImage(image_->GetImage())->CheckLoaded(); |
| 572 |
| 566 ToSVGImage(image_->GetImage()) | 573 ToSVGImage(image_->GetImage()) |
| 567 ->UpdateUseCounters(GetElement()->GetDocument()); | 574 ->UpdateUseCounters(GetElement()->GetDocument()); |
| 575 } |
| 568 | 576 |
| 569 if (loading_image_document_) { | 577 if (loading_image_document_) { |
| 570 CHECK(!has_pending_load_event_); | 578 CHECK(!has_pending_load_event_); |
| 571 return; | 579 return; |
| 572 } | 580 } |
| 573 | 581 |
| 574 CHECK(has_pending_load_event_); | 582 CHECK(has_pending_load_event_); |
| 575 | 583 |
| 576 if (resource->ErrorOccurred()) { | 584 if (resource->ErrorOccurred()) { |
| 577 LoadEventSender().CancelEvent(this); | 585 LoadEventSender().CancelEvent(this); |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 721 } | 729 } |
| 722 if (delay_until_image_notify_finished_) { | 730 if (delay_until_image_notify_finished_) { |
| 723 delay_until_image_notify_finished_->DocumentChanged( | 731 delay_until_image_notify_finished_->DocumentChanged( |
| 724 element_->GetDocument()); | 732 element_->GetDocument()); |
| 725 } | 733 } |
| 726 ClearFailedLoadURL(); | 734 ClearFailedLoadURL(); |
| 727 ClearImage(); | 735 ClearImage(); |
| 728 } | 736 } |
| 729 | 737 |
| 730 } // namespace blink | 738 } // namespace blink |
| OLD | NEW |