Index: third_party/WebKit/Source/core/html/parser/TextDocumentParser.cpp |
diff --git a/third_party/WebKit/Source/core/html/parser/TextDocumentParser.cpp b/third_party/WebKit/Source/core/html/parser/TextDocumentParser.cpp |
index d6b8d15d6675e0872b1f271291ad815c8f75dd62..ef02858050fc40ada5d541b65ed42197d4866f7e 100644 |
--- a/third_party/WebKit/Source/core/html/parser/TextDocumentParser.cpp |
+++ b/third_party/WebKit/Source/core/html/parser/TextDocumentParser.cpp |
@@ -60,6 +60,8 @@ void TextDocumentParser::insertFakePreElement() |
attributes.append(Attribute(styleAttr, "word-wrap: break-word; white-space: pre-wrap;")); |
AtomicHTMLToken fakePre(HTMLToken::StartTag, preTag.localName(), attributes); |
treeBuilder()->constructTree(&fakePre); |
+ if (isStopped()) |
+ return; |
// Normally we would skip the first \n after a <pre> element, but we don't |
// want to skip the first \n for text documents! |