<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[162258] trunk/Source/WebCore</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/162258">162258</a></dd>
<dt>Author</dt> <dd>andersca@apple.com</dd>
<dt>Date</dt> <dd>2014-01-18 10:25:30 -0800 (Sat, 18 Jan 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Remove the remaining threaded parser code
https://bugs.webkit.org/show_bug.cgi?id=127224

Reviewed by Andreas Kling.

* dom/Document.cpp:
(WebCore::Document::decrementActiveParserCount):
* html/parser/AtomicHTMLToken.h:
* html/parser/HTMLDocumentParser.cpp:
(WebCore::HTMLDocumentParser::HTMLDocumentParser):
(WebCore::HTMLDocumentParser::detach):
(WebCore::HTMLDocumentParser::stopParsing):
(WebCore::HTMLDocumentParser::prepareToStopParsing):
(WebCore::HTMLDocumentParser::resumeParsingAfterYield):
(WebCore::HTMLDocumentParser::forcePlaintextForTextDocument):
(WebCore::HTMLDocumentParser::insert):
(WebCore::HTMLDocumentParser::append):
(WebCore::HTMLDocumentParser::end):
(WebCore::HTMLDocumentParser::finish):
(WebCore::HTMLDocumentParser::textPosition):
(WebCore::HTMLDocumentParser::resumeParsingAfterScriptExecution):
* html/parser/HTMLDocumentParser.h:
* html/parser/HTMLParserIdioms.cpp:
* html/parser/HTMLParserIdioms.h:
* html/parser/HTMLTokenizer.cpp:
* html/parser/HTMLTokenizer.h:
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::isLoading):
(WebCore::DocumentLoader::checkLoadComplete):
* page/Settings.in:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoredomDocumentcpp">trunk/Source/WebCore/dom/Document.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlparserAtomicHTMLTokenh">trunk/Source/WebCore/html/parser/AtomicHTMLToken.h</a></li>
<li><a href="#trunkSourceWebCorehtmlparserHTMLDocumentParsercpp">trunk/Source/WebCore/html/parser/HTMLDocumentParser.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlparserHTMLDocumentParserh">trunk/Source/WebCore/html/parser/HTMLDocumentParser.h</a></li>
<li><a href="#trunkSourceWebCorehtmlparserHTMLParserIdiomscpp">trunk/Source/WebCore/html/parser/HTMLParserIdioms.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlparserHTMLParserIdiomsh">trunk/Source/WebCore/html/parser/HTMLParserIdioms.h</a></li>
<li><a href="#trunkSourceWebCorehtmlparserHTMLTokenizercpp">trunk/Source/WebCore/html/parser/HTMLTokenizer.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlparserHTMLTokenizerh">trunk/Source/WebCore/html/parser/HTMLTokenizer.h</a></li>
<li><a href="#trunkSourceWebCoreloaderDocumentLoadercpp">trunk/Source/WebCore/loader/DocumentLoader.cpp</a></li>
<li><a href="#trunkSourceWebCorepageSettingsin">trunk/Source/WebCore/page/Settings.in</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (162257 => 162258)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-01-18 18:06:03 UTC (rev 162257)
+++ trunk/Source/WebCore/ChangeLog        2014-01-18 18:25:30 UTC (rev 162258)
</span><span class="lines">@@ -1,5 +1,38 @@
</span><span class="cx"> 2014-01-18  Anders Carlsson  &lt;andersca@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        Remove the remaining threaded parser code
+        https://bugs.webkit.org/show_bug.cgi?id=127224
+
+        Reviewed by Andreas Kling.
+
+        * dom/Document.cpp:
+        (WebCore::Document::decrementActiveParserCount):
+        * html/parser/AtomicHTMLToken.h:
+        * html/parser/HTMLDocumentParser.cpp:
+        (WebCore::HTMLDocumentParser::HTMLDocumentParser):
+        (WebCore::HTMLDocumentParser::detach):
+        (WebCore::HTMLDocumentParser::stopParsing):
+        (WebCore::HTMLDocumentParser::prepareToStopParsing):
+        (WebCore::HTMLDocumentParser::resumeParsingAfterYield):
+        (WebCore::HTMLDocumentParser::forcePlaintextForTextDocument):
+        (WebCore::HTMLDocumentParser::insert):
+        (WebCore::HTMLDocumentParser::append):
+        (WebCore::HTMLDocumentParser::end):
+        (WebCore::HTMLDocumentParser::finish):
+        (WebCore::HTMLDocumentParser::textPosition):
+        (WebCore::HTMLDocumentParser::resumeParsingAfterScriptExecution):
+        * html/parser/HTMLDocumentParser.h:
+        * html/parser/HTMLParserIdioms.cpp:
+        * html/parser/HTMLParserIdioms.h:
+        * html/parser/HTMLTokenizer.cpp:
+        * html/parser/HTMLTokenizer.h:
+        * loader/DocumentLoader.cpp:
+        (WebCore::DocumentLoader::isLoading):
+        (WebCore::DocumentLoader::checkLoadComplete):
+        * page/Settings.in:
+
+2014-01-18  Anders Carlsson  &lt;andersca@apple.com&gt;
+
</ins><span class="cx">         Remove threaded parser code from the preload scanners
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=127222
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoredomDocumentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Document.cpp (162257 => 162258)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Document.cpp        2014-01-18 18:06:03 UTC (rev 162257)
+++ trunk/Source/WebCore/dom/Document.cpp        2014-01-18 18:25:30 UTC (rev 162258)
</span><span class="lines">@@ -5853,12 +5853,10 @@
</span><span class="cx">     --m_activeParserCount;
</span><span class="cx">     if (!frame())
</span><span class="cx">         return;
</span><del>-    // FIXME: This should always be enabled, but it seems to cause
-    // http/tests/security/feed-urls-from-remote.html to timeout on Mac WK1
-    // see http://webkit.org/b/110554 and http://webkit.org/b/110401
-#if ENABLE(THREADED_HTML_PARSER)
-    loader()-&gt;checkLoadComplete();
-#endif
</del><ins>+
+    // FIXME: We should call loader()-&gt;checkLoadComplete() as well here,
+    // but it seems to cause http/tests/security/feed-urls-from-remote.html
+    // to timeout on Mac WK1; see http://webkit.org/b/110554 and http://webkit.org/b/110401.
</ins><span class="cx">     frame()-&gt;loader().checkLoadComplete();
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlparserAtomicHTMLTokenh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/parser/AtomicHTMLToken.h (162257 => 162258)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/parser/AtomicHTMLToken.h        2014-01-18 18:06:03 UTC (rev 162257)
+++ trunk/Source/WebCore/html/parser/AtomicHTMLToken.h        2014-01-18 18:25:30 UTC (rev 162258)
</span><span class="lines">@@ -152,59 +152,6 @@
</span><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-#if ENABLE(THREADED_HTML_PARSER)
-
-    explicit AtomicHTMLToken(const CompactHTMLToken&amp; token)
-        : m_type(token.type())
-    {
-        switch (m_type) {
-        case HTMLToken::Uninitialized:
-            ASSERT_NOT_REACHED();
-            break;
-        case HTMLToken::DOCTYPE:
-            m_name = token.data().asString();
-            m_doctypeData = adoptPtr(new DoctypeData());
-            m_doctypeData-&gt;m_hasPublicIdentifier = true;
-            append(m_doctypeData-&gt;m_publicIdentifier, token.publicIdentifier().asString());
-            m_doctypeData-&gt;m_hasSystemIdentifier = true;
-            append(m_doctypeData-&gt;m_systemIdentifier, token.systemIdentifier());
-            m_doctypeData-&gt;m_forceQuirks = token.doctypeForcesQuirks();
-            break;
-        case HTMLToken::EndOfFile:
-            break;
-        case HTMLToken::StartTag:
-            m_attributes.reserveInitialCapacity(token.attributes().size());
-            for (Vector&lt;CompactHTMLToken::Attribute&gt;::const_iterator it = token.attributes().begin(); it != token.attributes().end(); ++it) {
-                QualifiedName name(nullAtom, it-&gt;name.asString(), nullAtom);
-                // FIXME: This is N^2 for the number of attributes.
-                if (!findAttributeInVector(m_attributes, name))
-                    m_attributes.append(Attribute(name, it-&gt;value));
-            }
-            // Fall through!
-        case HTMLToken::EndTag:
-            m_selfClosing = token.selfClosing();
-            m_name = token.data().asString();
-            break;
-        case HTMLToken::Comment:
-            m_data = token.data().asString();
-            break;
-        case HTMLToken::Character: {
-            const String&amp; string = token.data().asString();
-            m_externalCharacters = string.characters();
-            m_externalCharactersLength = string.length();
-            m_isAll8BitData = token.isAll8BitData();
-            // FIXME: We would like a stronger ASSERT here:
-            // ASSERT(string.is8Bit() == token.isAll8BitData());
-            // but currently that fires, likely due to bugs in HTMLTokenizer
-            // not setting isAll8BitData in all the times it could.
-            ASSERT(!token.isAll8BitData() || string.is8Bit());
-            break;
-        }
-        }
-    }
-
-#endif
-
</del><span class="cx">     explicit AtomicHTMLToken(HTMLToken::Type type)
</span><span class="cx">         : m_type(type)
</span><span class="cx">         , m_externalCharacters(0)
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlparserHTMLDocumentParsercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/parser/HTMLDocumentParser.cpp (162257 => 162258)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/parser/HTMLDocumentParser.cpp        2014-01-18 18:06:03 UTC (rev 162257)
+++ trunk/Source/WebCore/html/parser/HTMLDocumentParser.cpp        2014-01-18 18:25:30 UTC (rev 162258)
</span><span class="lines">@@ -76,9 +76,6 @@
</span><span class="cx">     , m_treeBuilder(HTMLTreeBuilder::create(*this, document, parserContentPolicy(), m_options))
</span><span class="cx">     , m_parserScheduler(HTMLParserScheduler::create(*this))
</span><span class="cx">     , m_xssAuditorDelegate(document)
</span><del>-#if ENABLE(THREADED_HTML_PARSER)
-    , m_weakFactory(this)
-#endif
</del><span class="cx">     , m_preloader(adoptPtr(new HTMLResourcePreloader(document)))
</span><span class="cx">     , m_endWasDelayed(false)
</span><span class="cx">     , m_haveBackgroundParser(false)
</span><span class="lines">@@ -97,9 +94,6 @@
</span><span class="cx">     , m_tokenizer(HTMLTokenizer::create(m_options))
</span><span class="cx">     , m_treeBuilder(HTMLTreeBuilder::create(*this, fragment, contextElement, this-&gt;parserContentPolicy(), m_options))
</span><span class="cx">     , m_xssAuditorDelegate(fragment.document())
</span><del>-#if ENABLE(THREADED_HTML_PARSER)
-    , m_weakFactory(this)
-#endif
</del><span class="cx">     , m_endWasDelayed(false)
</span><span class="cx">     , m_haveBackgroundParser(false)
</span><span class="cx">     , m_pumpSessionNestingLevel(0)
</span><span class="lines">@@ -120,11 +114,8 @@
</span><span class="cx"> 
</span><span class="cx"> void HTMLDocumentParser::detach()
</span><span class="cx"> {
</span><del>-#if ENABLE(THREADED_HTML_PARSER)
-    if (m_haveBackgroundParser)
-        stopBackgroundParser();
-#endif
</del><span class="cx">     DocumentParser::detach();
</span><ins>+
</ins><span class="cx">     if (m_scriptRunner)
</span><span class="cx">         m_scriptRunner-&gt;detach();
</span><span class="cx">     m_treeBuilder-&gt;detach();
</span><span class="lines">@@ -139,10 +130,6 @@
</span><span class="cx"> {
</span><span class="cx">     DocumentParser::stopParsing();
</span><span class="cx">     m_parserScheduler.clear(); // Deleting the scheduler will clear any timers.
</span><del>-#if ENABLE(THREADED_HTML_PARSER)
-    if (m_haveBackgroundParser)
-        stopBackgroundParser();
-#endif
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> // This kicks off &quot;Once the user agent stops parsing&quot; as described by:
</span><span class="lines">@@ -159,14 +146,7 @@
</span><span class="cx"> 
</span><span class="cx">     // NOTE: This pump should only ever emit buffered character tokens,
</span><span class="cx">     // so ForceSynchronous vs. AllowYield should be meaningless.
</span><del>-#if ENABLE(THREADED_HTML_PARSER)
-    if (m_tokenizer) {
-        ASSERT(!m_haveBackgroundParser);
-        pumpTokenizerIfPossible(ForceSynchronous);
-    }
-#else
</del><span class="cx">     pumpTokenizerIfPossible(ForceSynchronous);
</span><del>-#endif
</del><span class="cx"> 
</span><span class="cx">     if (isStopped())
</span><span class="cx">         return;
</span><span class="lines">@@ -221,13 +201,6 @@
</span><span class="cx">     // but we need to ensure it isn't deleted yet.
</span><span class="cx">     Ref&lt;HTMLDocumentParser&gt; protect(*this);
</span><span class="cx"> 
</span><del>-#if ENABLE(THREADED_HTML_PARSER)
-    if (m_haveBackgroundParser) {
-        pumpPendingSpeculations();
-        return;
-    }
-#endif
-
</del><span class="cx">     // We should never be here unless we can pump immediately.  Call pumpTokenizer()
</span><span class="cx">     // directly so that ASSERTS will fire if we're wrong.
</span><span class="cx">     pumpTokenizer(AllowYield);
</span><span class="lines">@@ -282,198 +255,9 @@
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-#if ENABLE(THREADED_HTML_PARSER)
-
-void HTMLDocumentParser::didReceiveParsedChunkFromBackgroundParser(OwnPtr&lt;ParsedChunk&gt; chunk)
-{
-    if (isWaitingForScripts() || !m_speculations.isEmpty()) {
-        m_preloader-&gt;takeAndPreload(chunk-&gt;preloads);
-        m_speculations.append(chunk);
-        return;
-    }
-
-    // processParsedChunkFromBackgroundParser can cause this parser to be detached from the Document,
-    // but we need to ensure it isn't deleted yet.
-    Ref&lt;HTMLDocumentParser&gt; protect(*this);
-
-    InspectorInstrumentationCookie cookie = InspectorInstrumentation::willWriteHTML(document(), textPosition().m_line.zeroBasedInt());
-
-    ASSERT(m_speculations.isEmpty());
-    chunk-&gt;preloads.clear(); // We don't need to preload because we're going to parse immediately.
-    processParsedChunkFromBackgroundParser(chunk);
-
-    InspectorInstrumentation::didWriteHTML(cookie, textPosition().m_line.zeroBasedInt());
-}
-
-void HTMLDocumentParser::validateSpeculations(OwnPtr&lt;ParsedChunk&gt; chunk)
-{
-    ASSERT(chunk);
-    if (isWaitingForScripts()) {
-        // We're waiting on a network script, just save the chunk, we'll get
-        // a second validateSpeculations call after the script completes.
-        // This call should have been made immediately after runScriptsForPausedTreeBuilder
-        // which may have started a network load and left us waiting.
-        ASSERT(!m_lastChunkBeforeScript);
-        m_lastChunkBeforeScript = chunk;
-        return;
-    }
-
-    ASSERT(!m_lastChunkBeforeScript);
-    OwnPtr&lt;HTMLTokenizer&gt; tokenizer = m_tokenizer.release();
-    OwnPtr&lt;HTMLToken&gt; token = m_token.release();
-
-    if (!tokenizer) {
-        // There must not have been any changes to the HTMLTokenizer state on
-        // the main thread, which means the speculation buffer is correct.
-        return;
-    }
-
-    // Currently we're only smart enough to reuse the speculation buffer if the tokenizer
-    // both starts and ends in the DataState. That state is simplest because the HTMLToken
-    // is always in the Uninitialized state. We should consider whether we can reuse the
-    // speculation buffer in other states, but we'd likely need to do something more
-    // sophisticated with the HTMLToken.
-    if (chunk-&gt;tokenizerState == HTMLTokenizer::DataState
-        &amp;&amp; tokenizer-&gt;state() == HTMLTokenizer::DataState
-        &amp;&amp; m_input.current().isEmpty()
-        &amp;&amp; chunk-&gt;treeBuilderState == HTMLTreeBuilderSimulator::stateFor(m_treeBuilder.get())) {
-        ASSERT(token-&gt;isUninitialized());
-        return;
-    }
-
-    discardSpeculationsAndResumeFrom(chunk, token.release(), tokenizer.release());
-}
-
-void HTMLDocumentParser::discardSpeculationsAndResumeFrom(OwnPtr&lt;ParsedChunk&gt; lastChunkBeforeScript, OwnPtr&lt;HTMLToken&gt; token, OwnPtr&lt;HTMLTokenizer&gt; tokenizer)
-{
-    m_weakFactory.revokeAll();
-    m_speculations.clear();
-
-    OwnPtr&lt;BackgroundHTMLParser::Checkpoint&gt; checkpoint = adoptPtr(new BackgroundHTMLParser::Checkpoint);
-    checkpoint-&gt;parser = m_weakFactory.createWeakPtr();
-    checkpoint-&gt;token = token;
-    checkpoint-&gt;tokenizer = tokenizer;
-    checkpoint-&gt;treeBuilderState = HTMLTreeBuilderSimulator::stateFor(m_treeBuilder.get());
-    checkpoint-&gt;inputCheckpoint = lastChunkBeforeScript-&gt;inputCheckpoint;
-    checkpoint-&gt;preloadScannerCheckpoint = lastChunkBeforeScript-&gt;preloadScannerCheckpoint;
-    checkpoint-&gt;unparsedInput = m_input.current().toString().isolatedCopy();
-    m_input.current().clear(); // FIXME: This should be passed in instead of cleared.
-
-    ASSERT(checkpoint-&gt;unparsedInput.isSafeToSendToAnotherThread());
-    HTMLParserThread::shared()-&gt;postTask(bind(&amp;BackgroundHTMLParser::resumeFrom, m_backgroundParser, checkpoint.release()));
-}
-
-void HTMLDocumentParser::processParsedChunkFromBackgroundParser(OwnPtr&lt;ParsedChunk&gt; popChunk)
-{
-    // ASSERT that this object is both attached to the Document and protected.
-    ASSERT(refCount() &gt;= 2);
-    ASSERT(shouldUseThreading());
-    ASSERT(!m_tokenizer);
-    ASSERT(!m_token);
-    ASSERT(!m_lastChunkBeforeScript);
-
-    ActiveParserSession session(contextForParsingSession());
-    OwnPtr&lt;ParsedChunk&gt; chunk(popChunk);
-    OwnPtr&lt;CompactHTMLTokenStream&gt; tokens = chunk-&gt;tokens.release();
-
-    HTMLParserThread::shared()-&gt;postTask(bind(&amp;BackgroundHTMLParser::startedChunkWithCheckpoint, m_backgroundParser, chunk-&gt;inputCheckpoint));
-
-    for (XSSInfoStream::const_iterator it = chunk-&gt;xssInfos.begin(); it != chunk-&gt;xssInfos.end(); ++it) {
-        m_textPosition = (*it)-&gt;m_textPosition;
-        m_xssAuditorDelegate.didBlockScript(**it); 
-        if (isStopped())
-            break;
-    }
-
-    for (Vector&lt;CompactHTMLToken&gt;::const_iterator it = tokens-&gt;begin(); it != tokens-&gt;end(); ++it) {
-        ASSERT(!isWaitingForScripts());
-
-        if (!isParsingFragment()
-            &amp;&amp; document()-&gt;frame() &amp;&amp; document()-&gt;frame()-&gt;navigationScheduler().locationChangePending()) {
-
-            // To match main-thread parser behavior (which never checks locationChangePending on the EOF path)
-            // we peek to see if this chunk has an EOF and process it anyway.
-            if (tokens-&gt;last().type() == HTMLToken::EndOfFile) {
-                ASSERT(m_speculations.isEmpty());
-                prepareToStopParsing();
-            }
-            break;
-        }
-
-        m_textPosition = it-&gt;textPosition();
-
-        constructTreeFromCompactHTMLToken(*it);
-
-        if (isStopped())
-            break;
-
-        if (isWaitingForScripts()) {
-            ASSERT(it + 1 == tokens-&gt;end()); // The &lt;/script&gt; is assumed to be the last token of this bunch.
-            runScriptsForPausedTreeBuilder();
-            validateSpeculations(chunk.release());
-            break;
-        }
-
-        if (it-&gt;type() == HTMLToken::EndOfFile) {
-            ASSERT(it + 1 == tokens-&gt;end()); // The EOF is assumed to be the last token of this bunch.
-            ASSERT(m_speculations.isEmpty());
-            prepareToStopParsing();
-            break;
-        }
-
-        ASSERT(!m_tokenizer);
-        ASSERT(!m_token);
-    }
-}
-
-void HTMLDocumentParser::pumpPendingSpeculations()
-{
-    // FIXME: Share this constant with the parser scheduler.
-    const double parserTimeLimit = 0.500;
-
-    // ASSERT that this object is both attached to the Document and protected.
-    ASSERT(refCount() &gt;= 2);
-    // If this assert fails, you need to call validateSpeculations to make sure
-    // m_tokenizer and m_token don't have state that invalidates m_speculations.
-    ASSERT(!m_tokenizer);
-    ASSERT(!m_token);
-    ASSERT(!m_lastChunkBeforeScript);
-
-    // FIXME: Pass in current input length.
-    InspectorInstrumentationCookie cookie = InspectorInstrumentation::willWriteHTML(document(), textPosition().m_line.zeroBasedInt());
-
-    double startTime = monotonicallyIncreasingTime();
-
-    while (!m_speculations.isEmpty()) {
-        processParsedChunkFromBackgroundParser(m_speculations.takeFirst());
-
-        if (isWaitingForScripts() || isStopped())
-            break;
-
-        if (monotonicallyIncreasingTime() - startTime &gt; parserTimeLimit &amp;&amp; !m_speculations.isEmpty()) {
-            m_parserScheduler-&gt;scheduleForResume();
-            break;
-        }
-    }
-
-    InspectorInstrumentation::didWriteHTML(cookie, textPosition().m_line.zeroBasedInt());
-}
-
-#endif // ENABLE(THREADED_HTML_PARSER)
-
</del><span class="cx"> void HTMLDocumentParser::forcePlaintextForTextDocument()
</span><span class="cx"> {
</span><del>-#if ENABLE(THREADED_HTML_PARSER)
-    if (shouldUseThreading()) {
-        // This method is called before any data is appended, so we have to start
-        // the background parser ourselves.
-        if (!m_haveBackgroundParser)
-            startBackgroundParser();
-
-        HTMLParserThread::shared()-&gt;postTask(bind(&amp;BackgroundHTMLParser::forcePlaintextForTextDocument, m_backgroundParser));
-    } else
-#endif
-        m_tokenizer-&gt;setState(HTMLTokenizer::PLAINTEXTState);
</del><ins>+    m_tokenizer-&gt;setState(HTMLTokenizer::PLAINTEXTState);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> Document* HTMLDocumentParser::contextForParsingSession()
</span><span class="lines">@@ -573,16 +357,6 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-#if ENABLE(THREADED_HTML_PARSER)
-
-void HTMLDocumentParser::constructTreeFromCompactHTMLToken(const CompactHTMLToken&amp; compactToken)
-{
-    AtomicHTMLToken token(compactToken);
-    m_treeBuilder-&gt;constructTree(&amp;token);
-}
-
-#endif
-
</del><span class="cx"> bool HTMLDocumentParser::hasInsertionPoint()
</span><span class="cx"> {
</span><span class="cx">     // FIXME: The wasCreatedByScript() branch here might not be fully correct.
</span><span class="lines">@@ -602,15 +376,6 @@
</span><span class="cx">     // but we need to ensure it isn't deleted yet.
</span><span class="cx">     Ref&lt;HTMLDocumentParser&gt; protect(*this);
</span><span class="cx"> 
</span><del>-#if ENABLE(THREADED_HTML_PARSER)
-    if (!m_tokenizer) {
-        ASSERT(!inPumpSession());
-        ASSERT(m_haveBackgroundParser || wasCreatedByScript());
-        m_token = adoptPtr(new HTMLToken);
-        m_tokenizer = HTMLTokenizer::create(m_options);
-    }
-#endif
-
</del><span class="cx">     SegmentedString excludedLineNumberSource(source);
</span><span class="cx">     excludedLineNumberSource.setExcludeLineNumbers();
</span><span class="cx">     m_input.insertAtCurrentInsertionPoint(excludedLineNumberSource);
</span><span class="lines">@@ -629,63 +394,11 @@
</span><span class="cx">     endIfDelayed();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-#if ENABLE(THREADED_HTML_PARSER)
-
-void HTMLDocumentParser::startBackgroundParser()
-{
-    ASSERT(shouldUseThreading());
-    ASSERT(!m_haveBackgroundParser);
-    m_haveBackgroundParser = true;
-
-    HTMLIdentifier::init();
-
-    RefPtr&lt;WeakReference&lt;BackgroundHTMLParser&gt;&gt; reference = WeakReference&lt;BackgroundHTMLParser&gt;::createUnbound();
-    m_backgroundParser = WeakPtr&lt;BackgroundHTMLParser&gt;(reference);
-
-    OwnPtr&lt;BackgroundHTMLParser::Configuration&gt; config = adoptPtr(new BackgroundHTMLParser::Configuration);
-    config-&gt;options = m_options;
-    config-&gt;parser = m_weakFactory.createWeakPtr();
-    config-&gt;xssAuditor = adoptPtr(new XSSAuditor);
-    config-&gt;xssAuditor-&gt;init(document(), &amp;m_xssAuditorDelegate);
-    config-&gt;preloadScanner = adoptPtr(new TokenPreloadScanner(document()-&gt;url().copy()));
-
-    ASSERT(config-&gt;xssAuditor-&gt;isSafeToSendToAnotherThread());
-    ASSERT(config-&gt;preloadScanner-&gt;isSafeToSendToAnotherThread());
-    HTMLParserThread::shared()-&gt;postTask(bind(&amp;BackgroundHTMLParser::create, reference.release(), config.release()));
-}
-
-void HTMLDocumentParser::stopBackgroundParser()
-{
-    ASSERT(shouldUseThreading());
-    ASSERT(m_haveBackgroundParser);
-    m_haveBackgroundParser = false;
-
-    HTMLParserThread::shared()-&gt;postTask(bind(&amp;BackgroundHTMLParser::stop, m_backgroundParser));
-    m_weakFactory.revokeAll();
-}
-
-#endif
-
</del><span class="cx"> void HTMLDocumentParser::append(PassRefPtr&lt;StringImpl&gt; inputSource)
</span><span class="cx"> {
</span><span class="cx">     if (isStopped())
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-#if ENABLE(THREADED_HTML_PARSER)
-    if (shouldUseThreading()) {
-        if (!m_haveBackgroundParser)
-            startBackgroundParser();
-
-        ASSERT(inputSource-&gt;hasOneRef());
-        Closure closure = bind(&amp;BackgroundHTMLParser::append, m_backgroundParser, String(inputSource));
-        // NOTE: Important that the String temporary is destroyed before we post the task
-        // otherwise the String could call deref() on a StringImpl now owned by the background parser.
-        // We would like to ASSERT(closure.arg3()-&gt;hasOneRef()) but sadly the args are private.
-        HTMLParserThread::shared()-&gt;postTask(closure);
-        return;
-    }
-#endif
-
</del><span class="cx">     // pumpTokenizer can cause this parser to be detached from the Document,
</span><span class="cx">     // but we need to ensure it isn't deleted yet.
</span><span class="cx">     Ref&lt;HTMLDocumentParser&gt; protect(*this);
</span><span class="lines">@@ -722,11 +435,6 @@
</span><span class="cx">     ASSERT(!isDetached());
</span><span class="cx">     ASSERT(!isScheduledForResume());
</span><span class="cx"> 
</span><del>-#if ENABLE(THREADED_HTML_PARSER)
-    if (m_haveBackgroundParser)
-        stopBackgroundParser();
-#endif
-
</del><span class="cx">     // Informs the the rest of WebCore that parsing is really finished (and deletes this).
</span><span class="cx">     m_treeBuilder-&gt;finished();
</span><span class="cx"> }
</span><span class="lines">@@ -773,27 +481,6 @@
</span><span class="cx">     // makes sense to call any methods on DocumentParser once it's been stopped.
</span><span class="cx">     // However, FrameLoader::stop calls DocumentParser::finish unconditionally.
</span><span class="cx"> 
</span><del>-#if ENABLE(THREADED_HTML_PARSER)
-    // Empty documents never got an append() call, and thus have never started
-    // a background parser. In those cases, we ignore shouldUseThreading()
-    // and fall through to the non-threading case.
-    if (m_haveBackgroundParser) {
-        if (!m_input.haveSeenEndOfFile())
-            m_input.closeWithoutMarkingEndOfFile();
-        HTMLParserThread::shared()-&gt;postTask(bind(&amp;BackgroundHTMLParser::finish, m_backgroundParser));
-        return;
-    }
-
-    if (!m_tokenizer) {
-        ASSERT(!m_token);
-        // We're finishing before receiving any data. Rather than booting up
-        // the background parser just to spin it down, we finish parsing
-        // synchronously.
-        m_token = adoptPtr(new HTMLToken);
-        m_tokenizer = HTMLTokenizer::create(m_options);
-    }
-#endif
-
</del><span class="cx">     // We're not going to get any more data off the network, so we tell the
</span><span class="cx">     // input stream we've reached the end of file. finish() can be called more
</span><span class="cx">     // than once, if the first time does not call end().
</span><span class="lines">@@ -812,11 +499,6 @@
</span><span class="cx"> 
</span><span class="cx"> TextPosition HTMLDocumentParser::textPosition() const
</span><span class="cx"> {
</span><del>-#if ENABLE(THREADED_HTML_PARSER)
-    if (m_haveBackgroundParser)
-        return m_textPosition;
-#endif
-
</del><span class="cx">     const SegmentedString&amp; currentString = m_input.current();
</span><span class="cx">     OrdinalNumber line = currentString.currentLine();
</span><span class="cx">     OrdinalNumber column = currentString.currentColumn();
</span><span class="lines">@@ -845,18 +527,6 @@
</span><span class="cx">     ASSERT(!isExecutingScript());
</span><span class="cx">     ASSERT(!isWaitingForScripts());
</span><span class="cx"> 
</span><del>-#if ENABLE(THREADED_HTML_PARSER)
-    if (m_haveBackgroundParser) {
-        validateSpeculations(m_lastChunkBeforeScript.release());
-        ASSERT(!m_lastChunkBeforeScript);
-        // processParsedChunkFromBackgroundParser can cause this parser to be detached from the Document,
-        // but we need to ensure it isn't deleted yet.
-        Ref&lt;HTMLDocumentParser&gt; protect(*this);
-        pumpPendingSpeculations();
-        return;
-    }
-#endif
-
</del><span class="cx">     m_insertionPreloadScanner.clear();
</span><span class="cx">     pumpTokenizerIfPossible(AllowYield);
</span><span class="cx">     endIfDelayed();
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlparserHTMLDocumentParserh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/parser/HTMLDocumentParser.h (162257 => 162258)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/parser/HTMLDocumentParser.h        2014-01-18 18:06:03 UTC (rev 162257)
+++ trunk/Source/WebCore/html/parser/HTMLDocumentParser.h        2014-01-18 18:25:30 UTC (rev 162258)
</span><span class="lines">@@ -81,19 +81,6 @@
</span><span class="cx">     virtual void suspendScheduledTasks() override;
</span><span class="cx">     virtual void resumeScheduledTasks() override;
</span><span class="cx"> 
</span><del>-#if ENABLE(THREADED_HTML_PARSER)
-    struct ParsedChunk {
-        OwnPtr&lt;CompactHTMLTokenStream&gt; tokens;
-        PreloadRequestStream preloads;
-        XSSInfoStream xssInfos;
-        HTMLTokenizer::State tokenizerState;
-        HTMLTreeBuilderSimulator::State treeBuilderState;
-        HTMLInputCheckpoint inputCheckpoint;
-        TokenPreloadScannerCheckpoint preloadScannerCheckpoint;
-    };
-    void didReceiveParsedChunkFromBackgroundParser(OwnPtr&lt;ParsedChunk&gt;);
-#endif
-
</del><span class="cx"> protected:
</span><span class="cx">     virtual void insert(const SegmentedString&amp;) override;
</span><span class="cx">     virtual void append(PassRefPtr&lt;StringImpl&gt;) override;
</span><span class="lines">@@ -132,15 +119,6 @@
</span><span class="cx">     // CachedResourceClient
</span><span class="cx">     virtual void notifyFinished(CachedResource*) override;
</span><span class="cx"> 
</span><del>-#if ENABLE(THREADED_HTML_PARSER)
-    void startBackgroundParser();
-    void stopBackgroundParser();
-    void validateSpeculations(OwnPtr&lt;ParsedChunk&gt; lastChunk);
-    void discardSpeculationsAndResumeFrom(OwnPtr&lt;ParsedChunk&gt; lastChunk, OwnPtr&lt;HTMLToken&gt;, OwnPtr&lt;HTMLTokenizer&gt;);
-    void processParsedChunkFromBackgroundParser(OwnPtr&lt;ParsedChunk&gt;);
-    void pumpPendingSpeculations();
-#endif
-
</del><span class="cx">     Document* contextForParsingSession();
</span><span class="cx"> 
</span><span class="cx">     enum SynchronousMode {
</span><span class="lines">@@ -151,9 +129,6 @@
</span><span class="cx">     void pumpTokenizer(SynchronousMode);
</span><span class="cx">     void pumpTokenizerIfPossible(SynchronousMode);
</span><span class="cx">     void constructTreeFromHTMLToken(HTMLToken&amp;);
</span><del>-#if ENABLE(THREADED_HTML_PARSER)
-    void constructTreeFromCompactHTMLToken(const CompactHTMLToken&amp;);
-#endif
</del><span class="cx"> 
</span><span class="cx">     void runScriptsForPausedTreeBuilder();
</span><span class="cx">     void resumeParsingAfterScriptExecution();
</span><span class="lines">@@ -185,14 +160,6 @@
</span><span class="cx">     XSSAuditor m_xssAuditor;
</span><span class="cx">     XSSAuditorDelegate m_xssAuditorDelegate;
</span><span class="cx"> 
</span><del>-#if ENABLE(THREADED_HTML_PARSER)
-    // FIXME: m_lastChunkBeforeScript, m_tokenizer, m_token, and m_input should be combined into a single state object
-    // so they can be set and cleared together and passed between threads together.
-    OwnPtr&lt;ParsedChunk&gt; m_lastChunkBeforeScript;
-    Deque&lt;OwnPtr&lt;ParsedChunk&gt;&gt; m_speculations;
-    WeakPtrFactory&lt;HTMLDocumentParser&gt; m_weakFactory;
-    WeakPtr&lt;BackgroundHTMLParser&gt; m_backgroundParser;
-#endif
</del><span class="cx">     OwnPtr&lt;HTMLResourcePreloader&gt; m_preloader;
</span><span class="cx"> 
</span><span class="cx">     bool m_endWasDelayed;
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlparserHTMLParserIdiomscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/parser/HTMLParserIdioms.cpp (162257 => 162258)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/parser/HTMLParserIdioms.cpp        2014-01-18 18:06:03 UTC (rev 162257)
+++ trunk/Source/WebCore/html/parser/HTMLParserIdioms.cpp        2014-01-18 18:25:30 UTC (rev 162258)
</span><span class="lines">@@ -290,13 +290,6 @@
</span><span class="cx">     return threadSafeEqual(a.localName().impl(), b.localName().impl());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-#if ENABLE(THREADED_HTML_PARSER)
-bool threadSafeMatch(const HTMLIdentifier&amp; localName, const QualifiedName&amp; qName)
-{
-    return threadSafeEqual(localName.asStringImpl(), qName.localName().impl());
-}
-#endif
-
</del><span class="cx"> struct ImageWithScale {
</span><span class="cx">     unsigned imageURLStart;
</span><span class="cx">     unsigned imageURLLength;
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlparserHTMLParserIdiomsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/parser/HTMLParserIdioms.h (162257 => 162258)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/parser/HTMLParserIdioms.h        2014-01-18 18:06:03 UTC (rev 162257)
+++ trunk/Source/WebCore/html/parser/HTMLParserIdioms.h        2014-01-18 18:25:30 UTC (rev 162258)
</span><span class="lines">@@ -98,16 +98,6 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool threadSafeMatch(const QualifiedName&amp;, const QualifiedName&amp;);
</span><del>-#if ENABLE(THREADED_HTML_PARSER)
-bool threadSafeMatch(const HTMLIdentifier&amp;, const QualifiedName&amp;);
-inline bool threadSafeHTMLNamesMatch(const HTMLIdentifier&amp; tagName, const QualifiedName&amp; qName)
-{
-    // When the QualifiedName is known to HTMLIdentifier,
-    // all we have to do is a pointer compare.
-    ASSERT(HTMLIdentifier::hasIndex(qName.localName().impl()));
-    return tagName.asStringImpl() == qName.localName().impl();
-}
-#endif
</del><span class="cx"> 
</span><span class="cx"> String bestFitSourceForImageAttributes(float deviceScaleFactor, const String&amp; srcAttribute, const String&amp; sourceSetAttribute);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlparserHTMLTokenizercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/parser/HTMLTokenizer.cpp (162257 => 162258)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/parser/HTMLTokenizer.cpp        2014-01-18 18:06:03 UTC (rev 162257)
+++ trunk/Source/WebCore/html/parser/HTMLTokenizer.cpp        2014-01-18 18:25:30 UTC (rev 162258)
</span><span class="lines">@@ -120,41 +120,6 @@
</span><span class="cx">     m_additionalAllowedCharacter = '\0';
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-#if ENABLE(THREADED_HTML_PARSER)
-
-bool HTMLTokenizer::canCreateCheckpoint() const
-{
-    if (!m_appropriateEndTagName.isEmpty())
-        return false;
-    if (!m_temporaryBuffer.isEmpty())
-        return false;
-    if (!m_bufferedEndTagName.isEmpty())
-        return false;
-    return true;
-}
-
-void HTMLTokenizer::createCheckpoint(Checkpoint&amp; result) const
-{
-    ASSERT(canCreateCheckpoint());
-    result.options = m_options;
-    result.state = m_state;
-    result.additionalAllowedCharacter = m_additionalAllowedCharacter;
-    result.skipNextNewLine = m_inputStreamPreprocessor.skipNextNewLine();
-    result.shouldAllowCDATA = m_shouldAllowCDATA;
-}
-
-void HTMLTokenizer::restoreFromCheckpoint(const Checkpoint&amp; checkpoint)
-{
-    m_token = 0;
-    m_options = checkpoint.options;
-    m_state = checkpoint.state;
-    m_additionalAllowedCharacter = checkpoint.additionalAllowedCharacter;
-    m_inputStreamPreprocessor.reset(checkpoint.skipNextNewLine);
-    m_shouldAllowCDATA = checkpoint.shouldAllowCDATA;
-}
-
-#endif
-
</del><span class="cx"> inline bool HTMLTokenizer::processEntity(SegmentedString&amp; source)
</span><span class="cx"> {
</span><span class="cx">     bool notEnoughCharacters = false;
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlparserHTMLTokenizerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/parser/HTMLTokenizer.h (162257 => 162258)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/parser/HTMLTokenizer.h        2014-01-18 18:06:03 UTC (rev 162257)
+++ trunk/Source/WebCore/html/parser/HTMLTokenizer.h        2014-01-18 18:25:30 UTC (rev 162258)
</span><span class="lines">@@ -121,33 +121,6 @@
</span><span class="cx">         CDATASectionDoubleRightSquareBracketState,
</span><span class="cx">     };
</span><span class="cx"> 
</span><del>-#if ENABLE(THREADED_HTML_PARSER)
-
-    struct Checkpoint {
-        HTMLParserOptions options;
-        State state;
-        UChar additionalAllowedCharacter;
-        bool skipNextNewLine;
-        bool forceNullCharacterReplacement;
-        bool shouldAllowCDATA;
-
-        Checkpoint()
-            : options(0)
-            , state()
-            , additionalAllowedCharacter('\0')
-            , skipNextNewLine(false)
-            , forceNullCharacterReplacement(false)
-            , shouldAllowCDATA(false)
-        {
-        }
-    };
-
-    bool canCreateCheckpoint() const;
-    void createCheckpoint(Checkpoint&amp;) const;
-    void restoreFromCheckpoint(const Checkpoint&amp;);
-
-#endif
-
</del><span class="cx">     // This function returns true if it emits a token. Otherwise, callers
</span><span class="cx">     // must provide the same (in progress) token on the next call (unless
</span><span class="cx">     // they call reset() first).
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderDocumentLoadercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/DocumentLoader.cpp (162257 => 162258)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/DocumentLoader.cpp        2014-01-18 18:06:03 UTC (rev 162257)
+++ trunk/Source/WebCore/loader/DocumentLoader.cpp        2014-01-18 18:25:30 UTC (rev 162258)
</span><span class="lines">@@ -357,13 +357,12 @@
</span><span class="cx"> 
</span><span class="cx"> bool DocumentLoader::isLoading() const
</span><span class="cx"> {
</span><del>-    // FIXME: This should always be enabled, but it seems to cause
</del><ins>+    // if (document() &amp;&amp; document()-&gt;hasActiveParser())
+    //     return true;
+    // FIXME: The above code should be enabled, but it seems to cause
</ins><span class="cx">     // http/tests/security/feed-urls-from-remote.html to timeout on Mac WK1
</span><span class="cx">     // see http://webkit.org/b/110554 and http://webkit.org/b/110401
</span><del>-#if ENABLE(THREADED_HTML_PARSER)
-    if (document() &amp;&amp; document()-&gt;hasActiveParser())
-        return true;
-#endif
</del><ins>+
</ins><span class="cx">     return isLoadingMainResource() || !m_subresourceLoaders.isEmpty() || !m_plugInStreamLoaders.isEmpty();
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -920,11 +919,8 @@
</span><span class="cx"> {
</span><span class="cx">     if (!m_frame || isLoading())
</span><span class="cx">         return;
</span><del>-#if !ENABLE(THREADED_HTML_PARSER)
-    // This ASSERT triggers with the threaded HTML parser.
-    // See https://bugs.webkit.org/show_bug.cgi?id=110937
</del><ins>+
</ins><span class="cx">     ASSERT(this == frameLoader()-&gt;activeDocumentLoader());
</span><del>-#endif
</del><span class="cx">     m_frame-&gt;document()-&gt;domWindow()-&gt;finishedLoading();
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorepageSettingsin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/Settings.in (162257 => 162258)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/Settings.in        2014-01-18 18:06:03 UTC (rev 162257)
+++ trunk/Source/WebCore/page/Settings.in        2014-01-18 18:25:30 UTC (rev 162258)
</span><span class="lines">@@ -158,9 +158,6 @@
</span><span class="cx"> applicationChromeMode initial=false
</span><span class="cx"> DOMPasteAllowed initial=false
</span><span class="cx"> 
</span><del>-threadedHTMLParser initial=false, conditional=THREADED_HTML_PARSER
-useThreadedHTMLParserForDataURLs initial=false, conditional=THREADED_HTML_PARSER
-
</del><span class="cx"> # When enabled, window.blur() does not change focus, and
</span><span class="cx"> # window.focus() only changes focus when invoked from the context that
</span><span class="cx"> # created the window.
</span></span></pre>
</div>
</div>

</body>
</html>