Closed Bug 1686146 Opened 3 years ago Closed 3 years ago

Hit testing during composite is misaligned when overscroll is active

Categories

(Core :: Panning and Zooming, defect, P2)

defect

Tracking

()

VERIFIED FIXED
89 Branch
Tracking Status
firefox89 --- verified
firefox90 --- verified

People

(Reporter: sawyerbergeron, Assigned: botond)

References

(Blocks 1 open bug)

Details

Attachments

(3 files)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:86.0) Gecko/20100101 Firefox/86.0

Steps to reproduce:

  1. Apply https://phabricator.services.mozilla.com/D100283
  2. Enable apz.overscroll.enabled
  3. Use a touchpad to cause an overscroll animation at the top of the page
  4. Use a mouse (while holding overscroll) to hover close to the top of the view within the overscroll gutter

Actual results:

Any events (hover, click) over the overscroll gutter are dispatched to their on-screen position - overscroll amount. In extreme cases, hovering in the gutter at the top of a page may allow events to be dispatched to the browser tab bar.

Expected results:

Any events within overscroll gutter should be gracefully handled and should not dispatch events to unexpected regions.

Blocks: overscroll
Component: Untriaged → Panning and Zooming
Product: Firefox → Core
Severity: -- → S3
Priority: -- → P3

I'm going to take this as this is one of the blockers of the initial release of overscroll.

Assignee: nobody → botond
Priority: P3 → P2

I've been thinking about how to test this. We cannot use a reftest because reftests are not suited for testing hit-testing issues. However, the "test async scroll offset" that's set by reftest-async-scroll is also exposed to mochitests via nsIDOMWindowUtils.setAsyncScrollOffset(), so we can reuse the work being done in bug 1697712 to allow getting into overscroll via the "test async scroll offset", to write a mochitest to exercise this.

Depends on: 1697712

I've started to exercise this scenario in a mochitest and work on fixing it, and unfortunately I've discovered that my earlier assessment that the APZ hit-test already gives the right results and it's just the Gecko dispatch that needs to be fixed, was only correct for the root scroll frame.

For subframes, we need to fix the APZ hit-test as well, including WebRender and non-WR pieces. (And the WR piece will require changes to Rust code, including sending the overscroll to WR as a separate quantity.)

I think I'm going to split off the subframe case into a separate bug, and work on fixing the root scroll frame case first, as that's easier.

Depends on D109187

Blocks: 1699868

(In reply to Botond Ballo [:botond] from comment #3)

I think I'm going to split off the subframe case into a separate bug, and work on fixing the root scroll frame case first, as that's easier.

Split off the subframe case into bug 1699868.

Blocks: 1699880
Depends on: 1700251
Pushed by bballo@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/5d5c3513c608
Add a test exercising hit-testing when the RCD-RSF is overscrolled. r=tnikkel
https://hg.mozilla.org/integration/autoland/rev/f27634147d1b
Fix an incorrect comment. r=tnikkel
https://hg.mozilla.org/integration/autoland/rev/42906f68ffd5
Do not dispatch events over the overscroll gutter to Gecko. r=tnikkel
Status: UNCONFIRMED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 89 Branch
Depends on: 1704070

Verified fixed as Bug 1704070 is also fixed in beta 89.0b2 (20210420191345) and Nightly 90.0a1 (2021-04-20) (20210420213949) on MacOS 11.2.3 and Mac mini M1 11.0.1.

Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: