From 1208137d2a3c183dd3ad37809b0a2fb71a6752e2 Mon Sep 17 00:00:00 2001 From: "bzbarsky%mit.edu" Date: Mon, 3 Apr 2006 03:55:11 +0000 Subject: [PATCH] Fix bug 326529. Patch by Mats Palmgren , r+sr=bzbarsky --- layout/xul/base/src/nsBoxFrame.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/layout/xul/base/src/nsBoxFrame.cpp b/layout/xul/base/src/nsBoxFrame.cpp index a96d2c549a44..45e46740c58b 100644 --- a/layout/xul/base/src/nsBoxFrame.cpp +++ b/layout/xul/base/src/nsBoxFrame.cpp @@ -1314,13 +1314,20 @@ nsBoxFrame::AttributeChanged(PRInt32 aNameSpaceID, } else if (aAttribute == nsXULAtoms::ordinal) { nsBoxLayoutState state(GetPresContext()->PresShell()); + + nsIFrame* frameToMove = this; + if (GetStateBits() & NS_FRAME_OUT_OF_FLOW) { + GetPresContext()->PresShell()->GetPlaceholderFrameFor(this, + &frameToMove); + NS_ASSERTION(frameToMove, "Out of flow without placeholder?"); + } nsIBox* parent; - GetParentBox(&parent); + frameToMove->GetParentBox(&parent); // If our parent is not a box, there's not much we can do... but in that // case our ordinal doesn't matter anyway, so that's ok. if (parent) { - parent->RelayoutChildAtOrdinal(state, this); + parent->RelayoutChildAtOrdinal(state, frameToMove); parent->MarkDirty(state); } }