Closed Bug 1691878 Opened 4 years ago Closed 4 years ago

modify gfx/layers/apz/test/mochitest/helper_scrollframe_activation_on_load.html and test_layerization.html so they better test the activate all scroll frames code better

Categories

(Core :: Panning and Zooming, defect)

defect

Tracking

()

RESOLVED FIXED
87 Branch
Tracking Status
firefox87 --- fixed

People

(Reporter: tnikkel, Assigned: tnikkel)

References

Details

Attachments

(4 files)

In bug 1690433 we created code to activate all scroll frames, but deferred modifying these tests to more fully test this new code.

Depends on: 1675547
Depends on: 1691879
Keywords: leave-open
Pushed by tnikkel@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/5deab976ee9e Modify gfx/layers/apz/test/mochitest/helper_scrollframe_activation_on_load.html to test the activate all scroll frames code better. r=botond
Depends on: 1692991

The waitForScroll argument to promiseMoveMouseAndScrollWheelOver determines if we wait for a scroll event (if waitForScroll is true) or a wheel event (if waitForScroll is false). That might not be clear just from looking at it (where one might assume waitForScroll = false means no waiting at all).

In all cases but one in this test we wait for the scroll event.

When activateAllScrollFrames = false I guess this is enough to guarantee that any new metrics have been sent in a transaction. But it is not with activateAllScrollFrames = true for two reasons.

The first is that apz can handle the wheel event for any scroll frame immediately, it will send a repaint request to content which will scroll and send a scroll event. Content can then handle that scroll event without even sending it's current metrics in a transaction. So we need to wait for paints to be flushed.

But even that is not enough because we can wait for a paint but in several cases we need a minimal display port to be cleared to be full display port and that happens in PrepareForSetTargetAPZCNotification, which only happens after content gets the wheel event, which can happen after apz gets the wheel event, and after content gets the scroll event, and after content gets the scroll event and paints.

So we need to wait for the wheel event to rearch content and then wait for paints.

Depends on D104656

The comment in the test should explain.

Depends on D105407

Keywords: leave-open
Pushed by tnikkel@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/69d59541611a Modify gfx/layers/apz/test/mochitest/test_layerization.html to test the activate all scroll frames code better. r=botond https://hg.mozilla.org/integration/autoland/rev/bd7df680fbe4 Make test_layerization.html wait for the wheel events it sends and then paints instead of waiting for scroll events and no paints. r=botond https://hg.mozilla.org/integration/autoland/rev/bdf3cad16bb4 Make one bit of test_layerization.html loop until it passes. r=botond
Pushed by smolnar@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/b5ded5d1b5fa Fix eslint failure a=lint-fix CLOSED TREE
Pushed by smolnar@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/6236320fabcc Fix lint failure. a=lin-fix CLOSED TREE DONTBUILD
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: