Make svg:foreignObject be considered a constrained height (now that I'm thinking about them). (Bug 759755, patch 4) r=roc

This commit is contained in:
L. David Baron 2012-06-10 13:02:23 -07:00
parent 8719c1bb1c
commit a2ecaa9abc

View File

@ -257,6 +257,9 @@ nsHTMLReflowState::Init(nsPresContext* aPresContext,
!(parent->GetType() == nsGkAtoms::scrollFrame &&
parent->GetStyleDisplay()->mOverflowY != NS_STYLE_OVERFLOW_HIDDEN)) {
frame->AddStateBits(NS_FRAME_IN_CONSTRAINED_HEIGHT);
} else if (type == nsGkAtoms::svgForeignObjectFrame) {
// An SVG foreignObject frame is inherently constrained height.
frame->AddStateBits(NS_FRAME_IN_CONSTRAINED_HEIGHT);
} else if ((mStylePosition->mHeight.GetUnit() != eStyleUnit_Auto ||
mStylePosition->mMaxHeight.GetUnit() != eStyleUnit_None) &&
// Don't set NS_FRAME_IN_CONSTRAINED_HEIGHT on body or html