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..fd94c7f785faf7d96752f2e2da23cdb9817001e6 100644 |
--- a/third_party/WebKit/Source/core/dom/Text.cpp |
+++ b/third_party/WebKit/Source/core/dom/Text.cpp |
@@ -397,13 +397,18 @@ void Text::recalcTextStyle(StyleRecalcChange change, Text* nextTextSibling) { |
layoutItem.setText(dataImpl()); |
clearNeedsStyleRecalc(); |
} else if (needsStyleRecalc() || needsWhitespaceLayoutObject()) { |
- reattachLayoutTree(); |
- if (this->layoutObject()) |
- reattachWhitespaceSiblingsIfNeeded(nextTextSibling); |
- clearNeedsReattachLayoutTree(); |
+ setNeedsReattachLayoutTree(); |
Bugs Nash
2016/10/18 23:19:14
I understand that you want to set flags correctly,
nainar
2016/10/26 05:08:55
Yup I understand. Made the change.
|
+ rebuildTextLayoutTree(nextTextSibling); |
} |
} |
+void Text::rebuildTextLayoutTree(Text* nextTextSibling) { |
Bugs Nash
2016/10/18 23:19:14
yup this is (y)
nainar
2016/10/26 05:08:55
Yeah!
|
+ reattachLayoutTree(); |
+ if (this->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() { |