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

Side by Side Diff: third_party/WebKit/Source/core/layout/TextAutosizer.cpp

Issue 2817443003: Fix font-size shaking issue in some pages (Closed)
Patch Set: Created 3 years, 8 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/TextAutosizerTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 886 matching lines...) Expand 10 before | Expand all | Expand 10 after
897 superclusterHasEnoughTextToAutosize(supercluster, widthProvider, false) 897 superclusterHasEnoughTextToAutosize(supercluster, widthProvider, false)
898 ? multiplierFromBlock(widthProvider) 898 ? multiplierFromBlock(widthProvider)
899 : 1.0f; 899 : 1.0f;
900 } 900 }
901 ASSERT(supercluster->m_multiplier); 901 ASSERT(supercluster->m_multiplier);
902 return supercluster->m_multiplier; 902 return supercluster->m_multiplier;
903 } 903 }
904 904
905 const LayoutBlock* TextAutosizer::clusterWidthProvider( 905 const LayoutBlock* TextAutosizer::clusterWidthProvider(
906 const LayoutBlock* root) const { 906 const LayoutBlock* root) const {
907 if (root->isTable() || root->isTableCell()) 907 if (root->isTable() || root->isTableCell() || root->isLayoutView())
pdr. 2017/04/12 17:55:33 Can you update the comment in TextAutosizer.h to m
908 return root; 908 return root;
909 909
910 return deepestBlockContainingAllText(root); 910 return deepestBlockContainingAllText(root);
911 } 911 }
912 912
913 const LayoutBlock* TextAutosizer::maxClusterWidthProvider( 913 const LayoutBlock* TextAutosizer::maxClusterWidthProvider(
914 Supercluster* supercluster, 914 Supercluster* supercluster,
915 const LayoutBlock* currentRoot) const { 915 const LayoutBlock* currentRoot) const {
916 const LayoutBlock* result = nullptr; 916 const LayoutBlock* result = nullptr;
917 if (currentRoot) 917 if (currentRoot)
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after
1372 } 1372 }
1373 } 1373 }
1374 potentiallyInconsistentSuperclusters.clear(); 1374 potentiallyInconsistentSuperclusters.clear();
1375 } 1375 }
1376 1376
1377 DEFINE_TRACE(TextAutosizer) { 1377 DEFINE_TRACE(TextAutosizer) {
1378 visitor->trace(m_document); 1378 visitor->trace(m_document);
1379 } 1379 }
1380 1380
1381 } // namespace blink 1381 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/TextAutosizerTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698