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..ed0e9ab696fbd124539e3a23db3be4ac80a00147 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) { |
esprehn
2016/10/27 02:06:07
DCHECK(needsReattachLayoutTree()) at the top of th
nainar
2016/10/27 03:32:14
We can't assert that here as we aren't setting nee
|
+ reattachLayoutTree(); |
+ if (this->layoutObject()) |
esprehn
2016/10/27 02:06:07
remove this->, there's no name conflict now that y
nainar
2016/10/27 03:32:14
Done.
|
+ 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() { |