2010-08-11 Eric Carlson <eric.carlson@apple.com>
authorEric Carlson <eric.carlson@apple.com>
Wed, 11 Aug 2010 18:56:50 +0000 (18:56 +0000)
committerAdemar de Souza Reis Jr <ademar.reis@openbossa.org>
Thu, 20 Jan 2011 19:55:15 +0000 (16:55 -0300)
commit1cc312049df19936dc764f70028ab76ac6a6267b
tree6ee91b1e83d64a7624821d71eec7edb1d8b44244
parent68a63b1646fc701ee6dd12c3c79a75783a577d3b
2010-08-11  Eric Carlson  <eric.carlson@apple.com>

        Reviewed by Darin Adler.

        Inserting a <source> element should immediately set networkState to NETWORK_NO_SOURCE.
        https://bugs.webkit.org/show_bug.cgi?id=42897

        A <source> element inserted as a child of a media element with a networkState of NETWORK_EMPTY
        should cause the networkState to immediately change to NETWORK_NO_SOURCE.

        * WebCore.xcodeproj/project.pbxproj:
        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::HTMLMediaElement): Remove unused variable m_processingLoad.
        (WebCore::HTMLMediaElement::prepareForLoad): Set m_networkState to NETWORK_NO_SOURCE.
        (WebCore::HTMLMediaElement::loadInternal): Remove unused variable m_processingLoad.
        (WebCore::HTMLMediaElement::selectMediaResource): No need to change m_networkState, it was done in prepareForLoad.
        * html/HTMLMediaElement.h:

        * html/HTMLSourceElement.cpp:
        (WebCore::HTMLSourceElement::insertedIntoTree): Renamed from insertedIntoDocument because we want
        to do this setup whether or not the parent media element is in the document.
        * html/HTMLSourceElement.h:

2010-08-11  Eric Carlson  <eric.carlson@apple.com>

        Reviewed by Darin Adler.

        Inserting a <source> element should immediately set networkState to NETWORK_NO_SOURCE.
        https://bugs.webkit.org/show_bug.cgi?id=42897

        * media/remove-from-document-no-load-expected.txt:
        * media/remove-from-document-no-load.html:
        * media/video-pause-empty-events-expected.txt:
        * media/video-pause-empty-events.html:
        * media/video-source-inserted-expected.txt: Added.
        * media/video-source-inserted.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@65170 268f45cc-cd09-0410-ab3c-d52691b4dbfc
12 files changed:
LayoutTests/ChangeLog
LayoutTests/media/remove-from-document-no-load-expected.txt
LayoutTests/media/remove-from-document-no-load.html
LayoutTests/media/video-pause-empty-events-expected.txt
LayoutTests/media/video-pause-empty-events.html
LayoutTests/media/video-source-inserted-expected.txt [new file with mode: 0644]
LayoutTests/media/video-source-inserted.html [new file with mode: 0644]
WebCore/ChangeLog
WebCore/html/HTMLMediaElement.cpp
WebCore/html/HTMLMediaElement.h
WebCore/html/HTMLSourceElement.cpp
WebCore/html/HTMLSourceElement.h