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..9ee07ff1f4d70c954a0550064d3eab36acb6af5c 100644 |
--- a/third_party/WebKit/Source/core/dom/Text.cpp |
+++ b/third_party/WebKit/Source/core/dom/Text.cpp |
@@ -396,7 +396,17 @@ void Text::recalcTextStyle(StyleRecalcChange change, Text* nextTextSibling) { |
if (needsStyleRecalc()) |
layoutItem.setText(dataImpl()); |
clearNeedsStyleRecalc(); |
- } else if (needsStyleRecalc() || needsWhitespaceLayoutObject()) { |
+ } else { |
+ if (needsStyleRecalc()) { |
+ setNeedsReattachLayoutTree(); |
Bugs Nash
2016/10/17 02:20:52
probably don't need to implement this yet, not nee
nainar
2016/10/17 16:57:31
The flag setting is being done in the mirror patch
|
+ clearNeedsStyleRecalc(); |
Bugs Nash
2016/10/17 02:20:52
why is this being changed in this patch?
|
+ } |
+ rebuildTextLayoutTree(nextTextSibling); |
+ } |
+} |
+ |
+void Text::rebuildTextLayoutTree(Text* nextTextSibling) { |
+ if (needsReattachLayoutTree() || needsWhitespaceLayoutObject()) { |
Bugs Nash
2016/10/17 02:20:52
this check doesn't belong in here, the method shou
nainar
2016/10/17 16:57:31
Seems like I misread your comment in the previous
|
reattachLayoutTree(); |
if (this->layoutObject()) |
reattachWhitespaceSiblingsIfNeeded(nextTextSibling); |