зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1475033 part 1 - Rename nsChangeHint_CSSOverflowChange to nsChangeHint_ScrollbarChange. r=heycam
Prepare for scrollbar-width which should trigger the same kind of change. MozReview-Commit-ID: 1n9Y9bobBkJ --HG-- extra : rebase_source : 520b78dec4daca5050e0cc7fff4ec68fa36663c5
This commit is contained in:
Родитель
0e96aef5c8
Коммит
ed1e3e1f9e
|
@ -599,7 +599,7 @@ RestyleManager::ChangeHintToString(nsChangeHint aHint)
|
|||
"NeutralChange", "InvalidateRenderingObservers",
|
||||
"ReflowChangesSizeOrPosition", "UpdateComputedBSize",
|
||||
"UpdateUsesOpacity", "UpdateBackgroundPosition",
|
||||
"AddOrRemoveTransform", "CSSOverflowChange",
|
||||
"AddOrRemoveTransform", "ScrollbarChange",
|
||||
"UpdateWidgetProperties", "UpdateTableCellSpans",
|
||||
"VisibilityChange"
|
||||
};
|
||||
|
@ -1355,11 +1355,11 @@ RestyleManager::ProcessRestyledFrames(nsStyleChangeList& aChangeList)
|
|||
nsPresContext* presContext = PresContext();
|
||||
nsCSSFrameConstructor* frameConstructor = presContext->FrameConstructor();
|
||||
|
||||
// Handle nsChangeHint_CSSOverflowChange, by either updating the
|
||||
// Handle nsChangeHint_ScrollbarChange, by either updating the
|
||||
// scrollbars on the viewport, or upgrading the change hint to frame-reconstruct.
|
||||
for (nsStyleChangeData& data : aChangeList) {
|
||||
if (data.mHint & nsChangeHint_CSSOverflowChange) {
|
||||
data.mHint &= ~nsChangeHint_CSSOverflowChange;
|
||||
if (data.mHint & nsChangeHint_ScrollbarChange) {
|
||||
data.mHint &= ~nsChangeHint_ScrollbarChange;
|
||||
bool doReconstruct = true; // assume the worst
|
||||
|
||||
// Only bother with this if we're html/body, since:
|
||||
|
|
|
@ -222,14 +222,16 @@ enum nsChangeHint : uint32_t {
|
|||
nsChangeHint_AddOrRemoveTransform = 1 << 27,
|
||||
|
||||
/**
|
||||
* Indicates that the overflow-x and/or overflow-y property changed.
|
||||
* Indicates that the presence of scrollbars might have changed.
|
||||
*
|
||||
* This happens when at least one of overflow-{x,y} properties changed.
|
||||
*
|
||||
* In most cases, this is equivalent to nsChangeHint_ReconstructFrame. But
|
||||
* in some special cases where the change is really targeting the viewport's
|
||||
* scrollframe, this is instead equivalent to nsChangeHint_AllReflowHints
|
||||
* (because the viewport always has an associated scrollframe).
|
||||
*/
|
||||
nsChangeHint_CSSOverflowChange = 1 << 28,
|
||||
nsChangeHint_ScrollbarChange = 1 << 28,
|
||||
|
||||
/**
|
||||
* Indicates that nsIFrame::UpdateWidgetProperties needs to be called.
|
||||
|
@ -356,7 +358,7 @@ inline nsChangeHint operator^=(nsChangeHint& aLeft, nsChangeHint aRight)
|
|||
#define nsChangeHint_Hints_NeverHandledForDescendants ( \
|
||||
nsChangeHint_BorderStyleNoneChange | \
|
||||
nsChangeHint_ChildrenOnlyTransform | \
|
||||
nsChangeHint_CSSOverflowChange | \
|
||||
nsChangeHint_ScrollbarChange | \
|
||||
nsChangeHint_InvalidateRenderingObservers | \
|
||||
nsChangeHint_RecomputePosition | \
|
||||
nsChangeHint_UpdateBackgroundPosition | \
|
||||
|
|
|
@ -3771,7 +3771,7 @@ nsStyleDisplay::CalcDifference(const nsStyleDisplay& aNewData) const
|
|||
|
||||
if (mOverflowX != aNewData.mOverflowX
|
||||
|| mOverflowY != aNewData.mOverflowY) {
|
||||
hint |= nsChangeHint_CSSOverflowChange;
|
||||
hint |= nsChangeHint_ScrollbarChange;
|
||||
}
|
||||
|
||||
/* Note: When mScrollBehavior, mScrollSnapTypeX, mScrollSnapTypeY,
|
||||
|
@ -3808,7 +3808,7 @@ nsStyleDisplay::CalcDifference(const nsStyleDisplay& aNewData) const
|
|||
// XXX What is the minimum hint to ensure mShapeInfo is regenerated in
|
||||
// the next reflow?
|
||||
hint |= nsChangeHint_ReflowHintsForFloatAreaChange |
|
||||
nsChangeHint_CSSOverflowChange;
|
||||
nsChangeHint_ScrollbarChange;
|
||||
} else {
|
||||
// shape-outside or shape-margin or shape-image-threshold changed,
|
||||
// but we don't need to reflow because we're not floating.
|
||||
|
|
Загрузка…
Ссылка в новой задаче