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

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

Issue 2160503002: Use Document::validBaseElementURL to init preloadscanner (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2785
Patch Set: Created 4 years, 5 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/HTMLDocumentParser.cpp
diff --git a/third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.cpp b/third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.cpp
index e666ed6ae596fcf2356a0c32f3e5ef4cfd1071d3..3a471136e979d3327858981dddf361b9cc3f1853 100644
--- a/third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.cpp
+++ b/third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.cpp
@@ -631,7 +631,7 @@ void HTMLDocumentParser::pumpTokenizer()
m_preloadScanner = createPreloadScanner();
m_preloadScanner->appendToEnd(m_input.current());
}
- m_preloadScanner->scanAndPreload(m_preloader.get(), document()->baseElementURL(), nullptr);
+ m_preloadScanner->scanAndPreload(m_preloader.get(), document()->validBaseElementURL(), nullptr);
}
}
@@ -708,7 +708,7 @@ void HTMLDocumentParser::insert(const SegmentedString& source)
if (!m_insertionPreloadScanner)
m_insertionPreloadScanner = createPreloadScanner();
m_insertionPreloadScanner->appendToEnd(source);
- m_insertionPreloadScanner->scanAndPreload(m_preloader.get(), document()->baseElementURL(), nullptr);
+ m_insertionPreloadScanner->scanAndPreload(m_preloader.get(), document()->validBaseElementURL(), nullptr);
}
endIfDelayed();
@@ -789,7 +789,7 @@ void HTMLDocumentParser::append(const String& inputSource)
} else {
m_preloadScanner->appendToEnd(source);
if (isWaitingForScripts())
- m_preloadScanner->scanAndPreload(m_preloader.get(), document()->baseElementURL(), nullptr);
+ m_preloadScanner->scanAndPreload(m_preloader.get(), document()->validBaseElementURL(), nullptr);
}
}
@@ -964,7 +964,7 @@ void HTMLDocumentParser::appendCurrentInputStreamToPreloadScannerAndScan()
{
ASSERT(m_preloadScanner);
m_preloadScanner->appendToEnd(m_input.current());
- m_preloadScanner->scanAndPreload(m_preloader.get(), document()->baseElementURL(), nullptr);
+ m_preloadScanner->scanAndPreload(m_preloader.get(), document()->validBaseElementURL(), nullptr);
}
void HTMLDocumentParser::notifyScriptLoaded(Resource* cachedResource)
@@ -1122,7 +1122,7 @@ void HTMLDocumentParser::evaluateAndPreloadScriptForDocumentWrite(const String&
int currentPreloadCount = document()->loader()->fetcher()->countPreloads();
std::unique_ptr<HTMLPreloadScanner> scanner = createPreloadScanner();
scanner->appendToEnd(SegmentedString(writtenSource));
- scanner->scanAndPreload(m_preloader.get(), document()->baseElementURL(), nullptr);
+ scanner->scanAndPreload(m_preloader.get(), document()->validBaseElementURL(), nullptr);
int numPreloads = document()->loader()->fetcher()->countPreloads() - currentPreloadCount;
TRACE_EVENT_INSTANT2("blink", "HTMLDocumentParser::evaluateAndPreloadScriptForDocumentWrite.data", TRACE_EVENT_SCOPE_THREAD, "numPreloads", numPreloads, "scriptLength", source.length());
« 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