Closed Bug 1664419 Opened 4 years ago Closed 4 years ago

need to suppress scrollbar repaint when seting visual viewport offset

Categories

(Core :: Layout: Scrolling and Overflow, defect)

defect

Tracking

()

RESOLVED FIXED
82 Branch
Tracking Status
firefox82 --- fixed

People

(Reporter: tnikkel, Assigned: tnikkel)

References

Details

Attachments

(1 file)

In ScrollFrameHelper::ScrollToImpl we suppress repainting scrollbars when calling UpdateScrollbarPosition if we've decided not to schedule a paint (because we are sending a pending scroll update instead). Otherwise we repaint which is what we are trying to avoid.

The desktop zooming scrollbars code added a call to UpdateScrollbarPosition in SetVisualViewportOffset because the vv offset is what determines the scrollbar position, no longer the layout scroll position. This means that we can trigger a repaint via that path, and there is a test that checks that we don't.

In ScrollFrameHelper::ScrollToImpl we suppress repainting scrollbars when calling UpdateScrollbarPosition if we've decided not to schedule a paint (because we are sending a pending scroll update instead). Otherwise we repaint which is what we are trying to avoid.

The desktop zooming scrollbars code added a call to UpdateScrollbarPosition in SetVisualViewportOffset because the vv offset is what determines the scrollbar position, no longer the layout scroll position. This means that we can trigger a repaint via that path, and there is a test that checks that we don't.

This patch moves the SetVisualViewportOffset call to just after the code that determines if we need to schedule a paint (it was just before it), and then add the AutoScrollbarRepaintSuppression class.

Severity: -- → S3
Status: NEW → ASSIGNED
Pushed by tnikkel@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/9dd986a71b71
Need to suppress scrollbar repaint when seting visual viewport offset. r=kats,botond
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 82 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: