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:
Martin Robinson 2025-09-23 09:00:11 +02:00 committed by GitHub
parent 70d54e86bd
commit b73538a676
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 142 additions and 116 deletions

View file

@ -128,9 +128,6 @@ pub struct DebugOptions {
/// Whether to show in stdout style sharing cache stats after a restyle.
pub dump_style_statistics: bool,
/// Translate mouse input into touch events.
pub convert_mouse_to_touch: bool,
/// Log GC passes and their durations.
pub gc_profile: bool,
}
@ -140,7 +137,6 @@ impl DebugOptions {
for option in debug_string.split(',') {
match option {
"help" => self.help = true,
"convert-mouse-to-touch" => self.convert_mouse_to_touch = true,
"disable-share-style-cache" => self.disable_share_style_cache = true,
"dump-display-list" => self.dump_display_list = true,
"dump-stacking-context-tree" => self.dump_stacking_context_tree = true,