Title: [219288] trunk/Source/WebCore
- Revision
- 219288
- Author
- [email protected]
- Date
- 2017-07-10 03:13:47 -0700 (Mon, 10 Jul 2017)
Log Message
[GTK] http/tests/media/video-redirect.html is failing
https://bugs.webkit.org/show_bug.cgi?id=174260
Patch by Charlie Turner <[email protected]> on 2017-07-10
Reviewed by Carlos Garcia Campos.
Make sure we're testing new URLs within the same security origin.
Covered by existing tests.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::convertToInternalProtocol): Factor out setting our
internal URL schema.
(WebCore::MediaPlayerPrivateGStreamer::setPlaybinURL): Use the
refactored helper.
(WebCore::MediaPlayerPrivateGStreamer::loadNextLocation): Use
refactored helper to ensure both URLs have the same origin.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (219287 => 219288)
--- trunk/Source/WebCore/ChangeLog 2017-07-10 10:04:53 UTC (rev 219287)
+++ trunk/Source/WebCore/ChangeLog 2017-07-10 10:13:47 UTC (rev 219288)
@@ -1,3 +1,22 @@
+2017-07-10 Charlie Turner <[email protected]>
+
+ [GTK] http/tests/media/video-redirect.html is failing
+ https://bugs.webkit.org/show_bug.cgi?id=174260
+
+ Reviewed by Carlos Garcia Campos.
+
+ Make sure we're testing new URLs within the same security origin.
+
+ Covered by existing tests.
+
+ * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
+ (WebCore::convertToInternalProtocol): Factor out setting our
+ internal URL schema.
+ (WebCore::MediaPlayerPrivateGStreamer::setPlaybinURL): Use the
+ refactored helper.
+ (WebCore::MediaPlayerPrivateGStreamer::loadNextLocation): Use
+ refactored helper to ensure both URLs have the same origin.
+
2017-07-08 John Wilander <[email protected]>
Resource Load Statistics: User interaction should always go to top document
Modified: trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp (219287 => 219288)
--- trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp 2017-07-10 10:04:53 UTC (rev 219287)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp 2017-07-10 10:13:47 UTC (rev 219288)
@@ -210,6 +210,12 @@
}
}
+static void convertToInternalProtocol(URL& url)
+{
+ if (url.protocolIsInHTTPFamily())
+ url.setProtocol("webkit+" + url.protocol());
+}
+
void MediaPlayerPrivateGStreamer::setPlaybinURL(const URL& url)
{
// Clean out everything after file:// url path.
@@ -218,10 +224,8 @@
cleanURLString = cleanURLString.substring(0, url.pathEnd());
m_url = URL(URL(), cleanURLString);
+ convertToInternalProtocol(m_url);
- if (m_url.protocolIsInHTTPFamily())
- m_url.setProtocol("webkit+" + url.protocol());
-
GST_INFO("Load %s", m_url.string().utf8().data());
g_object_set(m_pipeline.get(), "uri", m_url.string().utf8().data(), nullptr);
}
@@ -1668,6 +1672,7 @@
// append the value of new-location to it.
URL baseUrl = gst_uri_is_valid(newLocation) ? URL() : m_url;
URL newUrl = URL(baseUrl, newLocation);
+ convertToInternalProtocol(newUrl);
RefPtr<SecurityOrigin> securityOrigin = SecurityOrigin::create(m_url);
if (securityOrigin->canRequest(newUrl)) {
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes