Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(18)

Unified Diff: third_party/WebKit/Source/core/dom/Text.cpp

Issue 2421793002: Move layout tree reconstruction code for Text nodes into new function (Closed)
Patch Set: Bugs' changes Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/dom/Text.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « third_party/WebKit/Source/core/dom/Text.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698