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

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

Issue 320393003: Descend into inner blocks for inflateAutoTable. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Update TestExpectations Created 6 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
« no previous file with comments | « Source/core/rendering/FastTextAutosizer.h ('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 42dd9d945ebf4e49c7ef3665422e88fa5a61f302..d67f3447a8da775e13185f059e8a30b1260f4034 100644
--- a/Source/core/rendering/FastTextAutosizer.cpp
+++ b/Source/core/rendering/FastTextAutosizer.cpp
@@ -415,7 +415,7 @@ void FastTextAutosizer::inflateAutoTable(RenderTable* table)
continue;
beginLayout(cell);
- inflate(cell);
+ inflate(cell, DescendToInnerBlocks);
endLayout(cell);
}
}
@@ -441,13 +441,13 @@ void FastTextAutosizer::endLayout(RenderBlock* block)
}
}
-float FastTextAutosizer::inflate(RenderObject* parent, float multiplier)
+float FastTextAutosizer::inflate(RenderObject* parent, InflateBehavior behavior, float multiplier)
{
Cluster* cluster = currentCluster();
bool hasTextChild = false;
RenderObject* child = 0;
- if (parent->isRenderBlock() && parent->childrenInline())
+ if (parent->isRenderBlock() && (parent->childrenInline() || behavior == DescendToInnerBlocks))
child = toRenderBlock(parent)->firstChild();
else if (parent->isRenderInline())
child = toRenderInline(parent)->firstChild();
@@ -464,7 +464,10 @@ float FastTextAutosizer::inflate(RenderObject* parent, float multiplier)
if (parent->isRenderInline())
child->setPreferredLogicalWidthsDirty(MarkOnlyThis);
} else if (child->isRenderInline()) {
- multiplier = inflate(child, multiplier);
+ multiplier = inflate(child, behavior, multiplier);
+ } else if (child->isRenderBlock() && behavior == DescendToInnerBlocks
+ && !classifyBlock(child, INDEPENDENT | EXPLICIT_WIDTH | SUPPRESSING)) {
+ multiplier = inflate(child, behavior, multiplier);
}
child = child->nextSibling();
}
« no previous file with comments | « Source/core/rendering/FastTextAutosizer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698