Title: [140992] trunk/Source/WebCore
Revision
140992
Author
to...@chromium.org
Date
2013-01-28 12:36:12 -0800 (Mon, 28 Jan 2013)

Log Message

Don't use threaded HTML parser for data: URLs
https://bugs.webkit.org/show_bug.cgi?id=108096

Reviewed by Eric Seidel.

data: URLs are currently loaded synchronously. Using the main thread parser for them preserves this behavior.
This fixes fast/dom/HTMLDocument/document-open-return-value.html and probably others.

No new tests because covered by existing tests.

* html/parser/HTMLParserOptions.cpp:
(WebCore::HTMLParserOptions::HTMLParserOptions):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (140991 => 140992)


--- trunk/Source/WebCore/ChangeLog	2013-01-28 20:26:15 UTC (rev 140991)
+++ trunk/Source/WebCore/ChangeLog	2013-01-28 20:36:12 UTC (rev 140992)
@@ -1,5 +1,20 @@
 2013-01-28  Tony Gentilcore  <to...@chromium.org>
 
+        Don't use threaded HTML parser for data: URLs
+        https://bugs.webkit.org/show_bug.cgi?id=108096
+
+        Reviewed by Eric Seidel.
+
+        data: URLs are currently loaded synchronously. Using the main thread parser for them preserves this behavior.
+        This fixes fast/dom/HTMLDocument/document-open-return-value.html and probably others.
+
+        No new tests because covered by existing tests.
+
+        * html/parser/HTMLParserOptions.cpp:
+        (WebCore::HTMLParserOptions::HTMLParserOptions):
+
+2013-01-28  Tony Gentilcore  <to...@chromium.org>
+
         Don't use the threaded HTML parser for _javascript_: URLs
         https://bugs.webkit.org/show_bug.cgi?id=107975
 

Modified: trunk/Source/WebCore/html/parser/HTMLParserOptions.cpp (140991 => 140992)


--- trunk/Source/WebCore/html/parser/HTMLParserOptions.cpp	2013-01-28 20:26:15 UTC (rev 140991)
+++ trunk/Source/WebCore/html/parser/HTMLParserOptions.cpp	2013-01-28 20:36:12 UTC (rev 140992)
@@ -41,7 +41,9 @@
     Settings* settings = document ? document->settings() : 0;
     usePreHTML5ParserQuirks = settings && settings->usePreHTML5ParserQuirks();
 #if ENABLE(THREADED_HTML_PARSER)
-    useThreading = settings && settings->threadedHTMLParser() && !document->url().isBlankURL();
+    // We force the main-thread parser for about:blank, _javascript_: and data: urls for compatibility
+    // with historical synchronous loading/parsing behavior of those schemes.
+    useThreading = settings && settings->threadedHTMLParser() && !document->url().isBlankURL() && !document->url().protocolIsData();
 #else
     useThreading = false;
 #endif
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to