script: pointer events: pointerenter, pointerout, pointerleave, pointerover#42736
Conversation
|
I'm reviewing this and will finalize it tomorrow. |
yezhizhen
left a comment
There was a problem hiding this comment.
Will do another round for doucument_event_handler.rs.
| let pressure = if event_type == "pointerup" || event_type == "pointercancel" { | ||
| // Pressure is 0.5 for active touches, 0.0 for up/cancel/out/leave | ||
| let pressure = if event_type == "pointerup" || | ||
| event_type == "pointercancel" || |
There was a problem hiding this comment.
The values of the following properties of the pointercancel event MUST match the values of the last dispatched pointer event with the same pointerId
I don't think this should be 0.
There was a problem hiding this comment.
I guess we can leave this as a follow-up. Just add a TODO. Btw you haven't pushed your new commit yet.
There was a problem hiding this comment.
Let's see if I find time to fix that later today :)
There was a problem hiding this comment.
This doesn't seem to be covered by any tests tho.
2e815ce to
269a42f
Compare
|
🔨 Triggering try run (#22517549670) for Linux (WPT) |
|
Test results for linux-wpt from try job (#22517549670): Flaky unexpected result (27)
Stable unexpected results that are known to be intermittent (20)
|
|
✨ Try run (#22517549670) succeeded. |
There was a problem hiding this comment.
The values of the following properties of the pointercancel event MUST match the values of the last dispatched pointer event with the same pointerId
I don't think this should be 0.
I see that you addressed this in the last commit. But it does not change any test results. Do you know why?
If not, maybe we should just revert the last commit for now, and all the comments below does not matter.
| can_gc, | ||
| ) | ||
| } else { | ||
| // Fallback: no prior event stored (shouldn't happen in practice) |
There was a problem hiding this comment.
Let's leave a debug_assertion here.
| let pe = pointer_touch.to_pointer_event( | ||
| window, | ||
| pointer_event_name, | ||
| pointer_id, | ||
| is_primary, | ||
| input_event.active_keyboard_modifiers, | ||
| event.is_cancelable(), | ||
| Some(hit_test_result.point_in_node), | ||
| can_gc, | ||
| ); |
There was a problem hiding this comment.
| let pe = pointer_touch.to_pointer_event( | |
| window, | |
| pointer_event_name, | |
| pointer_id, | |
| is_primary, | |
| input_event.active_keyboard_modifiers, | |
| event.is_cancelable(), | |
| Some(hit_test_result.point_in_node), | |
| can_gc, | |
| ); |
You can inline this.
| }, | ||
| ); | ||
|
|
||
| pe |
| let pressure = if event_type == "pointerup" || event_type == "pointercancel" { | ||
| // Pressure is 0.5 for active touches, 0.0 for up/cancel/out/leave | ||
| let pressure = if event_type == "pointerup" || | ||
| event_type == "pointercancel" || |
There was a problem hiding this comment.
This doesn't seem to be covered by any tests tho.
pointerover Signed-off-by: webbeef <[email protected]>
269a42f to
e7e9ada
Compare
…erover (servo#42736) Adds support for more pointer events: pointerenter, pointerout, pointerleave, pointerover Also add global event handlers that were missing. Testing: WPT expectations are updated. cc @yezhizhen Signed-off-by: webbeef <[email protected]>
…erover (servo#42736) Adds support for more pointer events: pointerenter, pointerout, pointerleave, pointerover Also add global event handlers that were missing. Testing: WPT expectations are updated. cc @yezhizhen Signed-off-by: webbeef <[email protected]>
Adds support for more pointer events: pointerenter, pointerout, pointerleave, pointerover
Also add global event handlers that were missing.
Testing: WPT expectations are updated.
cc @yezhizhen