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

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: Added TODO and layout test case 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 | « LayoutTests/http/tests/loading/preload-image-src-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/html/parser/HTMLResourcePreloader.cpp
diff --git a/Source/core/html/parser/HTMLResourcePreloader.cpp b/Source/core/html/parser/HTMLResourcePreloader.cpp
index 0a59075066c9afd61f0796e9b141ea5a446bf475..6813009b94ab34c93a1df8f9794658f24df168c8 100644
--- a/Source/core/html/parser/HTMLResourcePreloader.cpp
+++ b/Source/core/html/parser/HTMLResourcePreloader.cpp
@@ -77,6 +77,10 @@ void HTMLResourcePreloader::preload(PassOwnPtr<PreloadRequest> preload)
if (!m_document->loader())
return;
FetchRequest request = preload->resourceRequest(m_document);
+ // TODO(dgozman): This check should go to HTMLPreloadScanner, but this requires
+ // making Document::completeURLWithOverride logic to be statically accessible.
+ if (request.url().protocolIsData())
+ 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 | « LayoutTests/http/tests/loading/preload-image-src-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698