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

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

Issue 2132283002: Use Document::validBaseElementURL to init preloadscanner (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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 61170c3f92f950b69419e723d5824542fba9798a..34627dcc7fe3a88700b86dd4fc261341fb42d116 100644
--- a/third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.cpp
+++ b/third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.cpp
@@ -618,7 +618,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);
}
}
@@ -695,7 +695,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();
@@ -775,7 +775,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);
}
}
@@ -950,7 +950,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)
@@ -1106,7 +1106,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