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

NEW
Assigned to

Status

()

P3
normal
2 years ago
10 days ago

People

(Reporter: bhsu, Assigned: edgar)

Tracking

(Blocks: 1 bug)

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

2 years 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

2 years 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

2 years ago
Blocks: 1299209
(Reporter)

Updated

2 years ago
No longer blocks: 1299209
(Reporter)

Updated

2 years ago
Depends on: 1290944
(Reporter)

Updated

2 years ago
No longer depends on: 1290944
Priority: -- → P2
Assignee: bhsu → nobody
Blocks: 822898
Priority: P2 → P3
See Also: → bug 1505321
(Assignee)

Updated

10 days ago
Assignee: nobody → echen
You need to log in before you can comment on or make changes to this bug.