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 c53476b64e
commit 293eb0cabf
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