Files
servo/components/webdriver_server
Euclid Ye 7c0d0486b6 webdriver: Do not remove id from input_state_table if it still in input_cancel_list (#40483)
There ~was~ has been a
[bug](https://github.com/servo/servo/issues/37579#issuecomment-2990762713)
in spec. Our workaround has been: for every keyup/pointerup, we remove a
corresponding entry in `input_cancel_list`.

But we missed one thing: it is possible to only dispatch keydown in
[element send
keys](https://w3c.github.io/webdriver/#dfn-element-send-keys). In that
case, we inserted an entry into `input_cancel_list` but removes Id from
`input_state_table` in the end. This causes a panic with a followup
[release actions](https://w3c.github.io/webdriver/#dfn-release-actions).

This PR makes sure we only remove if it is safe.

Testing: CI no longer panic on
dc9696c27d/components/webdriver_server/actions.rs (L338)
for some testdriver tests.

Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
2025-11-08 00:10:14 +00:00
..