| Index: Source/core/html/parser/HTMLDocumentParser.cpp
|
| diff --git a/Source/core/html/parser/HTMLDocumentParser.cpp b/Source/core/html/parser/HTMLDocumentParser.cpp
|
| index 711715617e9eb85849c9b775a231362b6a6b99c8..3d7d7a47589d0683200fadf6df8065cd30e5d01b 100644
|
| --- a/Source/core/html/parser/HTMLDocumentParser.cpp
|
| +++ b/Source/core/html/parser/HTMLDocumentParser.cpp
|
| @@ -498,9 +498,10 @@ void HTMLDocumentParser::processParsedChunkFromBackgroundParser(PassOwnPtr<Parse
|
| ASSERT(!m_token);
|
| }
|
|
|
| - // Make sure any pending text nodes are emitted before returning.
|
| + // Make sure all required pending text nodes are emitted before returning.
|
| + // This leaves "script", "style" and "svg" nodes text nodes intact.
|
| if (!isStopped())
|
| - m_treeBuilder->flush();
|
| + m_treeBuilder->flush(FlushIfAtTextLimit);
|
| }
|
|
|
| void HTMLDocumentParser::pumpPendingSpeculations()
|
| @@ -635,7 +636,7 @@ void HTMLDocumentParser::pumpTokenizer(SynchronousMode mode)
|
| // There should only be PendingText left since the tree-builder always flushes
|
| // the task queue before returning. In case that ever changes, crash.
|
| if (mode == ForceSynchronous)
|
| - m_treeBuilder->flush();
|
| + m_treeBuilder->flush(FlushAlways);
|
| RELEASE_ASSERT(!isStopped());
|
|
|
| if (session.needsYield)
|
|
|