OLD | NEW |
---|---|
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 Loading... | |
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 Loading... | |
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 |
OLD | NEW |