Changeset 140992 in webkit


Ignore:
Timestamp:
Jan 28, 2013 12:36:12 PM (11 years ago)
Author:
tonyg@chromium.org
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):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r140986 r140992  
     12013-01-28  Tony Gentilcore  <tonyg@chromium.org>
     2
     3        Don't use threaded HTML parser for data: URLs
     4        https://bugs.webkit.org/show_bug.cgi?id=108096
     5
     6        Reviewed by Eric Seidel.
     7
     8        data: URLs are currently loaded synchronously. Using the main thread parser for them preserves this behavior.
     9        This fixes fast/dom/HTMLDocument/document-open-return-value.html and probably others.
     10
     11        No new tests because covered by existing tests.
     12
     13        * html/parser/HTMLParserOptions.cpp:
     14        (WebCore::HTMLParserOptions::HTMLParserOptions):
     15
    1162013-01-28  Tony Gentilcore  <tonyg@chromium.org>
    217
  • trunk/Source/WebCore/html/parser/HTMLParserOptions.cpp

    r140986 r140992  
    4242    usePreHTML5ParserQuirks = settings && settings->usePreHTML5ParserQuirks();
    4343#if ENABLE(THREADED_HTML_PARSER)
    44     useThreading = settings && settings->threadedHTMLParser() && !document->url().isBlankURL();
     44    // We force the main-thread parser for about:blank, javascript: and data: urls for compatibility
     45    // with historical synchronous loading/parsing behavior of those schemes.
     46    useThreading = settings && settings->threadedHTMLParser() && !document->url().isBlankURL() && !document->url().protocolIsData();
    4547#else
    4648    useThreading = false;
Note: See TracChangeset for help on using the changeset viewer.