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

Unified Diff: Source/core/rendering/FastTextAutosizer.cpp

Issue 235943003: [FastTextAutosizer] Do not pre-inflate nested tables (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/virtual/fasttextautosizing/fast/text-autosizing/tables/nested-table-wrapping.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/FastTextAutosizer.cpp
diff --git a/Source/core/rendering/FastTextAutosizer.cpp b/Source/core/rendering/FastTextAutosizer.cpp
index 55c73198ebd536bfbcf42976482ca08c61e3b9e1..c97bd125f8288c941c635904c6557956581945f1 100644
--- a/Source/core/rendering/FastTextAutosizer.cpp
+++ b/Source/core/rendering/FastTextAutosizer.cpp
@@ -402,10 +402,17 @@ void FastTextAutosizer::inflateTable(RenderTable* table)
shouldAutosize = clusterWouldHaveEnoughTextToAutosize(renderTableCell, table);
if (shouldAutosize) {
- for (RenderObject* child = cell; child; child = child->nextInPreOrder(cell)) {
- if (child->isText() && child->needsLayout()) {
- applyMultiplier(child, multiplier);
- applyMultiplier(child->parent(), multiplier); // Parent handles line spacing.
+ RenderObject* child = cell;
+ while (child) {
+ if (child->needsLayout() && !child->isTable()) {
+ if (child->isText()) {
+ applyMultiplier(child, multiplier);
+ applyMultiplier(child->parent(), multiplier); // Parent handles line spacing.
+ }
+ child = child->nextInPreOrder(cell);
+ } else {
+ // Skip inflation of this subtree.
+ child = child->nextInPreOrderAfterChildren(cell);
}
}
}
« no previous file with comments | « LayoutTests/virtual/fasttextautosizing/fast/text-autosizing/tables/nested-table-wrapping.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698