Closed Bug 1967878 Opened 5 months ago Closed 4 months ago

Make `PointerEventHandler` manage synthesizing `ePointerMove` per `pointerId`

Categories

(Core :: DOM: Events, defect)

defect

Tracking

()

RESOLVED FIXED
141 Branch
Tracking Status
firefox141 --- fixed

People

(Reporter: masayuki, Assigned: masayuki)

References

(Blocks 1 open bug)

Details

Attachments

(3 files)

Bug 1966551 will start synthesizing ePointerMove when eMouseMove is synthesized. However, that means that only the last pointer which caused the synthesized eMouseMove will work as Pointer Events spec defined. For supporting multiple hoverable pointers, like pen or WebDriver's synthetic multiple mice, we should store the last position of all pointers and synthesize ePointerMove for all pointers.

Assignee: nobody → masayuki
Status: NEW → ASSIGNED
No longer blocks: 1966551
Depends on: 1966551

PointeInfo will have more members so that the bool should be
bit field to keep its size small as far as possible.

And also the constructor takes bool arguments too many. Therefore,
it's hard to read the callers. Therefore, this changes them to
enum classes.

Finally, some callers copies WidgetPointerEvent data to PointerInfo.
So, taking const WidgetPointerEvent& makes the caller side simpler.

Pointer Events should be handled per pointerId. However, currently,
we dispatch pointer boundary events at a layout change only for the
last pointer which updated the last mouse location because we dispatch
a synthesized ePointerMove as a preceding pointer event of a synthetic
eMouseMove.

This patch makes PointerInfo store the last pointer state for each
pointerId. Then, the synthesizer can dispatch synthetic
ePointerMove for any active pointerIds. Finally, PresShell can
stop handling a preceding ePointerMove for a synthetic eMouseMove.

It does not make sense that PresShell has members to store all data
which are required for dispatching a synthetic eMouseMove.

This patch makes PointerEventHandler store the most last mouse event
data except pointerId. Then, PresShell starts storing only the
last pointerId to skip more expensive checks whether the PresShell
actually needs to dispatch a synthesized eMouseMove.

This makes it easier to fix bug 749553.

Pushed by masayuki@d-toybox.com: https://github.com/mozilla-firefox/firefox/commit/f7dce0b1c623 https://hg.mozilla.org/integration/autoland/rev/0cef7d5b75f8 part 1: Clean up `PointerInfo` r=edgar,dom-core https://github.com/mozilla-firefox/firefox/commit/eb51dedf6da7 https://hg.mozilla.org/integration/autoland/rev/7cca02201479 part 2: Make `PresShell` synthesize `ePointerMove` separately from `eMouseMove` r=edgar,smaug,dom-core https://github.com/mozilla-firefox/firefox/commit/13f2c9c94a1a https://hg.mozilla.org/integration/autoland/rev/dd7642eeb99d part 3: Make `PointerEventHandler` store the last mouse state instead of root `PresShell`s r=edgar
Status: ASSIGNED → RESOLVED
Closed: 4 months ago
Resolution: --- → FIXED
Target Milestone: --- → 141 Branch
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/53215 for changes under testing/web-platform/tests
Upstream PR merged by moz-wptsync-bot
QA Whiteboard: [qa-triage-done-c142/b141]
Regressions: 1979332
Blocks: 1982165, 1982541
No longer depends on: 1982541, 1982165
Regressions: 1980674
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: