| 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 ac59da6ee6c12085703967fb88a6d60497b72088..98f629c264f96c201c30ae801244048301df33f5 100644
|
| --- a/third_party/WebKit/Source/core/layout/LayoutTableSection.cpp
|
| +++ b/third_party/WebKit/Source/core/layout/LayoutTableSection.cpp
|
| @@ -1111,12 +1111,19 @@ int LayoutTableSection::distributeExtraLogicalHeightToRows(
|
| return extraLogicalHeight - remainingExtraLogicalHeight;
|
| }
|
|
|
| -static bool shouldFlexCellChild(LayoutObject* cellDescendant) {
|
| - return cellDescendant->isAtomicInlineLevel() ||
|
| - (cellDescendant->isBox() &&
|
| - toLayoutBox(cellDescendant)->style()->overflowY() !=
|
| - OverflowVisible &&
|
| - toLayoutBox(cellDescendant)->style()->overflowY() != OverflowHidden);
|
| +static bool shouldFlexCellChild(const LayoutTableCell& cell,
|
| + LayoutObject* cellDescendant) {
|
| + if (!cell.style()->logicalHeight().isSpecified())
|
| + return false;
|
| + if (cellDescendant->isAtomicInlineLevel())
|
| + return true;
|
| + if (cellDescendant->style()->overflowY() == OverflowVisible ||
|
| + cellDescendant->style()->overflowY() == OverflowHidden)
|
| + return true;
|
| + Node* node = cellDescendant->node();
|
| + return node && node->isElementNode() &&
|
| + (toElement(node)->isFormControlElement() ||
|
| + isHTMLImageElement(toElement(node)));
|
| }
|
|
|
| void LayoutTableSection::layoutRows() {
|
| @@ -1902,7 +1909,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 +1920,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;
|
| }
|
|
|