Changeset 219288 in webkit


Ignore:
Timestamp:
Jul 10, 2017 3:13:47 AM (7 years ago)
Author:
commit-queue@webkit.org
Message:

[GTK] http/tests/media/video-redirect.html is failing
https://bugs.webkit.org/show_bug.cgi?id=174260

Patch by Charlie Turner <cturner@igalia.com> 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.

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r219284 r219288  
     12017-07-10  Charlie Turner  <cturner@igalia.com>
     2
     3        [GTK] http/tests/media/video-redirect.html is failing
     4        https://bugs.webkit.org/show_bug.cgi?id=174260
     5
     6        Reviewed by Carlos Garcia Campos.
     7
     8        Make sure we're testing new URLs within the same security origin.
     9
     10        Covered by existing tests.
     11
     12        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
     13        (WebCore::convertToInternalProtocol): Factor out setting our
     14        internal URL schema.
     15        (WebCore::MediaPlayerPrivateGStreamer::setPlaybinURL): Use the
     16        refactored helper.
     17        (WebCore::MediaPlayerPrivateGStreamer::loadNextLocation): Use
     18        refactored helper to ensure both URLs have the same origin.
     19
    1202017-07-08  John Wilander  <wilander@apple.com>
    221
  • trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp

    r219252 r219288  
    211211}
    212212
     213static void convertToInternalProtocol(URL& url)
     214{
     215    if (url.protocolIsInHTTPFamily())
     216        url.setProtocol("webkit+" + url.protocol());
     217}
     218
    213219void MediaPlayerPrivateGStreamer::setPlaybinURL(const URL& url)
    214220{
     
    219225
    220226    m_url = URL(URL(), cleanURLString);
    221 
    222     if (m_url.protocolIsInHTTPFamily())
    223         m_url.setProtocol("webkit+" + url.protocol());
     227    convertToInternalProtocol(m_url);
    224228
    225229    GST_INFO("Load %s", m_url.string().utf8().data());
     
    16691673        URL baseUrl = gst_uri_is_valid(newLocation) ? URL() : m_url;
    16701674        URL newUrl = URL(baseUrl, newLocation);
     1675        convertToInternalProtocol(newUrl);
    16711676
    16721677        RefPtr<SecurityOrigin> securityOrigin = SecurityOrigin::create(m_url);
Note: See TracChangeset for help on using the changeset viewer.