Closed Bug 1699868 Opened 4 years ago Closed 4 years ago

Hit-testing over the overscroll gutter of a subframe is incorrect (non-WebRender edition)

Categories

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

defect

Tracking

()

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

People

(Reporter: botond, Assigned: botond)

References

(Blocks 1 open bug)

Details

Attachments

(5 files)

In bug 1686146, I am fixing hit-testing over the overscroll gutter of the root scroll frame.

Hit-testing over the overscroll gutter of subframes requires additional fixes (likely separate ones for WR and non-WR), which I'm going to handle in this bug.

Depends on: 1686146
No longer depends on: 1697712

Attached is a test exercising the subframe case. It does not pass yet.

As mentioned, this is going to require separate fixes for WR and non-WR, with the WR fix being more involved (requiring changes to Rust code and such).

I'm going to fix the non-WR case in this bug, and do WR in a follow-up.

Summary: Hit-testing over the overscroll gutter of a subframe is incorrect → Hit-testing over the overscroll gutter of a subframe is incorrect (non-WebRender edition)
Blocks: 1701831

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

I'm going to fix the non-WR case in this bug, and do WR in a follow-up.

The WR follow-up is bug 1701831.

Attachment #9211929 - Attachment description: Bug 1699868 - Add a test exercising hit-testing on an overscrolled subframe → Bug 1699868 - Add a test exercising hit-testing on an overscrolled subframe. r=tnikkel

This patch makes two improvements:

  1. The function no longer assumes that the point, disregarding the
    overscroll transform, is inside the composition bounds. It now
    checks for this as well.

  2. A ParentLayerPoint overloaded is added, such that if we already
    have the hit-test point available in APZC coordinates, we don't
    have to convert it again.

Depends on D109986

This is the portion that applies to fixed layers as well, and we do want
the overscroll transform to apply to fixed layers.

Depends on D110182

If the function returns a transform that includes an overscroll transform,
the out-parameter is populated with the APZC which is the source of the overscroll.

This is mostly for convenience, to avoid the caller having to duplicate
the logic for this (which is somewhat nontrivial as the overscroll transform
is part of the visual component of the async transform, which for the root
content APZC is lifted from the APZC's node to the async zoom container node).

Depends on D110183

Pushed by bballo@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/9f742dfcf070 Add a test exercising hit-testing on an overscrolled subframe. r=tnikkel https://hg.mozilla.org/integration/autoland/rev/a9a93f421f57 Make IsInOverscrollGutter() a bit more general. r=tnikkel https://hg.mozilla.org/integration/autoland/rev/b935afc0bbd0 Consider the overscroll transform to be part of the visual component of the async transform. r=tnikkel https://hg.mozilla.org/integration/autoland/rev/4b9bae5ba565 Extend ComputeTransformForNode with an out-parameter. r=tnikkel https://hg.mozilla.org/integration/autoland/rev/1572f2bd328f If an event is over the overscroll gutter of a subframe, target the subframe. r=tnikkel
Regressions: 1701857

Verified fixed in beta 89.0b2 (20210420191345) and Nightly 90.0a1 (2021-04-20) (20210420213949) on MacOS 11.2.3 and M1 MacOS Big Sur 11.0.1. This was tested with webrender on/off.

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

Attachment

General

Created:
Updated:
Size: