Changeset 86790 in webkit


Ignore:
Timestamp:
May 18, 2011 2:26:03 PM (13 years ago)
Author:
commit-queue@webkit.org
Message:

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):
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r86789 r86790  
     12011-05-18  Alexis Menard  <alexis.menard@openbossa.org>, Simon Hausmann  <simon.hausmann@nokia.com>
     2
     3        Reviewed by Eric Carlson.
     4
     5        MediaElements fails to load the data in some cases.
     6        https://bugs.webkit.org/show_bug.cgi?id=60760
     7
     8        This test creates an hidden video element and make sure the loading works.
     9
     10        * http/tests/media/media-can-load-when-hidden-expected.txt: Added.
     11        * http/tests/media/media-can-load-when-hidden.html: Added.
     12
    1132011-05-18  Justin Schuh  <jschuh@chromium.org>
    214
  • trunk/Source/WebCore/ChangeLog

    r86788 r86790  
     12011-05-18  Alexis Menard  <alexis.menard@openbossa.org>, Simon Hausmann  <simon.hausmann@nokia.com>
     2
     3        Reviewed by Eric Carlson.
     4
     5        MediaElements fails to load the data in some cases.
     6        https://bugs.webkit.org/show_bug.cgi?id=60760
     7
     8        WebKitWebSourceGStreamer is the interface between WebKit and GStreamer
     9        that uses the ResourceHandle API to request data and pass it down. For
     10        our builds it is absolutely essential that we have a NetworkingContext
     11        available there, in order to get access to the QNetworkAccessManager.
     12        No access means we basically cannot load the video. The WebSource gains
     13        access to the NetworkingContext through a WebCore::Frame pointer it has.
     14
     15        MediaPlayerPrivateGStreamer is responsible for propagating a pointer of
     16        the WebCore::Frame to the WebKitWebSource in
     17        mediaPlayerPrivateSourceChangedCallback. In there we used the MediaPlayer's
     18        frameView() accessor to access the frame. However the frameView() member
     19        is only set through the render tree's RenderVideo, which is rather unreliable
     20        given that some sites create "fake" video tags initially that only become
     21        visible later (or never).
     22
     23        A more reliable way is to simply use the document of the MediaPlayerClient,
     24        which is provided at constructor time.
     25
     26        Test: http/tests/media/media-can-load-when-hidden.html
     27
     28        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
     29        (WebCore::MediaPlayerPrivateGStreamer::sourceChanged):
     30
    1312011-05-18  Adrienne Walker  <enne@google.com>
    232
  • trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp

    r86418 r86790  
    10131013
    10141014    if (WEBKIT_IS_WEB_SRC(element.get())) {
    1015         Frame* frame = m_player->frameView() ? m_player->frameView()->frame() : 0;
     1015        Frame* frame = 0;
     1016        Document* document = m_player->mediaPlayerClient()->mediaPlayerOwningDocument();
     1017        if (document)
     1018            frame = document->frame();
    10161019
    10171020        if (frame)
Note: See TracChangeset for help on using the changeset viewer.