Closed Bug 1542019 Opened 6 years ago Closed 6 years ago

Split the eDispatchToContent flag into three

Categories

(Core :: Panning and Zooming, task, P3)

task

Tracking

()

RESOLVED FIXED
mozilla68
Tracking Status
firefox68 --- fixed

People

(Reporter: kats, Assigned: kats)

References

Details

Attachments

(1 file)

Right now we set the eDispatchToContent hit-test flag for two reasons:

  • There is an element with APZ-aware listeners, so APZ doesn't know if it should use the event for async scrolling until main thread runs the listener
  • There is an area for which APZ doesn't know which scrollframe to target, so it needs to ask the main thread.

We should split the eDispatchToContent into two flags to reflect these two use cases.

Type: defect → task
Priority: -- → P3

We should actually also split out the "inactive scrollframe" case since it's logically different.

Assignee: nobody → kats
Summary: Split the eDispatchToContent flag into two → Split the eDispatchToContent flag into three

This patch extracts two additional CompositorHitTestInfo flags from the
eDispatchToContent flag; eApzAwareListeners for elements that have
APZ-aware listeners, and eInactiveScrollframe for inactive scrollframe
or unlayerized scrollthumbs. The eDispatchToContent is then renamed to
eIrregularArea to reflect the fact that it is used for irregular-shaped
areas that require main-thread hit-testing.

Additionally, it is important to note that when using the non-WebRender
codepath, all three of these flags still end up gettings squashed into
the "dispatch to content" region on the EventRegions; when APZ
reconstructs a CompositorHitTestInfo it will turn anything in this
region back into an eIrregularArea. So this is a lossy round-trip
conversion for the non-WebRender case. However it should still result in
correct behaviour because the semantics of eIrregularArea result in APZ
relying on the main-thread to do hit-testing and so any APZ-aware
listeners and inactive scrollframes are also handled by the main-thread.

There is an area for which APZ doesn't know which scrollframe to target, so it needs to ask the main thread.

When hit-testing out-of-process iframes, how can asking the main thread work, considering that the main thread relies on APZ for hit-testing in the out-of-process iframes case?

(In reply to Henri Sivonen (:hsivonen) from comment #4)

There is an area for which APZ doesn't know which scrollframe to target, so it needs to ask the main thread.

When hit-testing out-of-process iframes, how can asking the main thread work, considering that the main thread relies on APZ for hit-testing in the out-of-process iframes case?

I see there's bug 1541589 for this.

Pushed by kgupta@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/a5fe792348ed Split the dispatch-to-content flag into three. r=botond,hsivonen
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: