no timeupdate events emitted for media controller
https://bugs.webkit.org/show_bug.cgi?id=93745

Reviewed by Eric Carlson.

Source/WebCore:

Generate timeupdate events while the current position is changing.

Test: media/media-controller-timeupdate.html

Enforce the spec requirement that the timeupdate event is fired no more often
than every 250ms.
* html/MediaController.cpp:
(MediaController::scheduleTimeupdateEvent):

Add a periodic firing timer to generate timeupdate events during playback.
* html/MediaController.cpp:
(MediaController::startTimeupdateTimer):
(MediaController::timeupdateTimerFired):

* html/MediaController.cpp:
(MediaController::MediaController): Initialize m_previousTimeupdateTime.
(MediaController::setCurrentTime): Call scheduleTimeUpdateEvent.
(MediaController::updatePlaybackState): Start and stop the timeupdate timer.
* html/MediaController.h:

LayoutTests:

New test checking that the timeupdate event is emmitted correctly during playback.

* media/media-controller-timeupdate-expected.txt: Added.
* media/media-controller-timeupdate.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125337 268f45cc-cd09-0410-ab3c-d52691b4dbfc
6 files changed