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

Unified Diff: Source/core/html/parser/HTMLParserOptions.cpp

Issue 254343002: Send <iframe srcdoc> to the threaded parser (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed my nub mistake Created 6 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
« no previous file with comments | « Source/core/frame/Settings.in ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/parser/HTMLParserOptions.cpp
diff --git a/Source/core/html/parser/HTMLParserOptions.cpp b/Source/core/html/parser/HTMLParserOptions.cpp
index e9204912baefe7ba19101cec43d20e063247e741..8aabcd127fbdbc2f124e1ecb03e80835c7d23e51 100644
--- a/Source/core/html/parser/HTMLParserOptions.cpp
+++ b/Source/core/html/parser/HTMLParserOptions.cpp
@@ -40,11 +40,17 @@ HTMLParserOptions::HTMLParserOptions(Document* document)
scriptEnabled = frame && frame->script().canExecuteScripts(NotAboutToExecuteScript);
pluginsEnabled = frame && frame->loader().allowPlugins(NotAboutToInstantiatePlugin);
+ // We force the main-thread parser for about:blank and javascript:
+ // (which uses about:blank urls) and data: urls for compatibility
+ // with historical synchronous loading/parsing behavior.
+ // FIXME: Gecko does not load javascript: urls synchronously, why do we?
+ // See LayoutTests/loader/iframe-sync-loads.html
+ // FIXME: threadedHTMLParser() setting should be removed but currently many
+ // webkit_unit_tests depend on parsing being synchronous. crbug.com/366354
+ // FIXME: useThreadedHTMLParserForDataURLs() setting should be removed but
+ // currently many browser_tests depend on data: urls being synchronous! crbug.com/308321
Settings* settings = document ? document->settings() : 0;
- // We force the main-thread parser for about:blank, javascript: and data: urls for compatibility
- // with historical synchronous loading/parsing behavior of those schemes.
- // FIXME: Use isAboutBlankURL() instead of protocolIsAbout() to not include about:srcdoc.
- useThreading = settings && settings->threadedHTMLParser() && !document->url().protocolIsAbout()
+ useThreading = settings && settings->threadedHTMLParser() && !document->url().isAboutBlankURL()
&& (settings->useThreadedHTMLParserForDataURLs() || !document->url().protocolIsData());
}
« no previous file with comments | « Source/core/frame/Settings.in ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698