MediaController.currentTime should be kept stable during script execution.
authorjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 23 Jul 2012 21:39:19 +0000 (21:39 +0000)
committerjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 23 Jul 2012 21:39:19 +0000 (21:39 +0000)
commit4829d25054d6a7dcc96b116fb5908cc3862f40fe
treed98d4784e543dd8040449a45cddda7f3e92f83b3
parent763b8c81cce01d29431215aff14d94eaa3e52c2a
MediaController.currentTime should be kept stable during script execution.
https://bugs.webkit.org/show_bug.cgi?id=88555

Reviewed by Eric Carlson.

Source/WebCore:

Test: media/media-controller-time-constant.html

To keep MediaController.currentTime stable, add a new m_position variable and
a new m_clearPositionTimer timer.  Both must be mutable variables as they will
be updated from within const functions.  Calls to currentTime() will result in
stable values until the next runloop iteration.

* html/MediaController.cpp:
(MediaController::MediaController):
(MediaController::currentTime):
(MediaController::setCurrentTime):
(MediaController::clearPositionTimerFired):
* html/MediaController.h:

LayoutTests:

* media/media-controller-time-constant-expected.txt: Added.
* media/media-controller-time-constant.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@123386 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/media/media-controller-time-constant-expected.txt [new file with mode: 0644]
LayoutTests/media/media-controller-time-constant.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/html/MediaController.cpp
Source/WebCore/html/MediaController.h