WebCore: HTML5 media elements do not fire waiting events correctly
authorajwong@chromium.org <ajwong@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 21 Aug 2009 04:10:10 +0000 (04:10 +0000)
committerajwong@chromium.org <ajwong@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 21 Aug 2009 04:10:10 +0000 (04:10 +0000)
commit0bffb74e70c4fb8579f9f0f3d2b61e8c71d48ee1
treea4d5d9df13849f10fa5c51f157680ebe3082b33b
parent7bff78a9e937c1772b76b6918e3b73558fd1926b
WebCore: HTML5 media elements do not fire waiting events correctly
https://bugs.webkit.org/show_bug.cgi?id=28335

Patch by Albert J. Wong <ajwong@chromium.org> on 2009-08-20
Reviewed by David Levin.

Fire the waiting event before seeking, and fix a case where firing of
the seeked event is missed when the ready state is changed during
a seek.

Added video-waiting-seeking.html into manual tests because not
all platforms allow seeking into non-buffered ranges.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::setReadyState): add support for
waiting event when seeking.
(WebCore::HTMLMediaElement::finishSeek): send seeked event
whenever seeking finishes.
(WebCore::HTMLMediaElement::mediaPlayerTimeChanged): dispatch to
new function.
* html/HTMLMediaElement.h:
* manual-tests/video-waiting-seeking.html: Added.

LayoutTests: HTML5 media elements do not fire waiting events correctly
https://bugs.webkit.org/show_bug.cgi?id=28335

Patch by Albert J. Wong <ajwong@chromium.org> on 2009-08-20
Reviewed by David Levin.

New manual test to check if waiting/seeking events are fired
when seeking into a non-buffered region.

* http/tests/media/video-throttled-load.cgi: Added.
* media/video-test.js:
(isInTimeRanges):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@47619 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/http/tests/media/video-throttled-load.cgi [new file with mode: 0644]
LayoutTests/media/video-test.js
WebCore/ChangeLog
WebCore/html/HTMLMediaElement.cpp
WebCore/html/HTMLMediaElement.h
WebCore/manual-tests/video-waiting-seeking.html [new file with mode: 0644]