| Index: third_party/WebKit/Source/core/fetch/ImageResource.cpp
|
| diff --git a/third_party/WebKit/Source/core/fetch/ImageResource.cpp b/third_party/WebKit/Source/core/fetch/ImageResource.cpp
|
| index 0dae78e07f2abdc91d4f179feb783582253255d3..4eb3f1c85c45a88f78e625be046a968ddedee7cb 100644
|
| --- a/third_party/WebKit/Source/core/fetch/ImageResource.cpp
|
| +++ b/third_party/WebKit/Source/core/fetch/ImageResource.cpp
|
| @@ -152,19 +152,17 @@ void ImageResource::checkNotify() {
|
| if (m_isSchedulingReload || shouldReloadBrokenPlaceholder())
|
| return;
|
|
|
| - notifyObserversInternal(MarkFinishedOption::ShouldMarkFinished);
|
| + notifyObserversInternal();
|
| Resource::checkNotify();
|
| }
|
|
|
| -void ImageResource::notifyObserversInternal(
|
| - MarkFinishedOption markFinishedOption) {
|
| +void ImageResource::notifyObserversInternal() {
|
| if (isLoading())
|
| return;
|
|
|
| for (auto* observer : m_observers.asVector()) {
|
| if (m_observers.contains(observer)) {
|
| - if (markFinishedOption == MarkFinishedOption::ShouldMarkFinished)
|
| - markObserverFinished(observer);
|
| + markObserverFinished(observer);
|
| observer->imageNotifyFinished(this);
|
| }
|
| }
|
| @@ -700,10 +698,9 @@ void ImageResource::onePartInMultipartReceived(
|
| // Notify finished when the first part ends.
|
| if (!errorOccurred())
|
| setStatus(Cached);
|
| - // We will also notify clients/observers of the finish in
|
| - // Resource::finish()/error() so we don't mark them finished here.
|
| - notifyObserversInternal(MarkFinishedOption::DoNotMarkFinished);
|
| - notifyClientsInternal(MarkFinishedOption::DoNotMarkFinished);
|
| + // We notify clients/observers of finish here, and they will not be
|
| + // notified again in Resource::finish()/error().
|
| + checkNotify();
|
| if (loader())
|
| loader()->didFinishLoadingFirstPartInMultipart();
|
| }
|
|
|