Changeset 224025 in webkit


Ignore:
Timestamp:
Oct 26, 2017 10:45:19 AM (6 years ago)
Author:
Ryan Haddad
Message:

Unreviewed, rolling out r224019.

This change caused API test WebKit.MSEIsPlayingAudio to time
out.

Reverted changeset:

"XMLHttpRequest should not treat file URLs as same origin"
https://bugs.webkit.org/show_bug.cgi?id=178565
https://trac.webkit.org/changeset/224019

Location:
trunk
Files:
6 deleted
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r224024 r224025  
     12017-10-26  Ryan Haddad  <ryanhaddad@apple.com>
     2
     3        Unreviewed, rolling out r224019.
     4
     5        This change caused API test WebKit.MSEIsPlayingAudio to time
     6        out.
     7
     8        Reverted changeset:
     9
     10        "XMLHttpRequest should not treat file URLs as same origin"
     11        https://bugs.webkit.org/show_bug.cgi?id=178565
     12        https://trac.webkit.org/changeset/224019
     13
    1142017-10-26  Ryan Haddad  <ryanhaddad@apple.com>
    215
  • trunk/LayoutTests/fast/xmlhttprequest/xmlhttprequest-nonexistent-file-expected.txt

    r224019 r224025  
    1 CONSOLE MESSAGE: line 64: XMLHttpRequest cannot load nonexistent.html. Cross origin requests are only supported for HTTP.
    2 CONSOLE MESSAGE: line 42: XMLHttpRequest cannot load . Cross origin requests are only supported for HTTP.
     1CONSOLE MESSAGE: line 64: Not allowed to load local resource: nonexistent.html
     2CONSOLE MESSAGE: line 64: XMLHttpRequest cannot load nonexistent.html. Not allowed to request resource
    33
    44Bug 22475: REGRESSION: Async XMLHttpRequest never finishes on nonexistent files anymore
     
    1414ReadyState handler: readyState = 1
    1515ReadyState handler: readyState = 4
    16 Error handler: readyState = 4
    1716
  • trunk/LayoutTests/platform/ios/fast/xmlhttprequest/xmlhttprequest-nonexistent-file-expected.txt

    r224019 r224025  
    1 CONSOLE MESSAGE: line 64: XMLHttpRequest cannot load nonexistent.html. Cross origin requests are only supported for HTTP.
    2 CONSOLE MESSAGE: line 42: XMLHttpRequest cannot load . Cross origin requests are only supported for HTTP.
    31
    42Bug 22475: REGRESSION: Async XMLHttpRequest never finishes on nonexistent files anymore
     
    1412ReadyState handler: readyState = 1
    1513ReadyState handler: readyState = 4
    16 Error handler: readyState = 4
    1714
  • trunk/LayoutTests/platform/wk2/TestExpectations

    r224019 r224025  
    197197fast/events/ondrop-text-html.html
    198198editing/pasteboard/drag-drop-url-with-style.html
    199 fast/xmlhttprequest/xmlhttprequest-access-self-as-blob.html
    200199
    201200# WTR needs an implementation for eventSender.continuousMouseScrollBy
  • trunk/Source/WebCore/ChangeLog

    r224024 r224025  
     12017-10-26  Ryan Haddad  <ryanhaddad@apple.com>
     2
     3        Unreviewed, rolling out r224019.
     4
     5        This change caused API test WebKit.MSEIsPlayingAudio to time
     6        out.
     7
     8        Reverted changeset:
     9
     10        "XMLHttpRequest should not treat file URLs as same origin"
     11        https://bugs.webkit.org/show_bug.cgi?id=178565
     12        https://trac.webkit.org/changeset/224019
     13
    1142017-10-26  Ryan Haddad  <ryanhaddad@apple.com>
    215
  • trunk/Source/WebCore/loader/DocumentThreadableLoader.cpp

    r224024 r224025  
    9595    , m_origin(WTFMove(origin))
    9696    , m_referrer(WTFMove(referrer))
    97     , m_sameOriginRequest(securityOrigin().requestIsSameOrigin(request))
     97    , m_sameOriginRequest(securityOrigin().canRequest(request.url()))
    9898    , m_simpleRequest(true)
    9999    , m_async(blockingBehavior == LoadAsynchronously)
  • trunk/Source/WebCore/page/SecurityOrigin.cpp

    r224019 r224025  
    3232#include "BlobURL.h"
    3333#include "FileSystem.h"
    34 #include "ResourceRequest.h"
    3534#include "URL.h"
    3635#include "SchemeRegistry.h"
     
    318317}
    319318
    320 bool SecurityOrigin::requestIsSameOrigin(const ResourceRequest& request)
    321 {
    322     if (m_universalAccess)
    323         return true;
    324 
    325     if (!canRequest(request.url()))
    326         return false;
    327 
    328     if (request.requester() != ResourceRequest::Requester::XHR)
    329         return true;
    330 
    331     // XHR to a file URL should never be treated as same-origin.
    332     if (request.url().protocolIs("file"))
    333         return false;
    334 
    335     if (auto blobOrigin = getCachedOrigin(request.url()))
    336         return blobOrigin->protocol() != "file";
    337 
    338     return true;
    339 }
    340 
    341319bool SecurityOrigin::canReceiveDragData(const SecurityOrigin& dragInitiator) const
    342320{
  • trunk/Source/WebCore/page/SecurityOrigin.h

    r224019 r224025  
    3434namespace WebCore {
    3535
    36 class ResourceRequest;
    3736class URL;
    3837
     
    150149    bool canRequestGeolocation() const { return !isUnique(); }
    151150    Policy canShowNotifications() const;
    152 
    153     bool requestIsSameOrigin(const ResourceRequest&);
    154151
    155152    // The local SecurityOrigin is the most privileged SecurityOrigin.
Note: See TracChangeset for help on using the changeset viewer.