Skip to content
  • eric@webkit.org's avatar
    Clarify some usage of shouldUseThreading vs m_haveBackgroundParser, fixing about:blank parsing · 209109c8
    eric@webkit.org authored
    https://bugs.webkit.org/show_bug.cgi?id=107664
    
    Reviewed by Adam Barth.
    
    The HTMLDocumentParser can be "supposed" to use a background parser
    but not end up ever doing so for blank documents.  It's important
    that we spin the forground parser at least once, so we end up
    actually creating the about:blank document.
    
    shouldUseThreading() means that threading is enabled and we should use it if we can.
    m_haveBackgroundParser means that we actually are already using threading.
    When we add full document.write support this will get a bit trickier still as
    we'll need to be using both the foreground and background parsers.
    
    This fixes about 20 tests in fast/frames and many others outside of fast/frames. :)
    
    * html/parser/HTMLDocumentParser.cpp:
    (WebCore::HTMLDocumentParser::prepareToStopParsing):
    (WebCore::HTMLDocumentParser::resumeParsingAfterYield):
    (WebCore::HTMLDocumentParser::finish):
    (WebCore::HTMLDocumentParser::lineNumber):
    (WebCore::HTMLDocumentParser::textPosition):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140559 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    209109c8