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

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

Issue 2913133002: Check whether a text node may be about to be redistributed in ShouldUpdateLayoutByReattaching() (Closed)
Patch Set: Add comment Created 3 years, 7 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 | « no previous file | 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 bd379c0c31be77a9f5e36af4496144316a5733ef..dabcd84b6ff54cc7361be8949de10c2d76603d58 100644
--- a/third_party/WebKit/Source/core/dom/Text.cpp
+++ b/third_party/WebKit/Source/core/dom/Text.cpp
@@ -31,6 +31,7 @@
#include "core/dom/LayoutTreeBuilderTraversal.h"
#include "core/dom/NodeComputedStyle.h"
#include "core/dom/NodeTraversal.h"
+#include "core/dom/shadow/ElementShadow.h"
#include "core/dom/shadow/ShadowRoot.h"
#include "core/events/ScopedEventQueue.h"
#include "core/layout/LayoutText.h"
@@ -446,6 +447,11 @@ static bool ShouldUpdateLayoutByReattaching(const Text& text_node,
*text_layout_object->Parent())) {
return true;
}
+ // Check whether this node may be about to be redistributed.
+ if (text_node.ParentElementShadow() &&
yosin_UTC9 2017/06/02 07:47:43 What is happend when Text is descendant of shadow
+ text_node.ParentElementShadow()->NeedsDistributionRecalc()) {
+ return true;
+ }
if (text_layout_object->IsTextFragment()) {
// Changes of |textNode| may change first letter part, so we should
// reattach.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698