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

Issue 1994133002: Disallow throttling while running requestAnimationFrame callbacks (Closed)

Created:
4 years, 7 months ago by Sami
Modified:
4 years, 7 months ago
Reviewers:
esprehn, Xianzhu
CC:
darktears, blink-reviews, blink-reviews-animation_chromium.org, blink-reviews-dom_chromium.org, chromium-reviews, dglazkov+blink, eae+blinkwatch, Eric Willigers, rjwright, rwlbuis, shans, sof
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Disallow throttling while running requestAnimationFrame callbacks If a requestAnimationFrame callback tries to do a synchronous style computation in another frame which is currently throttled, this fails because throttling is allowed for the entire BeginMainFrame, which includes running rAF callbacks as a substep. This patch fixes the issue by disallowing throttling while executing rAF callbacks. Note that rAF callbacks for throttled frames are still skipped. BUG=607336 Committed: https://crrev.com/afdf51c967149db6bd8d6a533886efc957435e18 Cr-Commit-Position: refs/heads/master@{#395054}

Patch Set 1 #

Patch Set 2 : Add tests #

Total comments: 2

Patch Set 3 : Simplify test #

Total comments: 2

Patch Set 4 : Another simplification #

Unified diffs Side-by-side diffs Delta from patch set Stats (+73 lines, -0 lines) Patch
M third_party/WebKit/Source/core/dom/DocumentLifecycle.h View 1 2 chunks +16 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/dom/DocumentLifecycle.cpp View 1 chunk +11 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/page/PageAnimator.cpp View 2 chunks +4 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/web/tests/FrameThrottlingTest.cpp View 1 2 3 1 chunk +42 lines, -0 lines 0 comments Download

Messages

Total messages: 16 (7 generated)
Sami
PTAL.
4 years, 7 months ago (2016-05-19 18:43:44 UTC) #3
esprehn
You can just add a C++ raf callback, you don't need to write script for ...
4 years, 7 months ago (2016-05-19 18:53:59 UTC) #5
Sami
> You can just add a C++ raf callback, you don't need to write script ...
4 years, 7 months ago (2016-05-19 19:05:20 UTC) #6
esprehn
https://codereview.chromium.org/1994133002/diff/40001/third_party/WebKit/Source/web/tests/FrameThrottlingTest.cpp File third_party/WebKit/Source/web/tests/FrameThrottlingTest.cpp (right): https://codereview.chromium.org/1994133002/diff/40001/third_party/WebKit/Source/web/tests/FrameThrottlingTest.cpp#newcode847 third_party/WebKit/Source/web/tests/FrameThrottlingTest.cpp:847: " var throttledFrame = window.parent.frames['first'];\n" .first, you don't need ...
4 years, 7 months ago (2016-05-20 00:41:35 UTC) #7
esprehn
I do think just using a C++ callback is more clear, but this is lgtm ...
4 years, 7 months ago (2016-05-20 00:42:10 UTC) #8
Sami
https://codereview.chromium.org/1994133002/diff/40001/third_party/WebKit/Source/web/tests/FrameThrottlingTest.cpp File third_party/WebKit/Source/web/tests/FrameThrottlingTest.cpp (right): https://codereview.chromium.org/1994133002/diff/40001/third_party/WebKit/Source/web/tests/FrameThrottlingTest.cpp#newcode847 third_party/WebKit/Source/web/tests/FrameThrottlingTest.cpp:847: " var throttledFrame = window.parent.frames['first'];\n" On 2016/05/20 00:41:35, esprehn ...
4 years, 7 months ago (2016-05-20 09:31:10 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1994133002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1994133002/60001
4 years, 7 months ago (2016-05-20 09:31:28 UTC) #12
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 7 months ago (2016-05-20 11:08:00 UTC) #14
commit-bot: I haz the power
4 years, 7 months ago (2016-05-20 11:09:25 UTC) #16
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/afdf51c967149db6bd8d6a533886efc957435e18
Cr-Commit-Position: refs/heads/master@{#395054}

Powered by Google App Engine
This is Rietveld 408576698