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

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

Issue 2349803002: availableLogicalHeightUsing needs to take flexbox stretched heights into account (Closed)
Patch Set: fix test Created 4 years, 3 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 | « third_party/WebKit/LayoutTests/css3/flexbox/relpos-with-percentage-top.html ('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/LayoutBox.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutBox.cpp b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
index 9844c5910ba36e99629c48051ccd898a83dcb5e2..2f0c98f78df8b94055def04cbc67dc3db7bdd15f 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBox.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
@@ -3081,6 +3081,13 @@ LayoutUnit LayoutBox::availableLogicalHeightUsing(const Length& h, AvailableLogi
return logicalHeight() - borderAndPaddingLogicalHeight();
}
+ if (isFlexItem()) {
+ LayoutFlexibleBox& flexBox = toLayoutFlexibleBox(*parent());
+ LayoutUnit stretchedHeight = flexBox.childLogicalHeightForPercentageResolution(*this);
+ if (stretchedHeight != LayoutUnit(-1))
+ return stretchedHeight;
+ }
+
if (h.isPercentOrCalc() && isOutOfFlowPositioned()) {
// FIXME: This is wrong if the containingBlock has a perpendicular writing mode.
LayoutUnit availableHeight = containingBlockLogicalHeightForPositioned(containingBlock());
« no previous file with comments | « third_party/WebKit/LayoutTests/css3/flexbox/relpos-with-percentage-top.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698