Commit 12d1ff73 authored by dtapuska@chromium.org's avatar dtapuska@chromium.org

Ensure serviceOnNextFrame isn't put off indefinitely.

A constant series of compositor updates would force the serviceOnNextFrame
to be kept being put off. The wakeAfter was always called with a fixed
duration so it would just keep getting cancelled and rescheduled.

Since the serviceOnNextFrame ends up calling setNeedsLayout inside the
scheduleAnimation callback; the LayoutTree would get updated in that call.
The hit testing problem identified in the bug was related to the fact that
the LayoutTree's layer transforms weren't updated correctly until it was
told it needed to do a Layout.

The fix is to check the remaining duration vs the new scheduled duration
and avoid the schedule if the new duration is longer.


BUG=513833

Review URL: https://codereview.chromium.org/1287013003

git-svn-id: svn://svn.chromium.org/blink/trunk@200737 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent df10f0e3
This is a testharness.js-based test.
FAIL Hit testing should not interrupt transition scheduling assert_true: expected true got false
Harness: the test ran to completion.
......@@ -174,6 +174,8 @@ void AnimationTimeline::scheduleNextService()
void AnimationTimeline::AnimationTimelineTiming::wakeAfter(double duration)
{
if (m_timer.isActive() && m_timer.nextFireInterval() < duration)
return;
m_timer.startOneShot(duration, FROM_HERE);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment