[Pointer Events] Make `pointerId` a mandatory parameter when creating Widget Mouse Events and its subclasses.

NEW
Unassigned

Status

()

Core
Event Handling
P3
normal
a year ago
3 months ago

People

(Reporter: HoPang, Unassigned)

Tracking

(Blocks: 1 bug)

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

a year ago
Now, we always first create a widget mouse event (and its sub-classes), and then assign the pointerId afterward. In this pattern, we largely rely on the default value to assign the value for us, and it's error-prone.

Since `pointerId` is basically comes from the platform, I suggest we should make `pointerId` a const member in widget mouse event and its sub-classes, and only assign the value on its creation. By doing this, we can make the code way more clear.
(Reporter)

Comment 1

a year ago
Here is the WIP patches, where they can be successfully compiled on Windows, Osx, and Linux, and work well on my surface pro. Any comment and suggestion are greatly appreciated :)

https://github.com/driftersprt/gecko-dev/commits/1305346
Assignee: nobody → bhsu
(Reporter)

Updated

a year ago
Blocks: 1299209
(Reporter)

Updated

a year ago
No longer blocks: 1299209
(Reporter)

Updated

a year ago
Depends on: 1290944
(Reporter)

Updated

a year ago
No longer depends on: 1290944
Priority: -- → P2

Updated

4 months ago
Assignee: bhsu → nobody

Updated

3 months ago
Blocks: 822898
Priority: P2 → P3
You need to log in before you can comment on or make changes to this bug.