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

Issue 1776493002: IntersectionObserver: use an idle callback to send notifications. (Closed)

Created:
4 years, 9 months ago by szager1
Modified:
4 years, 9 months ago
Reviewers:
haraken, Sami, ojan
CC:
blink-reviews, blink-reviews-dom_chromium.org, chromium-reviews, dglazkov+blink, eae+blinkwatch, rwlbuis, sof
Base URL:
https://chromium.googlesource.com/chromium/src@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

IntersectionObserver: use an idle callback to send notifications. With this change, the tests can no longer use setTimeout(0) to wait for notifications to be delivered. Instead, use takeRecords() to proactively grab notifications right after they are generated (typically in a RAF right after a layout change). BUG=540528 R=ojan@chromium.org,haraken@chromium.org Committed: https://crrev.com/2c168f38b5c0e4e50374be4e54c44901c60738a9 Cr-Commit-Position: refs/heads/master@{#380278}

Patch Set 1 #

Total comments: 17

Patch Set 2 : nits #

Patch Set 3 : Add comment about 100ms deadline. #

Patch Set 4 : Add explanation of double-RAF in tests #

Patch Set 5 : rebase #

Patch Set 6 : syntax error #

Unified diffs Side-by-side diffs Delta from patch set Stats (+751 lines, -693 lines) Patch
M third_party/WebKit/LayoutTests/http/tests/intersection-observer/iframe-cross-origin.html View 1 2 3 1 chunk +6 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/intersection-observer/resources/cross-origin-subframe.html View 1 chunk +35 lines, -41 lines 0 comments Download
A third_party/WebKit/LayoutTests/intersection-observer/README View 1 2 3 1 chunk +29 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/intersection-observer/containing-block.html View 1 2 3 1 chunk +67 lines, -69 lines 0 comments Download
M third_party/WebKit/LayoutTests/intersection-observer/iframe-no-root.html View 1 2 3 1 chunk +61 lines, -66 lines 0 comments Download
M third_party/WebKit/LayoutTests/intersection-observer/iframe-no-root-expected.txt View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/intersection-observer/multiple-thresholds.html View 1 2 3 1 chunk +179 lines, -171 lines 0 comments Download
M third_party/WebKit/LayoutTests/intersection-observer/multiple-thresholds-expected.txt View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/intersection-observer/observer-without-js-reference.html View 1 2 3 1 chunk +22 lines, -15 lines 0 comments Download
M third_party/WebKit/LayoutTests/intersection-observer/root-margin.html View 1 2 3 1 chunk +71 lines, -70 lines 0 comments Download
M third_party/WebKit/LayoutTests/intersection-observer/root-margin-expected.txt View 1 chunk +6 lines, -4 lines 0 comments Download
M third_party/WebKit/LayoutTests/intersection-observer/same-document-no-root.html View 1 2 3 1 chunk +56 lines, -57 lines 0 comments Download
M third_party/WebKit/LayoutTests/intersection-observer/same-document-root.html View 1 chunk +92 lines, -90 lines 0 comments Download
M third_party/WebKit/LayoutTests/intersection-observer/same-document-root-expected.txt View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/intersection-observer/same-document-zero-size-target.html View 1 2 3 1 chunk +56 lines, -58 lines 0 comments Download
M third_party/WebKit/LayoutTests/intersection-observer/timestamp.html View 1 2 3 3 chunks +34 lines, -31 lines 0 comments Download
M third_party/WebKit/Source/core/dom/IdleRequestCallback.h View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/dom/IntersectionObserverController.h View 1 3 chunks +6 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/dom/IntersectionObserverController.cpp View 1 2 3 4 5 4 chunks +27 lines, -14 lines 0 comments Download

Messages

