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. |