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

Unified Diff: third_party/WebKit/Source/core/html/parser/HTMLPreloadScanner.cpp

Issue 2685843003: 'data:' may not be used as a document's base URL. (Closed)
Patch Set: Tests. Created 3 years, 10 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 | « third_party/WebKit/Source/core/dom/Document.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/html/parser/HTMLPreloadScanner.cpp
diff --git a/third_party/WebKit/Source/core/html/parser/HTMLPreloadScanner.cpp b/third_party/WebKit/Source/core/html/parser/HTMLPreloadScanner.cpp
index 5a9b143e36769e19e3ea4979c85d03b5183815ef..7236302e033dc536640579bb826da73e88410c4c 100644
--- a/third_party/WebKit/Source/core/html/parser/HTMLPreloadScanner.cpp
+++ b/third_party/WebKit/Source/core/html/parser/HTMLPreloadScanner.cpp
@@ -862,7 +862,8 @@ void TokenPreloadScanner::updatePredictedBaseURL(const Token& token) {
token.getAttributeItem(hrefAttr)) {
KURL url(m_documentURL, stripLeadingAndTrailingHTMLSpaces(
hrefAttribute->value8BitIfNecessary()));
- m_predictedBaseElementURL = url.isValid() ? url.copy() : KURL();
+ m_predictedBaseElementURL =
+ url.isValid() && !url.protocolIsData() ? url.copy() : KURL();
}
}
« no previous file with comments | « third_party/WebKit/Source/core/dom/Document.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698