| Index: third_party/WebKit/Source/core/dom/Text.cpp
|
| diff --git a/third_party/WebKit/Source/core/dom/Text.cpp b/third_party/WebKit/Source/core/dom/Text.cpp
|
| index 4017f379c8cca22e0fe45e387d703b258ae3d24a..a8d3da8c39c28dd42514d1f5f82c1c6bc9140315 100644
|
| --- a/third_party/WebKit/Source/core/dom/Text.cpp
|
| +++ b/third_party/WebKit/Source/core/dom/Text.cpp
|
| @@ -397,13 +397,17 @@ void Text::recalcTextStyle(StyleRecalcChange change, Text* nextTextSibling) {
|
| layoutItem.setText(dataImpl());
|
| clearNeedsStyleRecalc();
|
| } else if (needsStyleRecalc() || needsWhitespaceLayoutObject()) {
|
| - reattachLayoutTree();
|
| - if (this->layoutObject())
|
| - reattachWhitespaceSiblingsIfNeeded(nextTextSibling);
|
| - clearNeedsReattachLayoutTree();
|
| + rebuildTextLayoutTree(nextTextSibling);
|
| }
|
| }
|
|
|
| +void Text::rebuildTextLayoutTree(Text* nextTextSibling) {
|
| + reattachLayoutTree();
|
| + if (layoutObject())
|
| + reattachWhitespaceSiblingsIfNeeded(nextTextSibling);
|
| + clearNeedsReattachLayoutTree();
|
| +}
|
| +
|
| // If a whitespace node had no layoutObject and goes through a recalcStyle it
|
| // may need to create one if the parent style now has white-space: pre.
|
| bool Text::needsWhitespaceLayoutObject() {
|
|
|