servo/components/shared
Bi Fuguo f3a8bf8ca2
Touch handler: Fix race condition and rate-limit move events (#35537)
* TouchSequenceInfo is added to store information about a touch sequence.
  For details about TouchSequenceInfo, see the code comments.
The handling_touch_move attribute is added to the TouchHandler, indicating that the script is processing the touch move event.
  When handling_touch_move is set to true, the touch move event does not need to be sent to the script thread.

Signed-off-by: kongbai1996 <1782765876@qq.com>

* move touch state, active_touch_point and handling_touch_move to TouchSequenceInfo form TouchHandler.
remove TouchSequenceInfo end_sequence property, add Finished state mark sequence end.
if preventDefault on touchup, do not prevent Fling.

Signed-off-by: kongbai1996 <1782765876@qq.com>

* Refactor Touchhandler

- Add a newtype wrapper for the TouchSequenceId
- Move more state back into the TouchSequenceState
- Rename TouchAction to TouchMoveAction,
  since it only covers immediate actions now.
  Everything else is handled via state, since
  it needs to wait on the handler.

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>

* Fix test-tidy

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>

* Fix clippy missing-default lint

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>

* Fix remaining clippy lints

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>

* Remove accidental committed test file

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>

* Remove wrong todo comment

(move events that are sent to script are just raw  touchpoints,
 no merging needed)

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>

* Fix preventdefault after long touch_down handler

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>

---------

Signed-off-by: kongbai1996 <1782765876@qq.com>
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
Co-authored-by: Jonathan Schwender <schwenderjonathan@gmail.com>
2025-02-25 07:13:16 +00:00
..
background_hang_monitor script: add skeleton implementation of FontFace API (#35262) 2025-02-19 05:50:01 +00:00
base deps: Upgrade to webrender@0.66 (#35325) 2025-02-07 11:57:26 +00:00
bluetooth Include WebViewId into EmbedderMsg variants where possible (#35211) 2025-01-30 11:15:35 +00:00
canvas Use surfman with glow bindings (take II) (#35422) 2025-02-13 07:26:38 +00:00
compositing Touch handler: Fix race condition and rate-limit move events (#35537) 2025-02-25 07:13:16 +00:00
devtools Inform the devtools about shadow roots on a node (#35294) 2025-02-05 13:16:36 +00:00
embedder Touch handler: Fix race condition and rate-limit move events (#35537) 2025-02-25 07:13:16 +00:00
fonts script: add skeleton implementation of FontFace API (#35262) 2025-02-19 05:50:01 +00:00
net Update to rust 1.85 (#35628) 2025-02-24 17:44:35 +00:00
profile script: add skeleton implementation of FontFace API (#35262) 2025-02-19 05:50:01 +00:00
script Touch handler: Fix race condition and rate-limit move events (#35537) 2025-02-25 07:13:16 +00:00
script_layout deps: Remove some unused Cargo.toml (#35466) 2025-02-14 15:33:14 +00:00
webrender libservo: Move GL acclerated media setup out of RenderingContext and simplify it (#35553) 2025-02-20 13:52:18 +00:00
webxr deps: Remove some unused Cargo.toml (#35466) 2025-02-14 15:33:14 +00:00