Changeset 227261 in webkit


Ignore:
Timestamp:
Jan 19, 2018 7:55:15 PM (6 years ago)
Author:
Ryan Haddad
Message:

Unreviewed, rolling out r227235.

The test for this change consistently times out on High
Sierra.

Reverted changeset:

"Support for preconnect Link headers"
https://bugs.webkit.org/show_bug.cgi?id=181657
https://trac.webkit.org/changeset/227235

Location:
trunk
Files:
3 deleted
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r227260 r227261  
     12018-01-19  Ryan Haddad  <ryanhaddad@apple.com>
     2
     3        Unreviewed, rolling out r227235.
     4
     5        The test for this change consistently times out on High
     6        Sierra.
     7
     8        Reverted changeset:
     9
     10        "Support for preconnect Link headers"
     11        https://bugs.webkit.org/show_bug.cgi?id=181657
     12        https://trac.webkit.org/changeset/227235
     13
    1142018-01-19  Andy Estes  <aestes@apple.com>
    215
  • trunk/LayoutTests/platform/ios-simulator/TestExpectations

    r227235 r227261  
    6060webgl/1.0.2/conformance/uniforms/uniform-default-values.html [ Failure ]
    6161
    62 # ios-simulator does not process link headers for subresources
    63 webkit.org/b/181789 http/tests/preconnect/link-header-rel-preconnect-http.html [ Skip ]
    64 
    6562# This test requires Skia, which isn't available on iOS.
    6663webkit.org/b/174079 fast/text/variations/skia-postscript-name.html [ ImageOnlyFailure ]
  • trunk/LayoutTests/platform/win/TestExpectations

    r227235 r227261  
    37873787# preconnect tests are failing on Windows.
    37883788webkit.org/b/177626 fast/dom/HTMLLinkElement/preconnect-support.html  [ Skip ]
    3789 webkit.org/b/177626 http/tests/preconnect/ [ Skip ]
     3789webkit.org/b/177626 http/tests/preconnect/link-rel-preconnect-http.html [ Skip ]
     3790webkit.org/b/177626 http/tests/preconnect/link-rel-preconnect-https.html [ Skip ]
    37903791
    37913792webkit.org/b/177964 fast/text/font-display/block-nofinish.html [ Pass ImageOnlyFailure ]
  • trunk/Source/WebCore/ChangeLog

    r227245 r227261  
     12018-01-19  Ryan Haddad  <ryanhaddad@apple.com>
     2
     3        Unreviewed, rolling out r227235.
     4
     5        The test for this change consistently times out on High
     6        Sierra.
     7
     8        Reverted changeset:
     9
     10        "Support for preconnect Link headers"
     11        https://bugs.webkit.org/show_bug.cgi?id=181657
     12        https://trac.webkit.org/changeset/227235
     13
    1142018-01-19  Youenn Fablet  <youenn@apple.com>
    215
  • trunk/Source/WebCore/loader/LinkLoader.cpp

    r227235 r227261  
    111111        if (equalIgnoringFragmentIdentifier(url, baseURL))
    112112            continue;
    113         preconnectIfNeeded(relAttribute, url, document, header.crossOrigin());
    114113        preloadIfNeeded(relAttribute, url, document, header.as(), header.media(), header.mimeType(), header.crossOrigin(), nullptr);
    115114    }
     
    213212}
    214213
    215 void LinkLoader::preconnectIfNeeded(const LinkRelAttribute& relAttribute, const URL& href, Document& document, const String& crossOrigin)
    216 {
    217     if (!relAttribute.isLinkPreconnect || !href.isValid() || !href.protocolIsInHTTPFamily() || !document.frame())
    218         return;
    219     ASSERT(document.settings().linkPreconnectEnabled());
    220     StoredCredentialsPolicy storageCredentialsPolicy = StoredCredentialsPolicy::Use;
    221     if (equalIgnoringASCIICase(crossOrigin, "anonymous") && document.securityOrigin().canAccess(SecurityOrigin::create(href)))
    222         storageCredentialsPolicy = StoredCredentialsPolicy::DoNotUse;
    223     ASSERT(document.frame()->loader().networkingContext());
    224     platformStrategies()->loaderStrategy()->preconnectTo(*document.frame()->loader().networkingContext(), href, storageCredentialsPolicy, [weakDocument = document.createWeakPtr(), href](ResourceError error) {
    225         if (!weakDocument)
    226             return;
    227 
    228         if (!error.isNull())
    229             weakDocument->addConsoleMessage(MessageSource::Network, MessageLevel::Error, makeString(ASCIILiteral("Failed to preconnect to "), href.string(), ASCIILiteral(". Error: "), error.localizedDescription()));
    230         else
    231             weakDocument->addConsoleMessage(MessageSource::Network, MessageLevel::Info, makeString(ASCIILiteral("Successfuly preconnected to "), href.string()));
    232     });
    233 }
    234 
    235214std::unique_ptr<LinkPreloadResourceClient> LinkLoader::preloadIfNeeded(const LinkRelAttribute& relAttribute, const URL& href, Document& document, const String& as, const String& media, const String& mimeType, const String& crossOriginMode, LinkLoader* loader)
    236215{
     
    281260    }
    282261
    283     preconnectIfNeeded(relAttribute, href, document, crossOrigin);
     262    if (relAttribute.isLinkPreconnect && href.isValid() && href.protocolIsInHTTPFamily() && document.frame()) {
     263        ASSERT(document.settings().linkPreconnectEnabled());
     264        StoredCredentialsPolicy storageCredentialsPolicy = StoredCredentialsPolicy::Use;
     265        if (equalIgnoringASCIICase(crossOrigin, "anonymous") && document.securityOrigin().canAccess(SecurityOrigin::create(href)))
     266            storageCredentialsPolicy = StoredCredentialsPolicy::DoNotUse;
     267        ASSERT(document.frame()->loader().networkingContext());
     268        platformStrategies()->loaderStrategy()->preconnectTo(*document.frame()->loader().networkingContext(), href, storageCredentialsPolicy, [weakDocument = document.createWeakPtr(), href](ResourceError error) {
     269            if (!weakDocument)
     270                return;
     271
     272            if (!error.isNull())
     273                weakDocument->addConsoleMessage(MessageSource::Network, MessageLevel::Error, makeString(ASCIILiteral("Failed to preconnect to "), href.string(), ASCIILiteral(". Error: "), error.localizedDescription()));
     274            else
     275                weakDocument->addConsoleMessage(MessageSource::Network, MessageLevel::Info, makeString(ASCIILiteral("Successfuly preconnected to "), href.string()));
     276        });
     277    }
    284278
    285279    if (m_client.shouldLoadLink()) {
  • trunk/Source/WebCore/loader/LinkLoader.h

    r227235 r227261  
    6565private:
    6666    void notifyFinished(CachedResource&) override;
    67     static void preconnectIfNeeded(const LinkRelAttribute&, const URL& href, Document&, const String& crossOrigin);
    6867    static std::unique_ptr<LinkPreloadResourceClient> preloadIfNeeded(const LinkRelAttribute&, const URL& href, Document&, const String& as, const String& media, const String& type, const String& crossOriginMode, LinkLoader*);
    6968
Note: See TracChangeset for help on using the changeset viewer.