servo/ports/servoshell/desktop
Bi Fuguo 3fe42a0b5a
implement Touchevent prevent default behavior (#35031)
* implement Touchevent prevent default behavior

* The status change logic of the `TouchHandler` is changed.
> The `WaitingForScript` state is canceled. TouchAction can be identified
  based on the current touch type and numbers if touch points.
* Sends current event to script thread along with recognized `TouchAction`.
> After dispatch event, script thread sends a `TouchEventProcess(EventResult)`
  message to main thread. If the event is set to `DefaultAllowed`, the
  corresponding `TouchAction` information is added.
* After receiving `DefaultAllowed(TouchAction)` message, main thread executes corresponding action.
> `DefaultPrevented(TouchEventType)` is received. Use `prevent_click` to mark
  that the default `Click` is blocked, and `prevent_move` to mark that the
  default `Scroll` and `Zoom` are blocked. In this way, all TouchActions
  implement preventDefault.
Signed-off-by: Bi Fuguo <1782765876@qq.com>

* fix some suggestions

* support preventDefault fling
* move `TouchAction` to share touch directory
* check preventDefault everytime when touch
* fix zoom ineffective

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

* fix some suggestions

rename on_event_processed to  on_touch_event_processed
clear unused features

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

* Optimizes pan performance by continuously sliding without waiting for the eventhandler.

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

* resolve conflict

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

---------

Signed-off-by: Bi Fuguo <1782765876@qq.com>
Signed-off-by: kongbai1996 <1782765876@qq.com>
2025-02-17 10:50:04 +00:00
..
protocols Create HttpStatus to safely deal with HTTP responses status. (#33581) 2024-09-29 18:23:48 +00:00
app.rs libservo: Expose an OffscreenRenderingContext and use it for servoshell (#35465) 2025-02-17 08:35:05 +00:00
app_state.rs implement Touchevent prevent default behavior (#35031) 2025-02-17 10:50:04 +00:00
cli.rs Add cli option for tracing-filter (#35370) 2025-02-08 07:10:12 +00:00
dialog.rs servoshell: Port input dialog code to use egui intead of tinyfiledialogs (#35464) 2025-02-14 15:02:39 +00:00
egui_glue.rs chore: remove WindowMethods::rendering_context (#34780) 2025-01-01 08:26:23 +00:00
embedder.rs Finish the integration of webxr into the Cargo workspace (#35229) 2025-01-31 16:41:57 +00:00
events_loop.rs servoshell: Port desktop servoshell to use delegate API (#35284) 2025-02-06 07:33:31 +00:00
gamepad.rs libservo: Expose a single InputEvent type and pass it to script (#35430) 2025-02-12 17:07:15 +00:00
geometry.rs Use webrender_api::units::DevicePixel rather than style_traits::DevicePixel unless interfacing with Stylo (#34353) 2024-11-25 23:42:04 +00:00
headed_window.rs implement Touchevent prevent default behavior (#35031) 2025-02-17 10:50:04 +00:00
headless_window.rs libservo: Expose an OffscreenRenderingContext and use it for servoshell (#35465) 2025-02-17 08:35:05 +00:00
keyutils.rs servoshell: Clean up keyboard event conversion a little (#32564) 2024-06-19 19:38:56 +00:00
minibrowser.rs libservo: Expose an OffscreenRenderingContext and use it for servoshell (#35465) 2025-02-17 08:35:05 +00:00
mod.rs servoshell: Port desktop servoshell to use delegate API (#35284) 2025-02-06 07:33:31 +00:00
tracing.rs servoshell: Port desktop servoshell to use delegate API (#35284) 2025-02-06 07:33:31 +00:00
window_trait.rs libservo: Expose an OffscreenRenderingContext and use it for servoshell (#35465) 2025-02-17 08:35:05 +00:00