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

Unified Diff: Source/core/html/parser/HTMLResourcePreloader.cpp

Issue 1203143002: Do not preload data URIs. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/parser/HTMLResourcePreloader.cpp
diff --git a/Source/core/html/parser/HTMLResourcePreloader.cpp b/Source/core/html/parser/HTMLResourcePreloader.cpp
index 0a59075066c9afd61f0796e9b141ea5a446bf475..ab7ef5f8bb9d010183239312f93d6a7b260e2037 100644
--- a/Source/core/html/parser/HTMLResourcePreloader.cpp
+++ b/Source/core/html/parser/HTMLResourcePreloader.cpp
@@ -77,6 +77,8 @@ void HTMLResourcePreloader::preload(PassOwnPtr<PreloadRequest> preload)
if (!m_document->loader())
return;
FetchRequest request = preload->resourceRequest(m_document);
+ if (preload->resourceType() == Resource::Image && request.url().protocolIsData())
Yoav Weiss 2015/06/25 10:21:30 I wouldn't block that on images only. It makes no
+ return;
if (preload->resourceType() == Resource::Script || preload->resourceType() == Resource::CSSStyleSheet || preload->resourceType() == Resource::ImportResource)
request.setCharset(preload->charset().isEmpty() ? m_document->charset().string() : preload->charset());
request.setForPreload(true);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698