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

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

Issue 2817443003: Fix font-size shaking issue in some pages (Closed)
Patch Set: rebase layout-after-append.html Created 3 years, 6 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 f5212eae17562d8b2aae16ef684c1eb540d2f923..6f0e83dde2e6cb3f4ce984a4a9216a8b860f3078 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->IsLayoutView())
+ 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