Bug 943509: Explicitly check for unconstrained availableHeight, when checking whether bottom padding fits, at end of flex container reflow. r=mats

This commit is contained in:
Daniel Holbert 2013-11-26 17:14:48 -08:00
parent d3eca1abef
commit 7acb86292c
3 changed files with 12 additions and 1 deletions

View File

@ -0,0 +1,9 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
</head>
<body>
<span style="display: flex;"><span style="padding-top: 288230376151711740px; display: inherit;">a</span></span>
</body>
</html>

View File

@ -510,3 +510,4 @@ load 885009-1.html
load 893523.html
test-pref(layout.css.sticky.enabled,true) load 914891.html
test-pref(layout.css.sticky.enabled,true) load 915475.xhtml
load 943509-1.html

View File

@ -2603,7 +2603,8 @@ nsFlexContainerFrame::Reflow(nsPresContext* aPresContext,
nscoord desiredHeightWithBottomBP =
aDesiredSize.height + aReflowState.mComputedBorderPadding.bottom;
if (aDesiredSize.height == 0 ||
if (aReflowState.availableHeight == NS_UNCONSTRAINEDSIZE ||
aDesiredSize.height == 0 ||
desiredHeightWithBottomBP <= aReflowState.availableHeight ||
aReflowState.ComputedHeight() == NS_INTRINSICSIZE) {
// Update desired height to include bottom border/padding