WebCore:
Reviewed by Adele.
Seeking related fixes, updates match to the latest specification
- rename loopCount of HTMLMediaElement to playCount
- add explicit seeking attribute to HTMLMediaElement to get semantics right
- implement the specification behavior that currentTime must immediately return seeked position in HTMLMediaElement
instead of MoviePrivateQTKit
- fix broken behavior when seeking past end of the media, add tests
- replace Movie didEnd callback with broader timeChanged callback (which gets called in didEnd case too)
- use setDelayCallbacks: in various MoviePrivateQTKit methods to avoid bug prone synchronous callbacks from QT, make
HTMLMediaElement not depend on synchronous callbacks
- do some cleanups and simplifications in MoviePrivateQTKit, get rid of m_rateBeforeSeek and m_blockStateUpdate variables
Tests: http/tests/media/video-seekable-stall.html
media/video-seeking.html
media/video-seek-past-end-paused.html
media/video-seek-past-end-playing.html
* html/HTMLAttributeNames.in:
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::HTMLMediaElement):
(WebCore::HTMLMediaElement::load):
(WebCore::HTMLMediaElement::movieNetworkStateChanged):
(WebCore::HTMLMediaElement::setReadyState):
(WebCore::HTMLMediaElement::seek):
(WebCore::HTMLMediaElement::seeking):
(WebCore::HTMLMediaElement::currentTime):
(WebCore::HTMLMediaElement::ended):
(WebCore::HTMLMediaElement::play):
(WebCore::HTMLMediaElement::pause):
(WebCore::HTMLMediaElement::playCount):
(WebCore::HTMLMediaElement::setPlayCount):
(WebCore::HTMLMediaElement::checkIfSeekNeeded):
(WebCore::HTMLMediaElement::movieTimeChanged):
(WebCore::HTMLMediaElement::endedPlayback):
(WebCore::HTMLMediaElement::updateMovie):
* html/HTMLMediaElement.h:
* html/HTMLMediaElement.idl:
* platform/graphics/Movie.cpp:
(WebCore::Movie::timeChanged):
* platform/graphics/Movie.h:
(WebCore::MovieClient::movieTimeChanged):
* platform/graphics/mac/MoviePrivateQTKit.h:
* platform/graphics/mac/MoviePrivateQTKit.mm:
(WebCore::MoviePrivate::MoviePrivate):
(WebCore::MoviePrivate::load):
(WebCore::MoviePrivate::play):
(WebCore::MoviePrivate::pause):
(WebCore::MoviePrivate::currentTime):
(WebCore::MoviePrivate::seek):
(WebCore::MoviePrivate::doSeek):
(WebCore::MoviePrivate::cancelSeek):
(WebCore::MoviePrivate::seekTimerFired):
(WebCore::MoviePrivate::startCuePointTimerIfNeeded):
(WebCore::MoviePrivate::paused):
(WebCore::MoviePrivate::updateStates):
(WebCore::MoviePrivate::timeChanged):
(WebCore::MoviePrivate::didEnd):
LayoutTests:
Reviewed by Adele.
Seeking related test updates
- update to match specificiation
- rename loopCount to playCount everywhere
- timeupdate events during seek
- fix that some tests (like audio ones) depended on timing sensitive ordering of play and load events
- add text about what is being tested
Add new tests for seeking past end, seeking past loaded position and 'seeking' DOM attribute.
* http/tests/media/video-seekable-stall-expected.txt: Added.
* http/tests/media/video-seekable-stall.html: Added.
* media/audio-constructor-expected.txt:
* media/audio-constructor-src-expected.txt:
* media/audio-constructor-src.html:
* media/audio-constructor.html:
* media/video-dom-loopcount-expected.txt:
* media/video-dom-loopcount.html:
* media/video-dom-loopend-expected.txt:
* media/video-dom-loopend.html:
* media/video-dom-loopstart-expected.txt:
* media/video-dom-loopstart.html:
* media/video-dom-start-expected.txt:
* media/video-dom-start.html:
* media/video-loopcount-expected.txt:
* media/video-loopcount.html:
* media/video-loopend-expected.txt:
* media/video-loopend.html:
* media/video-loopstart-expected.txt:
* media/video-loopstart.html:
* media/video-seek-past-end-paused-expected.txt: Added.
* media/video-seek-past-end-paused.html: Added.
* media/video-seek-past-end-playing-expected.txt: Added.
* media/video-seek-past-end-playing.html: Added.
* media/video-seeking-expected.txt: Added.
* media/video-seeking.html: Added.
* media/video-test.js:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@27866
268f45cc-cd09-0410-ab3c-
d52691b4dbfc