diff --git a/mozilla/layout/base/nsIPresShell.h b/mozilla/layout/base/nsIPresShell.h index c17e8f84a41..b4ff3815070 100644 --- a/mozilla/layout/base/nsIPresShell.h +++ b/mozilla/layout/base/nsIPresShell.h @@ -345,8 +345,8 @@ public: * Tell the pres shell that a frame needs to be marked dirty and needs * Reflow. It's OK if this is an ancestor of the frame needing reflow as * long as the ancestor chain between them doesn't cross a reflow root. The - * bits to add should be some combination of NS_FRAME_IS_DIRTY and - * NS_FRAME_HAS_DIRTY_CHILDREN. + * bit to add should be eithr NS_FRAME_IS_DIRTY or + * NS_FRAME_HAS_DIRTY_CHILDREN (but not both!). */ enum IntrinsicDirty { // XXXldb eResize should be renamed @@ -356,7 +356,7 @@ public: }; NS_IMETHOD FrameNeedsReflow(nsIFrame *aFrame, IntrinsicDirty aIntrinsicDirty, - nsFrameState aBitsToAdd) = 0; + nsFrameState aBitToAdd) = 0; NS_IMETHOD CancelAllPendingReflows() = 0; diff --git a/mozilla/layout/base/nsPresShell.cpp b/mozilla/layout/base/nsPresShell.cpp index 884fa57eb5f..34d20bc6f78 100644 --- a/mozilla/layout/base/nsPresShell.cpp +++ b/mozilla/layout/base/nsPresShell.cpp @@ -813,7 +813,7 @@ public: NS_IMETHOD GetPlaceholderFrameFor(nsIFrame* aFrame, nsIFrame** aPlaceholderFrame) const; NS_IMETHOD FrameNeedsReflow(nsIFrame *aFrame, IntrinsicDirty aIntrinsicDirty, - nsFrameState aBitsToAdd); + nsFrameState aBitToAdd); NS_IMETHOD CancelAllPendingReflows(); NS_IMETHOD IsSafeToFlush(PRBool& aIsSafeToFlush); NS_IMETHOD FlushPendingNotifications(mozFlushType aType); @@ -3114,10 +3114,10 @@ PresShell::VerifyHasDirtyRootAncestor(nsIFrame* aFrame) NS_IMETHODIMP PresShell::FrameNeedsReflow(nsIFrame *aFrame, IntrinsicDirty aIntrinsicDirty, - nsFrameState aBitsToAdd) + nsFrameState aBitToAdd) { - NS_PRECONDITION(aBitsToAdd == NS_FRAME_IS_DIRTY || - aBitsToAdd == NS_FRAME_HAS_DIRTY_CHILDREN, + NS_PRECONDITION(aBitToAdd == NS_FRAME_IS_DIRTY || + aBitToAdd == NS_FRAME_HAS_DIRTY_CHILDREN, "Unexpected bits being added"); // XXX Add this assertion at some point!? nsSliderFrame triggers it a lot. @@ -3152,7 +3152,7 @@ PresShell::FrameNeedsReflow(nsIFrame *aFrame, IntrinsicDirty aIntrinsicDirty, // Grab |wasDirty| now so we can go ahead and update the bits on // aFrame and then get |targetFrameDirty|. PRBool wasDirty = NS_SUBTREE_DIRTY(aFrame); - aFrame->AddStateBits(aBitsToAdd); + aFrame->AddStateBits(aBitToAdd); PRBool targetFrameDirty = ((aFrame->GetStateBits() & NS_FRAME_IS_DIRTY) != 0); #define FRAME_IS_REFLOW_ROOT(_f) \ ((_f->GetStateBits() & NS_FRAME_REFLOW_ROOT) && \ diff --git a/mozilla/layout/mathml/base/src/nsMathMLmtableFrame.cpp b/mozilla/layout/mathml/base/src/nsMathMLmtableFrame.cpp index bbeb0761f8f..68c9b500779 100644 --- a/mozilla/layout/mathml/base/src/nsMathMLmtableFrame.cpp +++ b/mozilla/layout/mathml/base/src/nsMathMLmtableFrame.cpp @@ -458,8 +458,8 @@ nsMathMLmtableOuterFrame::AttributeChanged(PRInt32 aNameSpaceID, if (aAttribute == nsGkAtoms::displaystyle_) { nsMathMLContainerFrame::RebuildAutomaticDataForChildren(mParent); nsMathMLContainerFrame::PropagateScriptStyleFor(tableFrame, mPresentationData.scriptLevel); - // XXXbz I have no idea why this is reflowing the _parent_ instead of - // us... + // Need to reflow the parent, not us, because this can actually + // affect siblings. PresContext()->PresShell()-> FrameNeedsReflow(mParent, nsIPresShell::eStyleChange, NS_FRAME_IS_DIRTY); return NS_OK;