Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1244)

Unified Diff: Source/core/loader/LinkLoader.cpp

Issue 1157443004: Limit <link rel=preconnect> to the HTTP family (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Moved test Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/fast/dom/HTMLLinkElement/link-preconnect-nonhttp-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/loader/LinkLoader.cpp
diff --git a/Source/core/loader/LinkLoader.cpp b/Source/core/loader/LinkLoader.cpp
index 5fd7b7011aec1e6ecf21dcaeb723d4d1f8c98740..b5b81e5e978d2d73ab55a3f5e4d7cc0c3395d02c 100644
--- a/Source/core/loader/LinkLoader.cpp
+++ b/Source/core/loader/LinkLoader.cpp
@@ -131,7 +131,7 @@ static void dnsPrefetchIfNeeded(const LinkRelAttribute& relAttribute, const KURL
static void preconnectIfNeeded(const LinkRelAttribute& relAttribute, const KURL& href, Document& document, const CrossOriginAttributeValue crossOrigin)
{
- if (relAttribute.isPreconnect() && href.isValid()) {
+ if (relAttribute.isPreconnect() && href.isValid() && href.protocolIsInHTTPFamily()) {
ASSERT(RuntimeEnabledFeatures::linkPreconnectEnabled());
Settings* settings = document.settings();
if (settings && settings->logDnsPrefetchAndPreconnect()) {
« no previous file with comments | « LayoutTests/fast/dom/HTMLLinkElement/link-preconnect-nonhttp-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698