Open Bug 1305346 Opened 8 years ago Updated 3 years ago

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

Categories

(Core :: DOM: UI Events & Focus Handling, enhancement, P3)

enhancement

Tracking

()

People

(Reporter: bhsu, Unassigned)

References

(Blocks 1 open bug)

Details

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.
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
Blocks: 1299209
No longer blocks: 1299209
Depends on: 1290944
No longer depends on: 1290944
Priority: -- → P2
Assignee: bhsu → nobody
Blocks: 822898
Priority: P2 → P3
See Also: → 1505321
Assignee: nobody → echen
Component: Event Handling → User events and focus handling

Not actively work on this.

Severity: normal → N/A
Type: defect → enhancement
Assignee: echen → nobody
Blocks: pointerevent
No longer blocks: 822898
You need to log in before you can comment on or make changes to this bug.