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

Issue 2859093003: Change the semantics of ImageLoader::has_pending_load_event_ (Closed)

Created:
3 years, 7 months ago by hiroshige
Modified:
3 years, 7 months ago
CC:
chromium-reviews, blink-reviews
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Change the semantics of ImageLoader::has_pending_load_event_ ImageLoader works like: (1) Image loading is started (AddObserver()), (2) Image loading is finished and the image element's load event is scheduled (ImageNotifyFinished()), and then (3) The load event is fired. Previously, has_pending_load_event_ was true from (1) to (3). This CL makes has_pending_load_event_ true only from (2) to (3), i.e. only while there is a pending task on EventSender. Because "image_ && !image_complete_" is true from (1) to (2), The previous "has_pending_load_event_" is equivalent to the current "(image_ && !image_complete_) || has_pending_load_event_". This CL, however, leaves most of "has_pending_load_event_" usage unchanged, because in such cases they are equivalent, given the assumptions around image_ and image_complete_, some of which are confirmed by [1]. This is preparation for [2] that replaces has_pending_load_event_ with a reference to a task that corresponds to the pending load event. [1] https://codereview.chromium.org/2859383002/ [2] https://codereview.chromium.org/2863763003/ BUG=624697, 719759 Review-Url: https://codereview.chromium.org/2859093003 Cr-Commit-Position: refs/heads/master@{#473684} Committed: https://chromium.googlesource.com/chromium/src/+/2e6f72c80e0106f348fd9437536edc2e9f3b7acc

Patch Set 1 #

Patch Set 2 : bug fix #

Total comments: 8

Patch Set 3 : nit #

Total comments: 4

Patch Set 4 : Comment #

Patch Set 5 : Rebase fix #

Patch Set 6 : Rebase #

Patch Set 7 : Rebase #

Patch Set 8 : Rebase #

Patch Set 9 : Rebase #

Patch Set 10 : HasPendingEvent #

Patch Set 11 : Rebase #

Total comments: 4

Patch Set 12 : Reflect comments #

Patch Set 13 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+23 lines, -15 lines) Patch
M third_party/WebKit/Source/core/loader/ImageLoader.h View 1 2 3 4 5 6 7 8 9 3 chunks +5 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/loader/ImageLoader.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 7 chunks +18 lines, -12 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 62 (49 generated)
hiroshige
https://codereview.chromium.org/2859093003/diff/20001/third_party/WebKit/Source/core/loader/ImageLoader.cpp File third_party/WebKit/Source/core/loader/ImageLoader.cpp (left): https://codereview.chromium.org/2859093003/diff/20001/third_party/WebKit/Source/core/loader/ImageLoader.cpp#oldcode523 third_party/WebKit/Source/core/loader/ImageLoader.cpp:523: CHECK(has_pending_load_event_); Previous: We assert has_pending_load_event_ == true. Now: This ...
3 years, 7 months ago (2017-05-05 19:58:31 UTC) #11
hiroshige
PTAL.
3 years, 7 months ago (2017-05-05 20:04:21 UTC) #13
kinuko
lgtm https://codereview.chromium.org/2859093003/diff/40001/third_party/WebKit/Source/core/loader/ImageLoader.h File third_party/WebKit/Source/core/loader/ImageLoader.h (right): https://codereview.chromium.org/2859093003/diff/40001/third_party/WebKit/Source/core/loader/ImageLoader.h#newcode190 third_party/WebKit/Source/core/loader/ImageLoader.h:190: bool has_pending_load_event_ : 1; Could we have a ...
3 years, 7 months ago (2017-05-08 05:36:46 UTC) #14
kouhei (in TOK)
https://codereview.chromium.org/2859093003/diff/40001/third_party/WebKit/Source/core/loader/ImageLoader.h File third_party/WebKit/Source/core/loader/ImageLoader.h (right): https://codereview.chromium.org/2859093003/diff/40001/third_party/WebKit/Source/core/loader/ImageLoader.h#newcode99 third_party/WebKit/Source/core/loader/ImageLoader.h:99: return (image_ && !image_complete_) || has_pending_load_event_ || :) This ...
3 years, 7 months ago (2017-05-08 13:18:40 UTC) #15
kouhei (in TOK)
lgtm of course
3 years, 7 months ago (2017-05-08 13:19:48 UTC) #16
hiroshige
https://codereview.chromium.org/2859093003/diff/40001/third_party/WebKit/Source/core/loader/ImageLoader.h File third_party/WebKit/Source/core/loader/ImageLoader.h (right): https://codereview.chromium.org/2859093003/diff/40001/third_party/WebKit/Source/core/loader/ImageLoader.h#newcode190 third_party/WebKit/Source/core/loader/ImageLoader.h:190: bool has_pending_load_event_ : 1; On 2017/05/08 13:18:40, kouhei (on ...
3 years, 7 months ago (2017-05-08 19:05:26 UTC) #20
hiroshige
On 2017/05/08 19:05:26, hiroshige wrote: > https://codereview.chromium.org/2859093003/diff/40001/third_party/WebKit/Source/core/loader/ImageLoader.h > File third_party/WebKit/Source/core/loader/ImageLoader.h (right): > > https://codereview.chromium.org/2859093003/diff/40001/third_party/WebKit/Source/core/loader/ImageLoader.h#newcode190 > ...
3 years, 7 months ago (2017-05-09 00:34:42 UTC) #27
hiroshige
> To keep the original behavior, HasPendingActivity() should > be: > (image_ && !image_complete_ && ...
3 years, 7 months ago (2017-05-11 22:55:02 UTC) #46
kinuko
https://codereview.chromium.org/2859093003/diff/200001/third_party/WebKit/Source/core/loader/ImageLoader.cpp File third_party/WebKit/Source/core/loader/ImageLoader.cpp (right): https://codereview.chromium.org/2859093003/diff/200001/third_party/WebKit/Source/core/loader/ImageLoader.cpp#newcode625 third_party/WebKit/Source/core/loader/ImageLoader.cpp:625: has_pending_load_event_ || has_pending_error_event_; This condition is getting slightly complex, ...
3 years, 7 months ago (2017-05-12 08:28:24 UTC) #47
yhirano
https://codereview.chromium.org/2859093003/diff/200001/third_party/WebKit/Source/core/loader/ImageLoader.cpp File third_party/WebKit/Source/core/loader/ImageLoader.cpp (right): https://codereview.chromium.org/2859093003/diff/200001/third_party/WebKit/Source/core/loader/ImageLoader.cpp#newcode217 third_party/WebKit/Source/core/loader/ImageLoader.cpp:217: // |has_pending_load_event_| is always false and |image_complete_| is Is ...
3 years, 7 months ago (2017-05-12 10:49:50 UTC) #48
hiroshige
https://codereview.chromium.org/2859093003/diff/200001/third_party/WebKit/Source/core/loader/ImageLoader.cpp File third_party/WebKit/Source/core/loader/ImageLoader.cpp (right): https://codereview.chromium.org/2859093003/diff/200001/third_party/WebKit/Source/core/loader/ImageLoader.cpp#newcode217 third_party/WebKit/Source/core/loader/ImageLoader.cpp:217: // |has_pending_load_event_| is always false and |image_complete_| is On ...
3 years, 7 months ago (2017-05-19 20:56:35 UTC) #49
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2859093003/240001
3 years, 7 months ago (2017-05-22 19:19:27 UTC) #59
commit-bot: I haz the power
3 years, 7 months ago (2017-05-22 20:49:46 UTC) #62
Message was sent while issue was closed.
Committed patchset #13 (id:240001) as
https://chromium.googlesource.com/chromium/src/+/2e6f72c80e0106f348fd9437536e...

Powered by Google App Engine
This is Rietveld 408576698