Index: third_party/WebKit/Source/core/layout/TextAutosizer.cpp |
diff --git a/third_party/WebKit/Source/core/layout/TextAutosizer.cpp b/third_party/WebKit/Source/core/layout/TextAutosizer.cpp |
index 0054e2b6da292016865d95e32b16c48f04640c0e..dc9f085bdb3360e127a8ec04a539ae80bc6ee74c 100644 |
--- a/third_party/WebKit/Source/core/layout/TextAutosizer.cpp |
+++ b/third_party/WebKit/Source/core/layout/TextAutosizer.cpp |
@@ -1009,6 +1009,11 @@ const LayoutBlock* TextAutosizer::DeepestBlockContainingAllText( |
// FIXME: Refactor this to look more like TextAutosizer::deepestCommonAncestor. |
const LayoutBlock* TextAutosizer::DeepestBlockContainingAllText( |
const LayoutBlock* root) const { |
+ // To avoid font-size shaking caused by the change of LayoutView's |
+ // DeepestBlockContainingAllText. |
+ if (root && root->IsLayoutView()) |
skobes
2017/05/31 01:50:26
I don't think we need to check if root is null her
cathiechentx
2017/06/01 15:36:27
Done.
|
+ return root; |
+ |
size_t first_depth = 0; |
const LayoutObject* first_text_leaf = FindTextLeaf(root, first_depth, kFirst); |
if (!first_text_leaf) |