WebCore:
authorantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 13 Nov 2007 20:08:27 +0000 (20:08 +0000)
committerantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 13 Nov 2007 20:08:27 +0000 (20:08 +0000)
commitf3af4fc42f9bb80088ec95c598292ff896b3610c
tree903077cd0019dc720b3b6adc8335618f9a6244f0
parent5c2a98ac8d415a1934476dd00ab5adef2d68a5a3
WebCore:

        Reviewed by Adele.

        Fix that 'timeupdate' and 'waiting' events were never dispatched.

        Add explicit m_paused attribute instead of trying to derive paused state from
        underlying media. Call updatePlayState() to start/stop media playback
        when any attribute that affects active playback state changes. This matches
        specification text.

        Test: http/tests/media/video-play-stall.html

        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::HTMLMediaElement):
        (WebCore::HTMLMediaElement::setReadyState):
        (WebCore::HTMLMediaElement::paused):
        (WebCore::HTMLMediaElement::play):
        (WebCore::HTMLMediaElement::pause):
        (WebCore::HTMLMediaElement::checkIfSeekNeeded):
        (WebCore::HTMLMediaElement::movieDidEnd):
        (WebCore::HTMLMediaElement::updatePlayState):
        * html/HTMLMediaElement.h:

LayoutTests:

        Reviewed by Adele.

        - add HTTP media test for stalling load
        - update tests that don't specifically test autoplay feature to not use autoplay
          attribute since playback may start before event listeners are registered

        * http/tests/media: Added.
        * http/tests/media/video-load-and-stall.cgi: Added.
        * http/tests/media/video-play-stall-expected.txt: Added.
        * http/tests/media/video-play-stall.html: Added.
        * media/video-autoplay.html:
        * media/video-dom-loopstart.html:
        * media/video-end.html:
        * media/video-loopcount.html:
        * media/video-loopend.html:
        * media/video-loopstart.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@27758 268f45cc-cd09-0410-ab3c-d52691b4dbfc
13 files changed:
LayoutTests/ChangeLog
LayoutTests/http/tests/media/video-load-and-stall.cgi [new file with mode: 0755]
LayoutTests/http/tests/media/video-play-stall-expected.txt [new file with mode: 0644]
LayoutTests/http/tests/media/video-play-stall.html [new file with mode: 0644]
LayoutTests/media/video-autoplay.html
LayoutTests/media/video-dom-loopstart.html
LayoutTests/media/video-end.html
LayoutTests/media/video-loopcount.html
LayoutTests/media/video-loopend.html
LayoutTests/media/video-loopstart.html
WebCore/ChangeLog
WebCore/html/HTMLMediaElement.cpp
WebCore/html/HTMLMediaElement.h