mirror of
https://github.com/servo/servo.git
synced 2025-08-18 03:45:33 +01:00
libservo: Remove TouchEventType
argument from WebView::notify_scroll_event
(#37588)
The compositor always does the same thing with these events regardless of the phase, so I think it is completely unecessary. Testing: This shouldn't change behavior at all, so is covered by existing tests. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
parent
ce4da2bf97
commit
80a7de8c9c
7 changed files with 26 additions and 55 deletions
|
@ -481,11 +481,8 @@ impl RunningAppState {
|
|||
pub fn scroll_start(&self, dx: f32, dy: f32, x: i32, y: i32) {
|
||||
let delta = Vector2D::new(dx, dy);
|
||||
let scroll_location = ScrollLocation::Delta(delta);
|
||||
self.active_webview().notify_scroll_event(
|
||||
scroll_location,
|
||||
Point2D::new(x, y),
|
||||
TouchEventType::Down,
|
||||
);
|
||||
self.active_webview()
|
||||
.notify_scroll_event(scroll_location, Point2D::new(x, y));
|
||||
self.perform_updates();
|
||||
}
|
||||
|
||||
|
@ -495,11 +492,8 @@ impl RunningAppState {
|
|||
pub fn scroll(&self, dx: f32, dy: f32, x: i32, y: i32) {
|
||||
let delta = Vector2D::new(dx, dy);
|
||||
let scroll_location = ScrollLocation::Delta(delta);
|
||||
self.active_webview().notify_scroll_event(
|
||||
scroll_location,
|
||||
Point2D::new(x, y),
|
||||
TouchEventType::Move,
|
||||
);
|
||||
self.active_webview()
|
||||
.notify_scroll_event(scroll_location, Point2D::new(x, y));
|
||||
self.perform_updates();
|
||||
}
|
||||
|
||||
|
@ -510,11 +504,8 @@ impl RunningAppState {
|
|||
pub fn scroll_end(&self, dx: f32, dy: f32, x: i32, y: i32) {
|
||||
let delta = Vector2D::new(dx, dy);
|
||||
let scroll_location = ScrollLocation::Delta(delta);
|
||||
self.active_webview().notify_scroll_event(
|
||||
scroll_location,
|
||||
Point2D::new(x, y),
|
||||
TouchEventType::Up,
|
||||
);
|
||||
self.active_webview()
|
||||
.notify_scroll_event(scroll_location, Point2D::new(x, y));
|
||||
self.perform_updates();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue