No issue - Refactor nsStyleUIReset::CalcDifference to accumulate change hints

This was patched in m-c via an unrelated bug (bug 1370034).

Noted by dbaron in this comment: https://bugzilla.mozilla.org/show_bug.cgi?id=1370034#c69
This commit is contained in:
Francis Dominic Fajardo 2025-06-26 17:24:35 +08:00 committed by roytam1
commit 2c704d1b8e

View file

@ -4025,32 +4025,36 @@ nsStyleUIReset::~nsStyleUIReset()
nsChangeHint
nsStyleUIReset::CalcDifference(const nsStyleUIReset& aNewData) const
{
nsChangeHint hint = nsChangeHint(0);
// ignore mIMEMode
if (mForceBrokenImageIcon != aNewData.mForceBrokenImageIcon) {
return nsChangeHint_ReconstructFrame;
hint |= nsChangeHint_ReconstructFrame;
}
if (mWindowShadow != aNewData.mWindowShadow) {
// We really need just an nsChangeHint_SyncFrameView, except
// on an ancestor of the frame, so we get that by doing a
// reflow.
return NS_STYLE_HINT_REFLOW;
hint |= NS_STYLE_HINT_REFLOW;
}
if (mUserSelect != aNewData.mUserSelect) {
return NS_STYLE_HINT_VISUAL;
hint |= NS_STYLE_HINT_VISUAL;
}
if (mWindowDragging != aNewData.mWindowDragging) {
return nsChangeHint_SchedulePaint;
hint |= nsChangeHint_SchedulePaint;
}
if (mScrollbarWidth != aNewData.mScrollbarWidth) {
// For scrollbar-width change, we need some special handling similar
// to overflow properties. Specifically, we may need to reconstruct
// the scrollbar or force reflow of the viewport scrollbar.
return nsChangeHint_ScrollbarChange;
hint |= nsChangeHint_ScrollbarChange;
}
return nsChangeHint(0);
return hint;
}
//-----------------------