Make the simple cases of dynamic changes of -moz-box-ordinal-group work correctly. (Bug 555987) r=dbaron

This commit is contained in:
Boris Zbarsky 2010-06-28 13:47:58 -07:00
parent ad5564fe6a
commit 6b42f6dce3
2 changed files with 14 additions and 2 deletions

View File

@ -1,6 +1,6 @@
== dynamic-1-remove-to-none-grouped.xul dynamic-1-ref.xul
fails == dynamic-1-add-to-one-grouped.xul dynamic-1-ref.xul
== dynamic-1-add-to-one-grouped.xul dynamic-1-ref.xul
== dynamic-1-remove-to-one-grouped-1.xul dynamic-1-ref.xul
fails == dynamic-1-remove-to-one-grouped-2.xul dynamic-1-ref.xul
== dynamic-1-add-to-two-grouped-1.xul dynamic-1-ref.xul
fails == dynamic-1-add-to-two-grouped-2.xul dynamic-1-ref.xul
== dynamic-1-add-to-two-grouped-2.xul dynamic-1-ref.xul

View File

@ -1054,6 +1054,12 @@ nsBoxFrame::InsertFrames(nsIAtom* aListName,
if (mLayoutManager)
mLayoutManager->ChildrenInserted(this, state, aPrevFrame, newFrames);
// Make sure to check box order _after_ notifying the layout
// manager; otherwise the slice we give the layout manager will
// just be bogus. If the layout manager cares about the order, we
// just lose.
CheckBoxOrder(state);
#ifdef DEBUG_LAYOUT
// if we are in debug make sure our children are in debug as well.
if (mState & NS_STATE_CURRENTLY_IN_DEBUG)
@ -1081,6 +1087,12 @@ nsBoxFrame::AppendFrames(nsIAtom* aListName,
if (mLayoutManager)
mLayoutManager->ChildrenAppended(this, state, newFrames);
// Make sure to check box order _after_ notifying the layout
// manager; otherwise the slice we give the layout manager will
// just be bogus. If the layout manager cares about the order, we
// just lose.
CheckBoxOrder(state);
#ifdef DEBUG_LAYOUT
// if we are in debug make sure our children are in debug as well.
if (mState & NS_STATE_CURRENTLY_IN_DEBUG)