12012-07-25 Zeno Albisser <zeno@webkit.org>
2
3 [Qt] requestAnimationFrame should only trigger when a new frame can be displayed.
4 https://bugs.webkit.org/show_bug.cgi?id=88638
5
6 Disable REQUEST_ANIMATION_FRAME_TIMER for the Qt port and tie
7 the servicing of scripted animations to the renderNextFrame call for WK2.
8 For WK1 we rely on the RefreshAnimation that is based on QAbstractAnimation.
9
10 Reviewed by NOBODY (OOPS!).
11
12 * WebCoreSupport/ChromeClientQt.cpp:
13 (RefreshAnimation):
14 Add a RefreshAnimation that is based on QAbstractAnimation
15 and drives the servicing of the scripted animations for WK1.
16 (WebCore::RefreshAnimation::RefreshAnimation):
17 (WebCore::RefreshAnimation::duration):
18 (WebCore::RefreshAnimation::scheduleAnimation):
19 Set m_animationScheduled to true and start the animation
20 timer in case it is not running yet.
21 (WebCore::RefreshAnimation::updateCurrentTime):
22 Call serviceScriptedAnimations if m_animationScheduled is true.
23 If this is not the case, the animation timer can be stopped,
24 because no animation needs to be scheduled anymore.
25 (WebCore):
26 (WebCore::ChromeClientQt::scheduleAnimation):
27 Create and start the RefreshAnimation instance with the
28 first call to scheduleAnimation.
29 * WebCoreSupport/ChromeClientQt.h:
30 (WebCore):
31 (ChromeClientQt):
32