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

Issue 2188983003: ResizeObserver pt5: size change notification (Closed)

Created:
4 years, 4 months ago by atotic1
Modified:
4 years, 4 months ago
Reviewers:
ikilpatrick, eae
CC:
chromium-reviews, blink-reviews, esprehn
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

ResizeObserver pt5: size change notification This change implements size change notification algorithm. Design doc at https://docs.google.com/document/d/1G4OmqqlFY3H3erQAUmteKES02-bIECikDjWBrDKH9PA/edit?usp=sharing Size change notification We collect and deliver notifications about all Elements whose size has changed inside the event loop. The algorithm loops until all notifications are delivered, or it hits the depth limit. c = ResizeObserverController(); for (limit = c.gatherObservations(0); limit != ResizeObserverController::kDepthLimit; limit = c.gatherObservations(limit)) { c.deliverObservations(); } if (c.skippedObservations()) { c.clearObservations(); sendError() } For efficiency, we avoid continuosly polling all elements for size changes. Instead, an Element notifies ResizeObservation when its size might have changed. ResizeObservation propagates this change to ResizeObserver, which propagates to ResizeObserverController. All of them set a flag indicating that they might have been changed. The flag is cleared when observations are delivered. BUG=612962 Committed: https://crrev.com/3d5b99673799a3067e9a5b8621f2b9ef2ff5d5d5 Cr-Commit-Position: refs/heads/master@{#408867}

Patch Set 1 #

Total comments: 2

Patch Set 2 : Review fixes #

Total comments: 18

Patch Set 3 : All CR comments addressed #

Unified diffs Side-by-side diffs Delta from patch set Stats (+146 lines, -8 lines) Patch
M third_party/WebKit/Source/core/observer/ResizeObservation.h View 1 2 chunks +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/observer/ResizeObservation.cpp View 2 chunks +9 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/observer/ResizeObserver.h View 1 2 3 chunks +15 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/core/observer/ResizeObserver.cpp View 1 2 2 chunks +58 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/observer/ResizeObserverController.h View 1 2 1 chunk +19 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/observer/ResizeObserverController.cpp View 2 chunks +43 lines, -0 lines 0 comments Download

Messages

Total messages: 31 (12 generated)
atotic1
Hi Emil and Ian, this is part 5 of ResizeObserver. It completes the ResizeObserver API, ...
4 years, 4 months ago (2016-07-28 18:05:36 UTC) #3
eae
Would you mind explaining the expectations around iterating over gatherObservations, especially around how the min-depth ...
4 years, 4 months ago (2016-07-28 18:18:32 UTC) #4
atotic1
On 2016/07/28 18:18:32, eae wrote: > Would you mind explaining the expectations around iterating over ...
4 years, 4 months ago (2016-07-28 19:09:59 UTC) #5
eae
On 2016/07/28 19:09:59, atotic1 wrote: > On 2016/07/28 18:18:32, eae wrote: > > Would you ...
4 years, 4 months ago (2016-07-28 19:11:36 UTC) #6
atotic1
> Oh, right. Now I recall that from the previous discussion. Thank you! > Would ...
4 years, 4 months ago (2016-07-28 19:42:17 UTC) #7
atotic1
On 2016/07/28 19:42:17, atotic1 wrote: > > Oh, right. Now I recall that from the ...
4 years, 4 months ago (2016-07-28 20:28:24 UTC) #8
atotic1
https://codereview.chromium.org/2188983003/diff/1/third_party/WebKit/Source/core/observer/ResizeObservation.h File third_party/WebKit/Source/core/observer/ResizeObservation.h (right): https://codereview.chromium.org/2188983003/diff/1/third_party/WebKit/Source/core/observer/ResizeObservation.h#newcode38 third_party/WebKit/Source/core/observer/ResizeObservation.h:38: // True if Element reported size change. On 2016/07/28 ...
4 years, 4 months ago (2016-07-28 20:36:59 UTC) #9
ikilpatrick
I'm catching up a bit, what is the test strategy here? I.e. can we check ...
4 years, 4 months ago (2016-07-28 20:39:05 UTC) #12
atotic1
On 2016/07/28 20:39:05, ikilpatrick wrote: > I'm catching up a bit, what is the test ...
4 years, 4 months ago (2016-07-28 20:42:00 UTC) #13
ikilpatrick
Dead code is always a bit scary, next patch is hooking into the event loop ...
4 years, 4 months ago (2016-07-28 21:48:40 UTC) #14
atotic1
On 2016/07/28 21:48:40, ikilpatrick wrote: > Dead code is always a bit scary, next patch ...
4 years, 4 months ago (2016-07-29 19:58:02 UTC) #17
atotic1
Only remaining issue is whether to cache Element's depth or not. Waiting on feedback from ...
4 years, 4 months ago (2016-07-29 20:04:17 UTC) #18
ikilpatrick
ok, lgtm modulo comments. esphren convinced me that walking up won't be that bad :). ...
4 years, 4 months ago (2016-07-29 23:18:39 UTC) #19
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/2188983003/40001
4 years, 4 months ago (2016-07-30 03:16:01 UTC) #22
atotic1
All comments addressed, commiting. https://codereview.chromium.org/2188983003/diff/20001/third_party/WebKit/Source/core/observer/ResizeObserver.cpp File third_party/WebKit/Source/core/observer/ResizeObserver.cpp (right): https://codereview.chromium.org/2188983003/diff/20001/third_party/WebKit/Source/core/observer/ResizeObserver.cpp#newcode61 third_party/WebKit/Source/core/observer/ResizeObserver.cpp:61: for (auto observation : observations) ...
4 years, 4 months ago (2016-07-30 03:16:29 UTC) #23
commit-bot: I haz the power
Try jobs failed on following builders: cast_shell_linux on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/cast_shell_linux/builds/199396)
4 years, 4 months ago (2016-07-30 05:16:55 UTC) #25
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/2188983003/40001
4 years, 4 months ago (2016-07-30 06:54:38 UTC) #27
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 4 months ago (2016-07-30 07:03:49 UTC) #29
commit-bot: I haz the power
4 years, 4 months ago (2016-07-30 07:05:34 UTC) #31
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/3d5b99673799a3067e9a5b8621f2b9ef2ff5d5d5
Cr-Commit-Position: refs/heads/master@{#408867}

Powered by Google App Engine
This is Rietveld 408576698