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

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: 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
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..65f53dfff812f43d0ca21b8a522f97627598c35c 100644
--- a/third_party/WebKit/Source/core/dom/Text.cpp
+++ b/third_party/WebKit/Source/core/dom/Text.cpp
@@ -396,7 +396,13 @@ void Text::recalcTextStyle(StyleRecalcChange change, Text* nextTextSibling) {
if (needsStyleRecalc())
layoutItem.setText(dataImpl());
clearNeedsStyleRecalc();
- } else if (needsStyleRecalc() || needsWhitespaceLayoutObject()) {
+ } else {
+ rebuildTextLayoutTree(nextTextSibling);
+ }
+}
+
+void Text::rebuildTextLayoutTree(Text* nextTextSibling) {
+ if (needsStyleRecalc() || needsWhitespaceLayoutObject()) {
Bugs Nash 2016/10/14 03:58:18 needsStyleRecalc() probably shouldn't be inside th
reattachLayoutTree();
if (this->layoutObject())
reattachWhitespaceSiblingsIfNeeded(nextTextSibling);
« third_party/WebKit/Source/core/dom/Text.h ('K') | « 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