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

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

Issue 1846143003: Propogate loading behavior data from Blink to content/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated comments from self review Created 4 years, 8 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
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 fe0872fcc2737297e383221cde12310d027af7fe..fe87a5092e4fa31b3510e9dc58f6bdcaa287f243 100644
--- a/third_party/WebKit/Source/core/html/parser/HTMLPreloadScanner.cpp
+++ b/third_party/WebKit/Source/core/html/parser/HTMLPreloadScanner.cpp
@@ -551,7 +551,9 @@ static void handleMetaNameAttribute(const Token& token, CachedDocumentParameters
// document.write to insert an external script. These scripts will be flagged
// for evaluation via the DocumentWriteEvaluator, so it also dismisses scripts
// that will likely fail evaluation. These includes scripts that are too long,
-// have looping constructs, or use non-determinism.
+// have looping constructs, or use non-determinism. Note that flagging occurs
+// even when the experiment is off, to ensure fair comparison between experiment
+// and control groups.
bool TokenPreloadScanner::shouldEvaluateForDocumentWrite(const String& source)
{
// The maximum length script source that will be marked for evaluation to
@@ -738,7 +740,7 @@ CachedDocumentParameters::CachedDocumentParameters(Document* document)
ASSERT(isMainThread());
ASSERT(document);
doHtmlPreloadScanning = !document->settings() || document->settings()->doHtmlPreloadScanning();
- doDocumentWritePreloadScanning = doHtmlPreloadScanning && document->frame() && document->frame()->isMainFrame() && RuntimeEnabledFeatures::documentWriteEvaluatorEnabled();
+ doDocumentWritePreloadScanning = doHtmlPreloadScanning && document->frame() && document->frame()->isMainFrame();
defaultViewportMinWidth = document->viewportDefaultMinWidth();
viewportMetaZeroValuesQuirk = document->settings() && document->settings()->viewportMetaZeroValuesQuirk();
viewportMetaEnabled = document->settings() && document->settings()->viewportMetaEnabled();

Powered by Google App Engine
This is Rietveld 408576698