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

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

Issue 341523002: Resolve percent lengths for abs. positioned tables against padding box. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Specifically return a LayoutUnit in ternary operation. 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
Index: Source/core/rendering/RenderBox.cpp
diff --git a/Source/core/rendering/RenderBox.cpp b/Source/core/rendering/RenderBox.cpp
index 359704559a03313081f889d910a52be670053f45..d5a1ec39f47d72ae142171f80857f23a4972144c 100644
--- a/Source/core/rendering/RenderBox.cpp
+++ b/Source/core/rendering/RenderBox.cpp
@@ -2684,6 +2684,9 @@ LayoutUnit RenderBox::computePercentageLogicalHeight(const Length& height) const
availableHeight -= rootMarginBorderPaddingHeight;
+ if (isTable() && isOutOfFlowPositioned())
+ availableHeight += cb->paddingLogicalHeight();
+
LayoutUnit result = valueForLength(height, availableHeight);
if (includeBorderPadding) {
// FIXME: Table cells should default to box-sizing: border-box so we can avoid this hack.
« no previous file with comments | « LayoutTests/fast/table/absolute-table-percent-lengths-expected.txt ('k') | Source/core/rendering/RenderTable.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698