mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Rename nsChangeHint_ReflowFrame to nsChangeHint_AllReflowHints to make it clearer that it's the one that contains multiple bits. (Bug 789592, patch 2) r=bzbarsky
This commit is contained in:
parent
d069ca43c9
commit
f646baaa52
@ -8041,7 +8041,7 @@ nsCSSFrameConstructor::ProcessRestyledFrames(nsStyleChangeList& aChangeList)
|
||||
nsChangeHint hint;
|
||||
aChangeList.ChangeAt(index, frame, content, hint);
|
||||
|
||||
NS_ASSERTION(!(hint & nsChangeHint_ReflowFrame) ||
|
||||
NS_ASSERTION(!(hint & nsChangeHint_AllReflowHints) ||
|
||||
(hint & nsChangeHint_NeedReflow),
|
||||
"Reflow hint bits set without actually asking for a reflow");
|
||||
|
||||
|
@ -212,13 +212,13 @@ inline nsChangeHint NS_HintsNotHandledForDescendantsIn(nsChangeHint aChangeHint)
|
||||
nsChangeHint(0)
|
||||
#define NS_STYLE_HINT_VISUAL \
|
||||
nsChangeHint(nsChangeHint_RepaintFrame | nsChangeHint_SyncFrameView)
|
||||
#define nsChangeHint_ReflowFrame \
|
||||
#define nsChangeHint_AllReflowHints \
|
||||
nsChangeHint(nsChangeHint_NeedReflow | \
|
||||
nsChangeHint_ClearAncestorIntrinsics | \
|
||||
nsChangeHint_ClearDescendantIntrinsics | \
|
||||
nsChangeHint_NeedDirtyReflow)
|
||||
#define NS_STYLE_HINT_REFLOW \
|
||||
nsChangeHint(NS_STYLE_HINT_VISUAL | nsChangeHint_ReflowFrame)
|
||||
nsChangeHint(NS_STYLE_HINT_VISUAL | nsChangeHint_AllReflowHints)
|
||||
#define NS_STYLE_HINT_FRAMECHANGE \
|
||||
nsChangeHint(NS_STYLE_HINT_REFLOW | nsChangeHint_ReconstructFrame)
|
||||
|
||||
|
@ -984,7 +984,7 @@ CaptureChange(nsStyleContext* aOldContext, nsStyleContext* aNewContext,
|
||||
{
|
||||
nsChangeHint ourChange = aOldContext->CalcStyleDifference(aNewContext,
|
||||
aParentHintsNotHandledForDescendants);
|
||||
NS_ASSERTION(!(ourChange & nsChangeHint_ReflowFrame) ||
|
||||
NS_ASSERTION(!(ourChange & nsChangeHint_AllReflowHints) ||
|
||||
(ourChange & nsChangeHint_NeedReflow),
|
||||
"Reflow hint bits set without actually asking for a reflow");
|
||||
|
||||
@ -1549,7 +1549,7 @@ nsFrameManager::ReResolveStyleContext(nsPresContext *aPresContext,
|
||||
|
||||
// Note that the out-of-flow may not be a geometric descendant of
|
||||
// the frame where we started the reresolve. Therefore, even if
|
||||
// aMinChange already includes nsChangeHint_ReflowFrame we don't
|
||||
// aMinChange already includes nsChangeHint_AllReflowHints we don't
|
||||
// want to pass that on to the out-of-flow reresolve, since that
|
||||
// can lead to the out-of-flow not getting reflowed when it should
|
||||
// be (eg a reresolve starting at <body> that involves reflowing
|
||||
@ -1564,7 +1564,7 @@ nsFrameManager::ReResolveStyleContext(nsPresContext *aPresContext,
|
||||
ReResolveStyleContext(aPresContext, outOfFlowFrame,
|
||||
content, aChangeList,
|
||||
NS_SubtractHint(aMinChange,
|
||||
nsChangeHint_ReflowFrame),
|
||||
nsChangeHint_AllReflowHints),
|
||||
nonInheritedHints,
|
||||
childRestyleHint,
|
||||
aRestyleTracker,
|
||||
|
@ -63,7 +63,7 @@ nsStyleChangeList::AppendChange(nsIFrame* aFrame, nsIContent* aContent, nsChange
|
||||
// XXXbz we should make this take Element instead of nsIContent
|
||||
NS_ASSERTION(!aContent || aContent->IsElement(),
|
||||
"Shouldn't be trying to restyle non-elements directly");
|
||||
NS_ASSERTION(!(aHint & nsChangeHint_ReflowFrame) ||
|
||||
NS_ASSERTION(!(aHint & nsChangeHint_AllReflowHints) ||
|
||||
(aHint & nsChangeHint_NeedReflow),
|
||||
"Reflow hint bits set without actually asking for a reflow");
|
||||
|
||||
|
@ -502,7 +502,7 @@ nsMathMLmtableOuterFrame::AttributeChanged(int32_t aNameSpaceID,
|
||||
// Explicitly request a re-resolve and reflow in our subtree to pick up any changes
|
||||
presContext->PresShell()->FrameConstructor()->
|
||||
PostRestyleEvent(mContent->AsElement(), eRestyle_Subtree,
|
||||
nsChangeHint_ReflowFrame);
|
||||
nsChangeHint_AllReflowHints);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
@ -684,7 +684,7 @@ nsMathMLmtableFrame::RestyleTable()
|
||||
// Explicitly request a re-resolve and reflow in our subtree to pick up any changes
|
||||
PresContext()->PresShell()->FrameConstructor()->
|
||||
PostRestyleEvent(mContent->AsElement(), eRestyle_Subtree,
|
||||
nsChangeHint_ReflowFrame);
|
||||
nsChangeHint_AllReflowHints);
|
||||
}
|
||||
|
||||
// --------
|
||||
@ -745,7 +745,7 @@ nsMathMLmtrFrame::AttributeChanged(int32_t aNameSpaceID,
|
||||
// Explicitly request a re-resolve and reflow in our subtree to pick up any changes
|
||||
presContext->PresShell()->FrameConstructor()->
|
||||
PostRestyleEvent(mContent->AsElement(), eRestyle_Subtree,
|
||||
nsChangeHint_ReflowFrame);
|
||||
nsChangeHint_AllReflowHints);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -640,7 +640,8 @@ nsChangeHint nsStyleOutline::CalcDifference(const nsStyleOutline& aOther) const
|
||||
(outlineIsVisible && (mOutlineOffset != aOther.mOutlineOffset ||
|
||||
mOutlineWidth != aOther.mOutlineWidth ||
|
||||
mTwipsPerPixel != aOther.mTwipsPerPixel))) {
|
||||
return NS_CombineHint(nsChangeHint_ReflowFrame, nsChangeHint_RepaintFrame);
|
||||
return NS_CombineHint(nsChangeHint_AllReflowHints,
|
||||
nsChangeHint_RepaintFrame);
|
||||
}
|
||||
if ((mOutlineStyle != aOther.mOutlineStyle) ||
|
||||
(mOutlineColor != aOther.mOutlineColor) ||
|
||||
@ -893,7 +894,7 @@ nsChangeHint nsStyleSVG::CalcDifference(const nsStyleSVG& aOther) const
|
||||
if (mTextRendering != aOther.mTextRendering) {
|
||||
NS_UpdateHint(hint, nsChangeHint_RepaintFrame);
|
||||
// May be needed for non-svg frames
|
||||
NS_UpdateHint(hint, nsChangeHint_ReflowFrame);
|
||||
NS_UpdateHint(hint, nsChangeHint_AllReflowHints);
|
||||
}
|
||||
|
||||
if (!EqualURIs(mMarkerEnd, aOther.mMarkerEnd) ||
|
||||
@ -997,7 +998,7 @@ nsChangeHint nsStyleSVGReset::CalcDifference(const nsStyleSVGReset& aOther) cons
|
||||
!EqualURIs(mFilter, aOther.mFilter) ||
|
||||
!EqualURIs(mMask, aOther.mMask)) {
|
||||
NS_UpdateHint(hint, nsChangeHint_UpdateEffects);
|
||||
NS_UpdateHint(hint, nsChangeHint_ReflowFrame);
|
||||
NS_UpdateHint(hint, nsChangeHint_AllReflowHints);
|
||||
NS_UpdateHint(hint, nsChangeHint_RepaintFrame);
|
||||
} else if (mDominantBaseline != aOther.mDominantBaseline) {
|
||||
NS_UpdateHint(hint, nsChangeHint_NeedReflow);
|
||||
@ -1113,7 +1114,7 @@ nsChangeHint nsStylePosition::CalcDifference(const nsStylePosition& aOther) cons
|
||||
|
||||
if (mBoxSizing != aOther.mBoxSizing) {
|
||||
// Can affect both widths and heights; just a bad scene.
|
||||
return NS_CombineHint(hint, nsChangeHint_ReflowFrame);
|
||||
return NS_CombineHint(hint, nsChangeHint_AllReflowHints);
|
||||
}
|
||||
|
||||
#ifdef MOZ_FLEXBOX
|
||||
@ -1126,7 +1127,7 @@ nsChangeHint nsStylePosition::CalcDifference(const nsStylePosition& aOther) cons
|
||||
mFlexGrow != aOther.mFlexGrow ||
|
||||
mFlexShrink != aOther.mFlexShrink ||
|
||||
mOrder != aOther.mOrder) {
|
||||
return NS_CombineHint(hint, nsChangeHint_ReflowFrame);
|
||||
return NS_CombineHint(hint, nsChangeHint_AllReflowHints);
|
||||
}
|
||||
|
||||
// Properties that apply to flexbox containers:
|
||||
@ -1136,7 +1137,7 @@ nsChangeHint nsStylePosition::CalcDifference(const nsStylePosition& aOther) cons
|
||||
// of its children.
|
||||
if (mAlignItems != aOther.mAlignItems ||
|
||||
mFlexDirection != aOther.mFlexDirection) {
|
||||
return NS_CombineHint(hint, nsChangeHint_ReflowFrame);
|
||||
return NS_CombineHint(hint, nsChangeHint_AllReflowHints);
|
||||
}
|
||||
|
||||
// Changing justify-content on a flexbox might affect the positioning of its
|
||||
@ -1155,7 +1156,7 @@ nsChangeHint nsStylePosition::CalcDifference(const nsStylePosition& aOther) cons
|
||||
// in nsHTMLReflowState, they do need to force reflow of the whole subtree.
|
||||
// XXXbz due to XUL caching heights as well, height changes also need to
|
||||
// clear ancestor intrinsics!
|
||||
return NS_CombineHint(hint, nsChangeHint_ReflowFrame);
|
||||
return NS_CombineHint(hint, nsChangeHint_AllReflowHints);
|
||||
}
|
||||
|
||||
if (mWidth != aOther.mWidth ||
|
||||
@ -1165,7 +1166,7 @@ nsChangeHint nsStylePosition::CalcDifference(const nsStylePosition& aOther) cons
|
||||
// sizes and none of them need to force children to reflow.
|
||||
return
|
||||
NS_CombineHint(hint,
|
||||
NS_SubtractHint(nsChangeHint_ReflowFrame,
|
||||
NS_SubtractHint(nsChangeHint_AllReflowHints,
|
||||
NS_CombineHint(nsChangeHint_ClearDescendantIntrinsics,
|
||||
nsChangeHint_NeedDirtyReflow)));
|
||||
}
|
||||
@ -2188,7 +2189,7 @@ nsChangeHint nsStyleDisplay::CalcDifference(const nsStyleDisplay& aOther) const
|
||||
if (mFloats != aOther.mFloats) {
|
||||
// Changing which side we float on doesn't affect descendants directly
|
||||
NS_UpdateHint(hint,
|
||||
NS_SubtractHint(nsChangeHint_ReflowFrame,
|
||||
NS_SubtractHint(nsChangeHint_AllReflowHints,
|
||||
NS_CombineHint(nsChangeHint_ClearDescendantIntrinsics,
|
||||
nsChangeHint_NeedDirtyReflow)));
|
||||
}
|
||||
@ -2201,7 +2202,8 @@ nsChangeHint nsStyleDisplay::CalcDifference(const nsStyleDisplay& aOther) const
|
||||
|| mAppearance != aOther.mAppearance
|
||||
|| mOrient != aOther.mOrient
|
||||
|| mClipFlags != aOther.mClipFlags || !mClip.IsEqualInterior(aOther.mClip))
|
||||
NS_UpdateHint(hint, NS_CombineHint(nsChangeHint_ReflowFrame, nsChangeHint_RepaintFrame));
|
||||
NS_UpdateHint(hint, NS_CombineHint(nsChangeHint_AllReflowHints,
|
||||
nsChangeHint_RepaintFrame));
|
||||
|
||||
if (mOpacity != aOther.mOpacity) {
|
||||
NS_UpdateHint(hint, nsChangeHint_UpdateOpacityLayer);
|
||||
|
@ -955,7 +955,8 @@ struct nsStyleOutline {
|
||||
void RecalcData(nsPresContext* aContext);
|
||||
nsChangeHint CalcDifference(const nsStyleOutline& aOther) const;
|
||||
static nsChangeHint MaxDifference() {
|
||||
return NS_CombineHint(nsChangeHint_ReflowFrame, nsChangeHint_RepaintFrame);
|
||||
return NS_CombineHint(nsChangeHint_AllReflowHints,
|
||||
nsChangeHint_RepaintFrame);
|
||||
}
|
||||
|
||||
nsStyleCorners mOutlineRadius; // [reset] coord, percent, calc
|
||||
@ -2203,7 +2204,7 @@ struct nsStyleSVG {
|
||||
nsChangeHint CalcDifference(const nsStyleSVG& aOther) const;
|
||||
static nsChangeHint MaxDifference() {
|
||||
return NS_CombineHint(NS_CombineHint(nsChangeHint_UpdateEffects,
|
||||
nsChangeHint_ReflowFrame),
|
||||
nsChangeHint_AllReflowHints),
|
||||
nsChangeHint_RepaintFrame);
|
||||
}
|
||||
|
||||
@ -2260,7 +2261,7 @@ struct nsStyleSVGReset {
|
||||
nsChangeHint CalcDifference(const nsStyleSVGReset& aOther) const;
|
||||
static nsChangeHint MaxDifference() {
|
||||
return NS_CombineHint(NS_CombineHint(nsChangeHint_UpdateEffects,
|
||||
nsChangeHint_ReflowFrame),
|
||||
nsChangeHint_AllReflowHints),
|
||||
nsChangeHint_RepaintFrame);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user