Title: [86790] trunk
- Revision
- 86790
- Author
- [email protected]
- Date
- 2011-05-18 14:26:03 -0700 (Wed, 18 May 2011)
Log Message
2011-05-18 Alexis Menard <[email protected]>, Simon Hausmann <[email protected]>
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 <[email protected]>, Simon Hausmann <[email protected]>
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):
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (86789 => 86790)
--- trunk/LayoutTests/ChangeLog 2011-05-18 21:23:28 UTC (rev 86789)
+++ trunk/LayoutTests/ChangeLog 2011-05-18 21:26:03 UTC (rev 86790)
@@ -1,3 +1,15 @@
+2011-05-18 Alexis Menard <[email protected]>, Simon Hausmann <[email protected]>
+
+ 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 Justin Schuh <[email protected]>
Unreviewed.
Added: trunk/LayoutTests/http/tests/media/media-can-load-when-hidden-expected.txt (0 => 86790)
--- trunk/LayoutTests/http/tests/media/media-can-load-when-hidden-expected.txt (rev 0)
+++ trunk/LayoutTests/http/tests/media/media-can-load-when-hidden-expected.txt 2011-05-18 21:26:03 UTC (rev 86790)
@@ -0,0 +1,5 @@
+Test HTMLMediaElement to be sure that the video is getting loaded even if the element is hidden.
+
+EVENT(durationchange)
+END OF TEST
+
Added: trunk/LayoutTests/http/tests/media/media-can-load-when-hidden.html (0 => 86790)
--- trunk/LayoutTests/http/tests/media/media-can-load-when-hidden.html (rev 0)
+++ trunk/LayoutTests/http/tests/media/media-can-load-when-hidden.html 2011-05-18 21:26:03 UTC (rev 86790)
@@ -0,0 +1,27 @@
+<html>
+ <head>
+ <style>
+ video {display:none; background-color: yellow; width: 320px; height: 240px;}
+ </style>
+ <script src=""
+ <script src=""
+ <script>
+ function start()
+ {
+ video = document.getElementsByTagName('video')[0];
+ var mediaFile = findMediaFile("video", "resources/test");
+ video.src = "" + mediaFile;
+ waitForEvent('durationchange', function() { endTest(); });
+ }
+ </script>
+
+ </head>
+ <body _onload_="start()">
+
+ <video controls ></video>
+
+ <p>Test HTMLMediaElement to be sure that the video is getting loaded even if the element
+ is hidden.</p>
+ </body>
+</html>
+
Modified: trunk/Source/WebCore/ChangeLog (86789 => 86790)
--- trunk/Source/WebCore/ChangeLog 2011-05-18 21:23:28 UTC (rev 86789)
+++ trunk/Source/WebCore/ChangeLog 2011-05-18 21:26:03 UTC (rev 86790)
@@ -1,3 +1,33 @@
+2011-05-18 Alexis Menard <[email protected]>, Simon Hausmann <[email protected]>
+
+ 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):
+
2011-05-18 Adrienne Walker <[email protected]>
Reviewed by James Robinson.
Modified: trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp (86789 => 86790)
--- trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp 2011-05-18 21:23:28 UTC (rev 86789)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp 2011-05-18 21:26:03 UTC (rev 86790)
@@ -1012,7 +1012,10 @@
reinterpret_cast<GstObject*>(element.get()));
if (WEBKIT_IS_WEB_SRC(element.get())) {
- Frame* frame = m_player->frameView() ? m_player->frameView()->frame() : 0;
+ Frame* frame = 0;
+ Document* document = m_player->mediaPlayerClient()->mediaPlayerOwningDocument();
+ if (document)
+ frame = document->frame();
if (frame)
webKitWebSrcSetFrame(WEBKIT_WEB_SRC(element.get()), frame);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes