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

Unified Diff: third_party/WebKit/Source/core/layout/TextAutosizer.cpp

Issue 2817443003: Fix font-size shaking issue in some pages (Closed)
Patch Set: fix font-size shaking issue only 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
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)

Powered by Google App Engine
This is Rietveld 408576698