WebCore:
authorantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 17 Nov 2007 02:10:16 +0000 (02:10 +0000)
committerantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 17 Nov 2007 02:10:16 +0000 (02:10 +0000)
commit15512ae47d57063371275ffab940fb87b17ce2d0
treecf8445b965f1efa1a5d6b79bd8ce43d60eb22cfd
parentfa5962ee86128008b3acadec2eeaa415b998258c
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
37 files changed:
LayoutTests/ChangeLog
LayoutTests/http/tests/media/video-seekable-stall-expected.txt [new file with mode: 0644]
LayoutTests/http/tests/media/video-seekable-stall.html [new file with mode: 0644]
LayoutTests/media/audio-constructor-expected.txt
LayoutTests/media/audio-constructor-src-expected.txt
LayoutTests/media/audio-constructor-src.html
LayoutTests/media/audio-constructor.html
LayoutTests/media/video-dom-loopcount-expected.txt
LayoutTests/media/video-dom-loopcount.html
LayoutTests/media/video-dom-loopend-expected.txt
LayoutTests/media/video-dom-loopend.html
LayoutTests/media/video-dom-loopstart-expected.txt
LayoutTests/media/video-dom-loopstart.html
LayoutTests/media/video-dom-start-expected.txt
LayoutTests/media/video-dom-start.html
LayoutTests/media/video-loopcount-expected.txt
LayoutTests/media/video-loopcount.html
LayoutTests/media/video-loopend-expected.txt
LayoutTests/media/video-loopend.html
LayoutTests/media/video-loopstart-expected.txt
LayoutTests/media/video-loopstart.html
LayoutTests/media/video-seek-past-end-paused-expected.txt [new file with mode: 0644]
LayoutTests/media/video-seek-past-end-paused.html [new file with mode: 0644]
LayoutTests/media/video-seek-past-end-playing-expected.txt [new file with mode: 0644]
LayoutTests/media/video-seek-past-end-playing.html [new file with mode: 0644]
LayoutTests/media/video-seeking-expected.txt [new file with mode: 0644]
LayoutTests/media/video-seeking.html [new file with mode: 0644]
LayoutTests/media/video-test.js
WebCore/ChangeLog
WebCore/html/HTMLAttributeNames.in
WebCore/html/HTMLMediaElement.cpp
WebCore/html/HTMLMediaElement.h
WebCore/html/HTMLMediaElement.idl
WebCore/platform/graphics/Movie.cpp
WebCore/platform/graphics/Movie.h
WebCore/platform/graphics/mac/MoviePrivateQTKit.h
WebCore/platform/graphics/mac/MoviePrivateQTKit.mm