mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-26 18:31:29 +00:00
Followup to bug 378784 based on rbs's review comments.
This commit is contained in:
parent
7e3d62ddea
commit
90fce747f4
@ -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;
|
||||
|
||||
|
@ -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) && \
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user