servo/ports/servoshell/egl
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
..
android Add cli option for tracing-filter (#35370) 2025-02-08 07:10:12 +00:00
ohos Add cli option for tracing-filter (#35370) 2025-02-08 07:10:12 +00:00
android.rs libservo: Don't bounce ready-to-present frame notifications to the Constellation (#35369) 2025-02-12 08:25:58 +00:00
app_state.rs implement Touchevent prevent default behavior (#35031) 2025-02-17 10:50:04 +00:00
host_trait.rs libservo: Add a ClipboardDelegate and a default implementation (#35297) 2025-02-07 10:43:46 +00:00
log.rs ohos: Add basic IME and keyboard support (#34188) 2024-11-15 15:04:48 +00:00
mod.rs Migrate Android and OHOS ports to the delegate API (#35315) 2025-02-06 14:21:29 +00:00
ohos.rs libservo: Add a ClipboardDelegate and a default implementation (#35297) 2025-02-07 10:43:46 +00:00