Chromium Code Reviews| Index: Source/core/dom/Text.cpp |
| diff --git a/Source/core/dom/Text.cpp b/Source/core/dom/Text.cpp |
| index 2426009c6edb92702b679096b4140bc7abb6aa20..5cc1871fe6b8d5b708c225df3a4a3bfcade1cc17 100644 |
| --- a/Source/core/dom/Text.cpp |
| +++ b/Source/core/dom/Text.cpp |
| @@ -274,7 +274,7 @@ bool Text::textRendererIsNeeded(const RenderStyle& style, const RenderObject& pa |
| unsigned maxSiblingsToVisit = 50; |
| RenderObject* first = parent.slowFirstChild(); |
| - while (first && first->isFloatingOrOutOfFlowPositioned() && maxSiblingsToVisit--) |
| + while (first && (first == renderer() || first->isFloatingOrOutOfFlowPositioned()) && maxSiblingsToVisit--) |
|
esprehn
2014/11/04 22:03:55
renderer() has a branch inside it, you shouldn't c
|
| first = first->nextSibling(); |
| if (!first || NodeRenderingTraversal::nextSiblingRenderer(this) == first) |
| // Whitespace at the start of a block just goes away. Don't even |
| @@ -319,7 +319,7 @@ void Text::recalcTextStyle(StyleRecalcChange change, Text* nextTextSibling) |
| } else if (needsStyleRecalc() || needsWhitespaceRenderer()) { |
| reattach(); |
| if (this->renderer()) |
| - reattachWhitespaceSiblings(nextTextSibling); |
| + reattachWhitespaceSiblingsIfNeeded(nextTextSibling); |
| } |
| } |