mirror of
https://github.com/servo/servo.git
synced 2025-09-27 23:30:08 +01:00
servoshell: Move touch event simulation to servoshell (#39352)
This change removes the `DebugOption` (`-Z`) for touch event simulation and moves the implementation of the feature to servoshell. The resaoning for this is: - This is really a servoshell feature and can be implemented on top of the API. This moves more code out of the already too-complicated renderer. - I would like to consolidate `DebugOptions` into a `ServoLogOptions` to collect all options for configuring Servo logging. This requires moving away all of the non-logging options. - Eventually touch event simulation will be able to reuse the fling implementation from servoshell as we are actually simulating touch events sent to the `WebView`. Testing: This changes a conditional feature that's used for manual debugging. It is difficult to write tests for this as there are no servoshell tests that verify input handling. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
parent
70d54e86bd
commit
b73538a676
7 changed files with 142 additions and 116 deletions
|
@ -117,9 +117,6 @@ pub struct ServoRenderer {
|
|||
/// Some XR devices want to run on the main thread.
|
||||
webxr_main_thread: webxr::MainThreadRegistry,
|
||||
|
||||
/// True to translate mouse input into touch events.
|
||||
pub(crate) convert_mouse_to_touch: bool,
|
||||
|
||||
/// The last position in the rendered view that the mouse moved over. This becomes `None`
|
||||
/// when the mouse leaves the rendered view.
|
||||
pub(crate) last_mouse_move_position: Option<DevicePoint>,
|
||||
|
@ -306,7 +303,7 @@ impl ServoRenderer {
|
|||
}
|
||||
|
||||
impl IOCompositor {
|
||||
pub fn new(state: InitialCompositorState, convert_mouse_to_touch: bool) -> Self {
|
||||
pub fn new(state: InitialCompositorState) -> Self {
|
||||
let registration = state.mem_profiler_chan.prepare_memory_reporting(
|
||||
"compositor".into(),
|
||||
state.sender.clone(),
|
||||
|
@ -327,7 +324,6 @@ impl IOCompositor {
|
|||
webrender_gl: state.webrender_gl,
|
||||
#[cfg(feature = "webxr")]
|
||||
webxr_main_thread: state.webxr_main_thread,
|
||||
convert_mouse_to_touch,
|
||||
last_mouse_move_position: None,
|
||||
frame_delayer: Default::default(),
|
||||
})),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue