2011-05-18 Alexis Menard <alexis.menard@openbossa.org>, Simon Hausmann <simon...
authorcommit-queue <commit-queue@webkit.org>
Wed, 18 May 2011 21:26:03 +0000 (21:26 +0000)
committerAdemar de Souza Reis Jr <ademar.reis@openbossa.org>
Thu, 19 May 2011 20:44:16 +0000 (17:44 -0300)
commite309ebe85a247ee5a1802181931456d16802afc7
tree87c7fb7e5ef7f133f5ee17ff3c4ae25c4efa10b7
parentfd084a40f9b49b5c037f7812c9d79575ef29a842
2011-05-18  Alexis Menard  <alexis.menard@openbossa.org>, Simon Hausmann  <simon.hausmann@nokia.com>

        Reviewed by Eric Carlson.

        MediaElements fails to load the data in some cases.
        https://bugs.webkit.org/show_bug.cgi?id=60760

        This test creates an hidden video element and make sure the loading works.

        * http/tests/media/media-can-load-when-hidden-expected.txt: Added.
        * http/tests/media/media-can-load-when-hidden.html: Added.
2011-05-18  Alexis Menard  <alexis.menard@openbossa.org>, Simon Hausmann  <simon.hausmann@nokia.com>

        Reviewed by Eric Carlson.

        MediaElements fails to load the data in some cases.
        https://bugs.webkit.org/show_bug.cgi?id=60760

        WebKitWebSourceGStreamer is the interface between WebKit and GStreamer
        that uses the ResourceHandle API to request data and pass it down. For
        our builds it is absolutely essential that we have a NetworkingContext
        available there, in order to get access to the QNetworkAccessManager.
        No access means we basically cannot load the video. The WebSource gains
        access to the NetworkingContext through a WebCore::Frame pointer it has.

        MediaPlayerPrivateGStreamer is responsible for propagating a pointer of
        the WebCore::Frame to the WebKitWebSource in
        mediaPlayerPrivateSourceChangedCallback. In there we used the MediaPlayer's
        frameView() accessor to access the frame. However the frameView() member
        is only set through the render tree's RenderVideo, which is rather unreliable
        given that some sites create "fake" video tags initially that only become
        visible later (or never).

        A more reliable way is to simply use the document of the MediaPlayerClient,
        which is provided at constructor time.

        Test: http/tests/media/media-can-load-when-hidden.html

        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
        (WebCore::MediaPlayerPrivateGStreamer::sourceChanged):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@86790 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/http/tests/media/media-can-load-when-hidden-expected.txt [new file with mode: 0644]
LayoutTests/http/tests/media/media-can-load-when-hidden.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp