Closed Bug 1668905 Opened 4 years ago Closed 4 years ago

Get rid of dummy event listener in nsRangeFrame

Categories

(Core :: Layout: Form Controls, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
83 Branch
Tracking Status
firefox83 --- fixed

People

(Reporter: kats, Assigned: kats)

References

Details

Attachments

(1 file)

There's a dummy event listener registered in nsRangeFrame whose sole purpose is to mark the frame apz-aware, so that APZ knows it handles touch events. However we have a better mechanism to do this (vs when the code was originally written). Instead of the event listener, we can just set the eApzAwareListeners flag on the CompositorHitTestInfo item directly.

I verified that if we remove the dummy event listener, then touch-dragging the slider on an <input type=range> does NOT prevent the page from scrolling simultaneously. However setting the flag on the CompositorHitTestInfo does prevent the page scrolling, as I would expect. I don't know if there's an automated test for this but it seems kinda hard to write one.

The purpose of the dummy listener was to make APZ aware of the fact that
the range frame handles touch events without having any other explicit touch
listener. But we can do that more simply/cheaply by setting the eApzAwareListener
flag directly without the dummy listener.

Pushed by kgupta@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/2e3686ee35ae Replace the nsRangeFrame dummy listener with setting a flag on CompositorHitTestInfo directly. r=miko
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 83 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: