Index: third_party/WebKit/Source/core/html/parser/HTMLTreeBuilder.cpp |
diff --git a/third_party/WebKit/Source/core/html/parser/HTMLTreeBuilder.cpp b/third_party/WebKit/Source/core/html/parser/HTMLTreeBuilder.cpp |
index 3d1a4f5f267c891d67d04dd8747f2d978ad8519c..26bd6e752db6630fad2e76f52bce42cba9b11857 100644 |
--- a/third_party/WebKit/Source/core/html/parser/HTMLTreeBuilder.cpp |
+++ b/third_party/WebKit/Source/core/html/parser/HTMLTreeBuilder.cpp |
@@ -188,6 +188,11 @@ public: |
skipLeading<isNotHTMLSpace<UChar>>(); |
} |
+ void skipRemaining() |
+ { |
+ m_current = m_end; |
+ } |
+ |
String takeRemaining() |
{ |
ASSERT(!isEmpty()); |
@@ -2288,6 +2293,10 @@ ReprocessBuffer: |
if (buffer.isEmpty()) |
return; |
defaultForBeforeHTML(); |
+ if (m_parser->isStopped()) { |
kouhei (in TOK)
2016/02/10 01:38:02
I don't understand the intention of the change her
robwu
2016/02/10 10:19:52
When the HTML document consists of text only, e.g.
|
+ buffer.skipRemaining(); |
+ return; |
+ } |
// Fall through. |
} |
case BeforeHeadMode: { |