WebCore:
authorantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 2 Dec 2007 06:14:18 +0000 (06:14 +0000)
committerantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 2 Dec 2007 06:14:18 +0000 (06:14 +0000)
commit79eb40d3da25201940f63f6c1e26c7ccd9774732
tree766635d6fcef8836a9adbf5df703baffcd43ce4f
parentb0351297c6c4e4ddbd7018fd7757f73c4c019e8a
WebCore:

        Reviewed by Adam.

        - Fix a crash when removing a loading media element from the tree.
        - Follow the spec by invoking pause() when element is removed from the tree instead of unloading.

        Tests: http/tests/media/remove-while-loading.html
               media/remove-from-document.html

        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::removedFromDocument):

LayoutTests:

        Reviewed by Adam.

        Test that removing a media element when it is loading does not crash.
        Test that media is paused when it is removed from the tree.

        * http/tests/media/remove-while-loading-expected.txt: Added.
        * http/tests/media/remove-while-loading.html: Added.
        * media/remove-from-document-expected.txt: Added.
        * media/remove-from-document.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@28312 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/http/tests/media/remove-while-loading-expected.txt [new file with mode: 0644]
LayoutTests/http/tests/media/remove-while-loading.html [new file with mode: 0644]
LayoutTests/media/remove-from-document-expected.txt [new file with mode: 0644]
LayoutTests/media/remove-from-document.html [new file with mode: 0644]
WebCore/ChangeLog
WebCore/html/HTMLMediaElement.cpp