We don't have to blow away intrinsic widths on ancestors when kids are appended

to an already-dirty reflow root.  Bug 383992, r+sr=dbaron
This commit is contained in:
bzbarsky@mit.edu 2007-06-15 22:12:58 -07:00
parent e7710fdc6c
commit d7a2736f60

View File

@ -3099,11 +3099,14 @@ PresShell::FrameNeedsReflow(nsIFrame *aFrame, IntrinsicDirty aIntrinsicDirty,
}
#endif
// Grab |wasDirty| now so we can go ahead and update the bits on
// aFrame and then get |targetFrameDirty|.
// Grab |wasDirty| now so we can go ahead and update the bits on aFrame.
PRBool wasDirty = NS_SUBTREE_DIRTY(aFrame);
aFrame->AddStateBits(aBitToAdd);
PRBool targetFrameDirty = ((aFrame->GetStateBits() & NS_FRAME_IS_DIRTY) != 0);
// Now if aFrame is a reflow root we can cut off this reflow at it if the bit
// being added is NS_FRAME_HAS_DIRTY_CHILDREN.
PRBool targetFrameDirty = (aBitToAdd == NS_FRAME_IS_DIRTY);
#define FRAME_IS_REFLOW_ROOT(_f) \
((_f->GetStateBits() & NS_FRAME_REFLOW_ROOT) && \
(_f != aFrame || !targetFrameDirty))