Changeset 227261 in webkit
- Timestamp:
- Jan 19, 2018 7:55:15 PM (6 years ago)
- Location:
- trunk
- Files:
-
- 3 deleted
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r227260 r227261 1 2018-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 1 14 2018-01-19 Andy Estes <aestes@apple.com> 2 15 -
trunk/LayoutTests/platform/ios-simulator/TestExpectations
r227235 r227261 60 60 webgl/1.0.2/conformance/uniforms/uniform-default-values.html [ Failure ] 61 61 62 # ios-simulator does not process link headers for subresources63 webkit.org/b/181789 http/tests/preconnect/link-header-rel-preconnect-http.html [ Skip ]64 65 62 # This test requires Skia, which isn't available on iOS. 66 63 webkit.org/b/174079 fast/text/variations/skia-postscript-name.html [ ImageOnlyFailure ] -
trunk/LayoutTests/platform/win/TestExpectations
r227235 r227261 3787 3787 # preconnect tests are failing on Windows. 3788 3788 webkit.org/b/177626 fast/dom/HTMLLinkElement/preconnect-support.html [ Skip ] 3789 webkit.org/b/177626 http/tests/preconnect/ [ Skip ] 3789 webkit.org/b/177626 http/tests/preconnect/link-rel-preconnect-http.html [ Skip ] 3790 webkit.org/b/177626 http/tests/preconnect/link-rel-preconnect-https.html [ Skip ] 3790 3791 3791 3792 webkit.org/b/177964 fast/text/font-display/block-nofinish.html [ Pass ImageOnlyFailure ] -
trunk/Source/WebCore/ChangeLog
r227245 r227261 1 2018-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 1 14 2018-01-19 Youenn Fablet <youenn@apple.com> 2 15 -
trunk/Source/WebCore/loader/LinkLoader.cpp
r227235 r227261 111 111 if (equalIgnoringFragmentIdentifier(url, baseURL)) 112 112 continue; 113 preconnectIfNeeded(relAttribute, url, document, header.crossOrigin());114 113 preloadIfNeeded(relAttribute, url, document, header.as(), header.media(), header.mimeType(), header.crossOrigin(), nullptr); 115 114 } … … 213 212 } 214 213 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 else231 weakDocument->addConsoleMessage(MessageSource::Network, MessageLevel::Info, makeString(ASCIILiteral("Successfuly preconnected to "), href.string()));232 });233 }234 235 214 std::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) 236 215 { … … 281 260 } 282 261 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 } 284 278 285 279 if (m_client.shouldLoadLink()) { -
trunk/Source/WebCore/loader/LinkLoader.h
r227235 r227261 65 65 private: 66 66 void notifyFinished(CachedResource&) override; 67 static void preconnectIfNeeded(const LinkRelAttribute&, const URL& href, Document&, const String& crossOrigin);68 67 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*); 69 68
Note: See TracChangeset
for help on using the changeset viewer.