diff --git a/layout/base/RestyleManager.cpp b/layout/base/RestyleManager.cpp index c4e682668b38..aba94f10f541 100644 --- a/layout/base/RestyleManager.cpp +++ b/layout/base/RestyleManager.cpp @@ -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: diff --git a/layout/base/nsChangeHint.h b/layout/base/nsChangeHint.h index a951e3a8fe3e..4f6afe2dd180 100644 --- a/layout/base/nsChangeHint.h +++ b/layout/base/nsChangeHint.h @@ -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 | \ diff --git a/layout/style/nsStyleStruct.cpp b/layout/style/nsStyleStruct.cpp index 6cd803ff5021..2f1a9be2fb55 100644 --- a/layout/style/nsStyleStruct.cpp +++ b/layout/style/nsStyleStruct.cpp @@ -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.