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

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

Issue 2157893002: Use Document::validBaseElementURL to init preloadscanner (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2743
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 ab6d45994c80bb1bf91ed557395695a189edc746..9631f3b41650d4d59be1e4e47df13a3fee5aa587 100644
--- a/third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.cpp
+++ b/third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.cpp
@@ -613,7 +613,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);
}
}
@@ -690,7 +690,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();
@@ -767,7 +767,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);
}
}
@@ -942,7 +942,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)
@@ -1098,7 +1098,7 @@ void HTMLDocumentParser::evaluateAndPreloadScriptForDocumentWrite(const String&
int currentPreloadCount = document()->loader()->fetcher()->countPreloads();
OwnPtr<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