Title: [170526] trunk/Source/WebCore
- Revision
- 170526
- Author
- [email protected]
- Date
- 2014-06-27 04:28:20 -0700 (Fri, 27 Jun 2014)
Log Message
[GTK] 8tracks.com triggers annoying pop-up window/installation of "About protocol source plugin" (GStreamer?)
https://bugs.webkit.org/show_bug.cgi?id=133605
Reviewed by Carlos Garcia Campos.
Don't attempt to load blank URLs with the GStreamer media
player. Those URLs trigger the codec installer which is useless in
this scenario. This patch also renames some of the variables of
the ::load method, as suggested by Carlos.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer):
Check video-sink validity before disconnecting its signal handlers.
(WebCore::MediaPlayerPrivateGStreamer::load): Don't load blank
URLs (about:blank).
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase):
Disconnect repaint handler only if it's valid.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (170525 => 170526)
--- trunk/Source/WebCore/ChangeLog 2014-06-27 07:28:49 UTC (rev 170525)
+++ trunk/Source/WebCore/ChangeLog 2014-06-27 11:28:20 UTC (rev 170526)
@@ -1,3 +1,24 @@
+2014-06-27 Philippe Normand <[email protected]>
+
+ [GTK] 8tracks.com triggers annoying pop-up window/installation of "About protocol source plugin" (GStreamer?)
+ https://bugs.webkit.org/show_bug.cgi?id=133605
+
+ Reviewed by Carlos Garcia Campos.
+
+ Don't attempt to load blank URLs with the GStreamer media
+ player. Those URLs trigger the codec installer which is useless in
+ this scenario. This patch also renames some of the variables of
+ the ::load method, as suggested by Carlos.
+
+ * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
+ (WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer):
+ Check video-sink validity before disconnecting its signal handlers.
+ (WebCore::MediaPlayerPrivateGStreamer::load): Don't load blank
+ URLs (about:blank).
+ * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
+ (WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase):
+ Disconnect repaint handler only if it's valid.
+
2014-06-26 Carlos Garcia Campos <[email protected]>
[GTK] Expose getter and setter functions for attributes named type
Modified: trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp (170525 => 170526)
--- trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp 2014-06-27 07:28:49 UTC (rev 170525)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp 2014-06-27 11:28:20 UTC (rev 170526)
@@ -261,31 +261,35 @@
m_playBin.clear();
}
- GRefPtr<GstPad> videoSinkPad = adoptGRef(gst_element_get_static_pad(m_webkitVideoSink.get(), "sink"));
- g_signal_handlers_disconnect_by_func(videoSinkPad.get(), reinterpret_cast<gpointer>(mediaPlayerPrivateVideoSinkCapsChangedCallback), this);
+ if (m_webkitVideoSink) {
+ GRefPtr<GstPad> videoSinkPad = adoptGRef(gst_element_get_static_pad(m_webkitVideoSink.get(), "sink"));
+ g_signal_handlers_disconnect_by_func(videoSinkPad.get(), reinterpret_cast<gpointer>(mediaPlayerPrivateVideoSinkCapsChangedCallback), this);
+ }
}
-void MediaPlayerPrivateGStreamer::load(const String& url)
+void MediaPlayerPrivateGStreamer::load(const String& urlString)
{
if (!initializeGStreamerAndRegisterWebKitElements())
return;
- URL kurl(URL(), url);
- String cleanUrl(url);
+ URL url(URL(), urlString);
+ if (url.isBlankURL())
+ return;
// Clean out everything after file:// url path.
- if (kurl.isLocalFile())
- cleanUrl = cleanUrl.substring(0, kurl.pathEnd());
+ String cleanURL(urlString);
+ if (url.isLocalFile())
+ cleanURL = cleanURL.substring(0, url.pathEnd());
if (!m_playBin)
createGSTPlayBin();
ASSERT(m_playBin);
- m_url = URL(URL(), cleanUrl);
- g_object_set(m_playBin.get(), "uri", cleanUrl.utf8().data(), NULL);
+ m_url = URL(URL(), cleanURL);
+ g_object_set(m_playBin.get(), "uri", cleanURL.utf8().data(), NULL);
- INFO_MEDIA_MESSAGE("Load %s", cleanUrl.utf8().data());
+ INFO_MEDIA_MESSAGE("Load %s", cleanURL.utf8().data());
if (m_preload == MediaPlayer::None) {
LOG_MEDIA_MESSAGE("Delaying load.");
Modified: trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp (170525 => 170526)
--- trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp 2014-06-27 07:28:49 UTC (rev 170525)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp 2014-06-27 11:28:20 UTC (rev 170526)
@@ -100,7 +100,10 @@
MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase()
{
- g_signal_handler_disconnect(m_webkitVideoSink.get(), m_repaintHandler);
+ if (m_repaintHandler) {
+ g_signal_handler_disconnect(m_webkitVideoSink.get(), m_repaintHandler);
+ m_repaintHandler = 0;
+ }
g_mutex_clear(m_bufferMutex);
delete m_bufferMutex;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes