| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
| |
Signed-off-by: kongbai1996 <1782765876@qq.com>
|
|
|
|
|
| |
pressed. (#36218)
Signed-off-by: kongbai1996 <1782765876@qq.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Migrate to 2024 edition
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Allow unsafe_op_in_unsafe_fn lint
This lint warns by default in the 2024
edition, but is *way* too noisy for servo.
We might enable it in the future, but not now.
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Compile using the 2024 edition
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
---------
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* The cancelable feature is optimized. If the cancelable feature is a non-cancelable feature, no message is sent back to the Compositor.
Add a warning log when prevent TouchsequenceInfo cannot be found.
Signed-off-by: kongbai1996 <1782765876@qq.com>
* fix Clippy Error Reported in the Pipeline.
Signed-off-by: kongbai1996 <1782765876@qq.com>
---------
Signed-off-by: kongbai1996 <1782765876@qq.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
touch cancels occur (#35763)
* Fix the problem that touchmove crashes occasionally.
Check whether touchSequenceInfo exists when touch_sequence_map is modified in on_touch_event_processed.
Signed-off-by: kongbai1996 <1782765876@qq.com>
* Remove outdated todo.
We already transition to Finished in `on_touch_cancel`
in the Touch handler, so we don't need any logic
in the event 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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Many types used directly in the `libservo` API are in the
`script_traits` crate, which was created to break circular dependencies.
Move all API exposed types to `embedder_traits` which now contains types
exposed via the `libservo` embedding API. Also expose these at the root
of the `libservo` `servo` crate so that the API won't break when they
move around in the future.
The idea with `embedder_traits` in the future is that it contains types
that are available throughout servo because they are used in the
embedding API and thus should have minimal dependencies on other Servo
crates (a bit like `base`).
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* fix click event when long time in touchstart
Signed-off-by: kongbai1996 <1782765876@qq.com>
Signed-off-by: Bi Fuguo <1782765876@qq.com>
* update TouchAction::Click condition
Signed-off-by: Bi Fuguo <1782765876@qq.com>
---------
Signed-off-by: kongbai1996 <1782765876@qq.com>
Signed-off-by: Bi Fuguo <1782765876@qq.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
`style_traits::DevicePixel` unless interfacing with Stylo (#34353)
* Use webrender_api::units::DevicePixel rather than style_traits::DevicePixel unless interfacing with Stylo
Signed-off-by: Nico Burns <nico@nicoburns.com>
* Fix OpenHarmony build
Signed-off-by: Nico Burns <nico@nicoburns.com>
---------
Signed-off-by: Nico Burns <nico@nicoburns.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add simple fling implementation
Add a simple fling implementation, which depends on a refresh tick from the
embedder.
Currently this refresh tick is only implemented for OpenHarmony
(using the vsync signal).
The fling implementation is very simple, without any fancy things like acceleration.
This can be improved in the future.
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
* Multiply initial velocity with 2
This makes the experience much more snappy.
Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
* address review comments
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
* Rename constants and add todo
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
* fmt
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
* Add a few periods to make comments consistent
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
---------
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
|
|
|
|
|
|
|
| |
* clippy: fix assorted warnings in `components/`
* fix: new and default
* fix: review comments
|
|
|
|
|
| |
* strict imports formatting
* Reformat all imports
|
|
|
|
|
|
|
|
|
|
|
| |
* remove extern crate
* Update components/script_plugins/lib.rs
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
---------
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
|
|
|
|
|
|
|
|
| |
There are a few canvas2d-related dependencies that haven't updated, but they
only use euclid internally so that's not blocking landing the rest of the
changes.
Given the size of this patch, I think it's useful to get this landed as-is.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This removes paint threads, rust-layers dependency, and changes
optional webrender types to be required.
The use_webrender option has been removed, however I've left
the "-w" command line option in place so that wpt
runner can continue to pass that. Once it's removed from there
we can also remove the -w option.
Once this stage is complete, it should be fine to change the
display list building code to generate webrender display
lists directly and avoid the conversion step.
|
| |
|
| |
|
|
|
|
|
| |
Moved ScriptToCompositorMsg enum and EventResult enum to script_traits
resolving issue #8835.
|
|
|