Chromium Code Reviews| Index: Source/core/html/parser/HTMLConstructionSite.cpp |
| diff --git a/Source/core/html/parser/HTMLConstructionSite.cpp b/Source/core/html/parser/HTMLConstructionSite.cpp |
| index e917706e404508585197e974f3bc50e4018ffa3e..97d7976ad25b072bf18fdcee005b907ecfe877e4 100644 |
| --- a/Source/core/html/parser/HTMLConstructionSite.cpp |
| +++ b/Source/core/html/parser/HTMLConstructionSite.cpp |
| @@ -231,11 +231,14 @@ static String atomizeIfAllWhitespace(const String& string, WhitespaceMode whites |
| return string; |
| } |
| -void HTMLConstructionSite::flushPendingText() |
| +void HTMLConstructionSite::flushPendingText(bool force) |
| { |
| if (m_pendingText.isEmpty()) |
| return; |
| + if (!force && !shouldUseLengthLimit(*m_pendingText.parent)) |
| + return; |
| + |
| PendingText pendingText; |
| // Hold onto the current pending text on the stack so that queueTask doesn't recurse infinitely. |
| m_pendingText.swap(pendingText); |
| @@ -269,7 +272,7 @@ void HTMLConstructionSite::flushPendingText() |
| void HTMLConstructionSite::queueTask(const HTMLConstructionSiteTask& task) |
| { |
| - flushPendingText(); |
| + flushPendingText(true); |
| ASSERT(m_pendingText.isEmpty()); |
| m_taskQueue.append(task); |
| } |
| @@ -689,7 +692,7 @@ void HTMLConstructionSite::insertTextNode(const String& string, WhitespaceMode w |
| // The nextChild != dummy.nextChild case occurs whenever foster parenting happened and we hit a new text node "<table>a</table>b" |
| // In either case we have to flush the pending text into the task queue before making more. |
| if (!m_pendingText.isEmpty() && (m_pendingText.parent != dummyTask.parent || m_pendingText.nextChild != dummyTask.nextChild)) |
| - flushPendingText(); |
| + flushPendingText(true); |
|
eseidel
2014/08/23 19:39:59
We'll need to fix this to be an enum (bools make f
eustas
2014/08/26 08:12:25
Added enum.
Now codesearch is working again. I've
|
| m_pendingText.append(dummyTask.parent, dummyTask.nextChild, string, whitespaceMode); |
| } |