Bug 804089: Call DidReflow() after "measuring" reflow of flex item, to clear any intermediate state before our *real* ReflowChild() call. r=dbaron

This commit is contained in:
Daniel Holbert 2012-11-11 10:53:57 -08:00
parent b2ba5959ec
commit a677b659cc
3 changed files with 26 additions and 0 deletions

View File

@ -0,0 +1,15 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<style>
div.flexbox {
display: flex;
flex-direction: column;
}
</style>
</head>
<body>
<div class="flexbox"><mo xmlns="http://www.w3.org/1998/Math/MathML"><mrow/></mo></div>
</body>
</html>

View File

@ -397,3 +397,4 @@ asserts(8) test-pref(layout.css.flexbox.enabled,true) load 798020-1.html
test-pref(layout.css.flexbox.enabled,true) load 798235-1.html
test-pref(layout.css.flexbox.enabled,true) load 799207-1.html
asserts(12) test-pref(layout.css.flexbox.enabled,true) load 799207-2.html
test-pref(layout.css.flexbox.enabled,true) load 804089-1.xhtml

View File

@ -563,6 +563,16 @@ nsFlexContainerFrame::AppendFlexItemForChild(
"We gave flex item unconstrained available height, so it "
"should be complete");
// Call DidReflow to clear NS_FRAME_IN_REFLOW and any other state on the
// child before our next ReflowChild call.
// NOTE: We're intentionally calling DidReflow() instead of the wrapper
// FinishReflowChild() because we don't want the rest of the stuff in
// FinishReflowChild() (e.g. moving the frame's rect) to happen until we
// do our "real" reflow of the child.
rv = aChildFrame->DidReflow(aPresContext, &childRSForMeasuringHeight,
NS_FRAME_REFLOW_FINISHED);
NS_ENSURE_SUCCESS(rv, rv);
// Subtract border/padding in vertical axis, to get _just_
// the effective computed value of the "height" property.
nscoord childDesiredHeight = childDesiredSize.height -