servo/components/compositing
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
..
Cargo.toml libservo: Expose an OffscreenRenderingContext and use it for servoshell (#35465) 2025-02-17 08:35:05 +00:00
compositor.rs implement Touchevent prevent default behavior (#35031) 2025-02-17 10:50:04 +00:00
lib.rs libservo: Expose an OffscreenRenderingContext and use it for servoshell (#35465) 2025-02-17 08:35:05 +00:00
touch.rs implement Touchevent prevent default behavior (#35031) 2025-02-17 10:50:04 +00:00
tracing.rs compositor: Remove some unused messages to the compositor (#35223) 2025-01-30 09:21:23 +00:00
webview.rs ohos: Support resizing the surface (#35158) 2025-01-29 15:45:17 +00:00
windowing.rs libservo: Remove message-based API (#35366) 2025-02-10 04:14:16 +00:00