Index: third_party/WebKit/Source/core/layout/LayoutTableSection.cpp |
diff --git a/third_party/WebKit/Source/core/layout/LayoutTableSection.cpp b/third_party/WebKit/Source/core/layout/LayoutTableSection.cpp |
index 8dcca0a81c772ca7f1b358e2a7b3f5b04d171348..2efec3e030e4ee9387d2a245fd729e6034037389 100644 |
--- a/third_party/WebKit/Source/core/layout/LayoutTableSection.cpp |
+++ b/third_party/WebKit/Source/core/layout/LayoutTableSection.cpp |
@@ -1110,13 +1110,15 @@ int LayoutTableSection::distributeExtraLogicalHeightToRows( |
return extraLogicalHeight - remainingExtraLogicalHeight; |
} |
-static bool shouldFlexCellChild(LayoutObject* cellDescendant) { |
- return cellDescendant->isAtomicInlineLevel() || |
- (cellDescendant->isBox() && |
- toLayoutBox(cellDescendant)->style()->overflowY() != |
- EOverflow::Visible && |
- toLayoutBox(cellDescendant)->style()->overflowY() != |
- EOverflow::Hidden); |
+static bool shouldFlexCellChild(const LayoutTableCell& cell, |
+ LayoutObject* cellDescendant) { |
+ if (!cell.style()->logicalHeight().isSpecified()) |
+ return false; |
+ if (cellDescendant->style()->overflowY() == EOverflow::Visible || |
+ cellDescendant->style()->overflowY() == EOverflow::Hidden) |
+ return true; |
+ return cellDescendant->isBox() && |
+ toLayoutBox(cellDescendant)->shouldBeConsideredAsReplaced(); |
} |
void LayoutTableSection::layoutRows() { |
@@ -1902,7 +1904,7 @@ void LayoutTableSection::relayoutCellIfFlexed(LayoutTableCell& cell, |
for (LayoutObject* child = cell.firstChild(); child; |
child = child->nextSibling()) { |
if (!child->isText() && child->style()->logicalHeight().isPercentOrCalc() && |
- (flexAllChildren || shouldFlexCellChild(child)) && |
+ (flexAllChildren || shouldFlexCellChild(cell, child)) && |
(!child->isTable() || toLayoutTable(child)->hasSections())) { |
cellChildrenFlex = true; |
break; |
@@ -1913,7 +1915,7 @@ void LayoutTableSection::relayoutCellIfFlexed(LayoutTableCell& cell, |
if (TrackedLayoutBoxListHashSet* percentHeightDescendants = |
cell.percentHeightDescendants()) { |
for (auto* descendant : *percentHeightDescendants) { |
- if (flexAllChildren || shouldFlexCellChild(descendant)) { |
+ if (flexAllChildren || shouldFlexCellChild(cell, descendant)) { |
cellChildrenFlex = true; |
break; |
} |