Bug 865702. Don't move the frame in FinishReflowChild if we were told not to. r=roc a=lsblakk
--- a/layout/generic/nsContainerFrame.cpp
+++ b/layout/generic/nsContainerFrame.cpp
@@ -1044,19 +1044,22 @@ nsContainerFrame::FinishReflowChild(nsIF
nsPresContext* aPresContext,
const nsHTMLReflowState* aReflowState,
const nsHTMLReflowMetrics& aDesiredSize,
nscoord aX,
nscoord aY,
uint32_t aFlags)
{
nsPoint curOrigin = aKidFrame->GetPosition();
- nsRect bounds(aX, aY, aDesiredSize.width, aDesiredSize.height);
- aKidFrame->SetRect(bounds);
+ if (NS_FRAME_NO_MOVE_FRAME != (aFlags & NS_FRAME_NO_MOVE_FRAME)) {
+ aKidFrame->SetRect(nsRect(aX, aY, aDesiredSize.width, aDesiredSize.height));
+ } else {
+ aKidFrame->SetSize(nsSize(aDesiredSize.width, aDesiredSize.height));
+ }
if (aKidFrame->HasView()) {
nsView* view = aKidFrame->GetView();
// Make sure the frame's view is properly sized and positioned and has
// things like opacity correct
SyncFrameViewAfterReflow(aPresContext, aKidFrame, view,
aDesiredSize.VisualOverflow(), aFlags);
}