Bug 1165667: Use reflow state's reference rendering context during flex layout, instead of creating a temporary one. r=mats

This commit is contained in:
Daniel Holbert 2015-05-21 18:35:16 -07:00
parent bb51644dac
commit 1f6784127e

View File

@ -1424,10 +1424,10 @@ nsFlexContainerFrame::
// Measure content, if needed (w/ intrinsic-width method or a reflow)
if (minSizeNeedsToMeasureContent || flexBasisNeedsToMeasureContent) {
if (aAxisTracker.IsMainAxisHorizontal()) {
nsRenderingContext rctx(
aPresContext->PresShell()->CreateReferenceRenderingContext());
if (minSizeNeedsToMeasureContent) {
resolvedMinSize = std::min(resolvedMinSize, aFlexItem.Frame()->GetMinISize(&rctx));
nscoord frameMinISize =
aFlexItem.Frame()->GetMinISize(aItemReflowState.rendContext);
resolvedMinSize = std::min(resolvedMinSize, frameMinISize);
}
NS_ASSERTION(!flexBasisNeedsToMeasureContent,
"flex-basis:auto should have been resolved in the "