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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutTableSection.cpp

Issue 2535173006: Percent height border-box content should get correct height in percent height cells (Closed)
Patch Set: bug 669867 Created 4 years 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 | « third_party/WebKit/Source/core/layout/LayoutBox.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBox.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698