Total messages: 27 (10 generated)
szager1
haraken, would you please review the oilpan-related bits?
4 years, 9 months ago (2016-03-08 01:05:12 UTC) #1
ojan
Sami, mind doing a once over on the C++ code here since you know idle ...
4 years, 9 months ago (2016-03-08 01:37:11 UTC) #3
haraken
LGTM, but please wait for Sami's approval. https://codereview.chromium.org/1776493002/diff/1/third_party/WebKit/Source/core/dom/IntersectionObserverController.cpp File third_party/WebKit/Source/core/dom/IntersectionObserverController.cpp (right): https://codereview.chromium.org/1776493002/diff/1/third_party/WebKit/Source/core/dom/IntersectionObserverController.cpp#newcode43 third_party/WebKit/Source/core/dom/IntersectionObserverController.cpp:43: options.setTimeout(100); We ...
4 years, 9 months ago (2016-03-08 03:44:03 UTC) #4
Sami
Thanks for doing this, seems like a good idea. I left a few comments. https://codereview.chromium.org/1776493002/diff/1/third_party/WebKit/LayoutTests/http/tests/intersection-observer/iframe-cross-origin.html ...
4 years, 9 months ago (2016-03-08 17:32:42 UTC) #5
szager1
https://codereview.chromium.org/1776493002/diff/1/third_party/WebKit/LayoutTests/http/tests/intersection-observer/iframe-cross-origin.html File third_party/WebKit/LayoutTests/http/tests/intersection-observer/iframe-cross-origin.html (right): https://codereview.chromium.org/1776493002/diff/1/third_party/WebKit/LayoutTests/http/tests/intersection-observer/iframe-cross-origin.html#newcode67 third_party/WebKit/LayoutTests/http/tests/intersection-observer/iframe-cross-origin.html:67: requestAnimationFrame(() => { iframe.contentWindow.postMessage("", "*") }) On 2016/03/08 17:32:41, ...
4 years, 9 months ago (2016-03-08 18:51:32 UTC) #6
haraken
https://codereview.chromium.org/1776493002/diff/1/third_party/WebKit/Source/core/dom/IntersectionObserverController.cpp File third_party/WebKit/Source/core/dom/IntersectionObserverController.cpp (right): https://codereview.chromium.org/1776493002/diff/1/third_party/WebKit/Source/core/dom/IntersectionObserverController.cpp#newcode43 third_party/WebKit/Source/core/dom/IntersectionObserverController.cpp:43: options.setTimeout(100); On 2016/03/08 18:51:32, szager1 wrote: > On 2016/03/08 ...
4 years, 9 months ago (2016-03-08 23:05:58 UTC) #7
szager1
https://codereview.chromium.org/1776493002/diff/1/third_party/WebKit/Source/core/dom/IntersectionObserverController.cpp File third_party/WebKit/Source/core/dom/IntersectionObserverController.cpp (right): https://codereview.chromium.org/1776493002/diff/1/third_party/WebKit/Source/core/dom/IntersectionObserverController.cpp#newcode43 third_party/WebKit/Source/core/dom/IntersectionObserverController.cpp:43: options.setTimeout(100); On 2016/03/08 23:05:58, haraken wrote: > On 2016/03/08 ...
4 years, 9 months ago (2016-03-08 23:12:02 UTC) #8
Sami
Thanks, lgtm overall. https://codereview.chromium.org/1776493002/diff/1/third_party/WebKit/LayoutTests/http/tests/intersection-observer/iframe-cross-origin.html File third_party/WebKit/LayoutTests/http/tests/intersection-observer/iframe-cross-origin.html (right): https://codereview.chromium.org/1776493002/diff/1/third_party/WebKit/LayoutTests/http/tests/intersection-observer/iframe-cross-origin.html#newcode67 third_party/WebKit/LayoutTests/http/tests/intersection-observer/iframe-cross-origin.html:67: requestAnimationFrame(() => { iframe.contentWindow.postMessage("", "*") }) ...
4 years, 9 months ago (2016-03-09 18:29:55 UTC) #9
szager1
https://codereview.chromium.org/1776493002/diff/1/third_party/WebKit/LayoutTests/http/tests/intersection-observer/iframe-cross-origin.html File third_party/WebKit/LayoutTests/http/tests/intersection-observer/iframe-cross-origin.html (right): https://codereview.chromium.org/1776493002/diff/1/third_party/WebKit/LayoutTests/http/tests/intersection-observer/iframe-cross-origin.html#newcode67 third_party/WebKit/LayoutTests/http/tests/intersection-observer/iframe-cross-origin.html:67: requestAnimationFrame(() => { iframe.contentWindow.postMessage("", "*") }) On 2016/03/09 18:29:55, ...
4 years, 9 months ago (2016-03-09 20:45:25 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1776493002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1776493002/60001
4 years, 9 months ago (2016-03-09 20:46:04 UTC) #13
commit-bot: I haz the power
Failed to apply patch for third_party/WebKit/Source/core/dom/IntersectionObserverController.cpp: While running git apply --index -3 -p1; error: patch ...
4 years, 9 months ago (2016-03-09 22:01:35 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1776493002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1776493002/80001
4 years, 9 months ago (2016-03-09 22:15:18 UTC) #18
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_compile_dbg_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_compile_dbg_ng/builds/171172)
4 years, 9 months ago (2016-03-09 22:25:26 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1776493002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1776493002/100001
4 years, 9 months ago (2016-03-09 23:04:41 UTC) #23
commit-bot: I haz the power
Committed patchset #6 (id:100001)
4 years, 9 months ago (2016-03-10 01:04:49 UTC) #24
commit-bot: I haz the power
Patchset 6 (id:??) landed as https://crrev.com/2c168f38b5c0e4e50374be4e54c44901c60738a9 Cr-Commit-Position: refs/heads/master@{#380278}
4 years, 9 months ago (2016-03-10 01:06:26 UTC) #26
sof
4 years, 9 months ago (2016-03-10 08:38:54 UTC) #27
Message was sent while issue was closed.
A revert of this CL (patchset #6 id:100001) has been created in
https://codereview.chromium.org/1780163002/ by sigbjornf@opera.com.

The reason for reverting is: Tests added are leaking,
https://build.chromium.org/p/chromium.webkit/builders/WebKit%20Linux%20Leak/b....

Powered by Google App Engine
This is Rietveld 408576698