Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2136)

Unified Diff: third_party/WebKit/Source/core/html/parser/TextDocumentParser.cpp

Issue 1642283002: Deal with frame removal by content scripts (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Schedule microtask for document_end scripts Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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!

Powered by Google App Engine
This is Rietveld 408576698