diff --git a/layout/generic/nsContainerFrame.cpp b/layout/generic/nsContainerFrame.cpp index 663fc449529..05a66bf570f 100644 --- a/layout/generic/nsContainerFrame.cpp +++ b/layout/generic/nsContainerFrame.cpp @@ -324,12 +324,12 @@ nsContainerFrame::ReflowDirtyChild(nsIPresShell* aPresShell, nsIFrame* aChild) { // The container frame always generates a reflow command // targeted at its child - if (!(mState & NS_FRAME_HAS_DIRTY_CHILDREN)) { - mState |= NS_FRAME_HAS_DIRTY_CHILDREN; + // Note that even if this flag is already set, we still need to reflow the + // child because the frame may have more than one child + mState |= NS_FRAME_HAS_DIRTY_CHILDREN; - nsFrame::CreateAndPostReflowCommand(aPresShell, aChild, - nsIReflowCommand::ReflowDirty, nsnull, nsnull, nsnull); - } + nsFrame::CreateAndPostReflowCommand(aPresShell, aChild, + nsIReflowCommand::ReflowDirty, nsnull, nsnull, nsnull); return NS_OK; } diff --git a/layout/html/base/src/nsContainerFrame.cpp b/layout/html/base/src/nsContainerFrame.cpp index 663fc449529..05a66bf570f 100644 --- a/layout/html/base/src/nsContainerFrame.cpp +++ b/layout/html/base/src/nsContainerFrame.cpp @@ -324,12 +324,12 @@ nsContainerFrame::ReflowDirtyChild(nsIPresShell* aPresShell, nsIFrame* aChild) { // The container frame always generates a reflow command // targeted at its child - if (!(mState & NS_FRAME_HAS_DIRTY_CHILDREN)) { - mState |= NS_FRAME_HAS_DIRTY_CHILDREN; + // Note that even if this flag is already set, we still need to reflow the + // child because the frame may have more than one child + mState |= NS_FRAME_HAS_DIRTY_CHILDREN; - nsFrame::CreateAndPostReflowCommand(aPresShell, aChild, - nsIReflowCommand::ReflowDirty, nsnull, nsnull, nsnull); - } + nsFrame::CreateAndPostReflowCommand(aPresShell, aChild, + nsIReflowCommand::ReflowDirty, nsnull, nsnull, nsnull); return NS_OK; }