Do not notify ResourceClient/ImageResourceObserver of finish twice for multipart image |
||
Issue descriptionCurrently, clients/observers can be notified of finish twice, when: Case 1. The first part is loaded, AND Case 2. When loading is really finished (i.e. finish() or error() is called). This issue aims to drop the second call (Case 2) to - Make the finish notifications to be always called at most once, and - Simplify the logic for preparation for Issue 667641. (Issue 667641 can be done without this refactoring, but with more additional logic.)
,
Nov 29 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/18a8d7074c9f0c8e2c3fff36b3a021cdd3a06477 commit 18a8d7074c9f0c8e2c3fff36b3a021cdd3a06477 Author: hiroshige <hiroshige@chromium.org> Date: Tue Nov 29 10:39:07 2016 Do not notify ResourceClient/ImageResourceObserver of finish twice Previously, for a multipart image, - ResourceClient::notifyFinished() and - ImageResourceObserver::imageNotifyFinished() might be called twice: 1. When the first part is loaded, and 2. When the whole loading is finished. This CL removes the second case to make callback/observer control consistent and simpler, as preparation for https://codereview.chromium.org/2469873002/. Behavior change: Previously, multipart images are replaced with broken images when cancelled after the first part is loaded. After this CL, multipart images remains as-is in such cases. https://codereview.chromium.org/1840933002 fixes layout tests for this change. BUG= 668598 Review-Url: https://codereview.chromium.org/2513413008 Cr-Commit-Position: refs/heads/master@{#434952} [modify] https://crrev.com/18a8d7074c9f0c8e2c3fff36b3a021cdd3a06477/third_party/WebKit/Source/core/fetch/ImageResource.cpp [modify] https://crrev.com/18a8d7074c9f0c8e2c3fff36b3a021cdd3a06477/third_party/WebKit/Source/core/fetch/ImageResource.h [modify] https://crrev.com/18a8d7074c9f0c8e2c3fff36b3a021cdd3a06477/third_party/WebKit/Source/core/fetch/Resource.cpp [modify] https://crrev.com/18a8d7074c9f0c8e2c3fff36b3a021cdd3a06477/third_party/WebKit/Source/core/fetch/Resource.h
,
Nov 29 2016
|
||
►
Sign in to add a comment |
||
Comment 1 by bugdroid1@chromium.org
, Nov 29 2016