aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--components/compositing/compositor.rs43
1 files changed, 5 insertions, 38 deletions
diff --git a/components/compositing/compositor.rs b/components/compositing/compositor.rs
index bc27ff37748..4282b1a5c1f 100644
--- a/components/compositing/compositor.rs
+++ b/components/compositing/compositor.rs
@@ -32,7 +32,6 @@ use std::fs::{File, create_dir_all};
use std::io::Write;
use std::num::NonZeroU32;
use std::rc::Rc;
-use std::time::Instant;
use style_traits::{CSSPixel, DevicePixel, PinchZoomFactor};
use style_traits::cursor::CursorKind;
use style_traits::viewport::ViewportConstraints;
@@ -166,11 +165,6 @@ pub struct IOCompositor<Window: WindowMethods> {
/// image for the reftest framework.
ready_to_save_state: ReadyState,
- /// Whether a scroll is in progress; i.e. whether the user's fingers are down.
- scroll_in_progress: bool,
-
- in_scroll_transaction: Option<Instant>,
-
/// The webrender renderer.
webrender: webrender::Renderer,
@@ -323,8 +317,6 @@ impl<Window: WindowMethods> IOCompositor<Window> {
time_profiler_chan: state.time_profiler_chan,
last_composite_time: 0,
ready_to_save_state: ReadyState::Unknown,
- scroll_in_progress: false,
- in_scroll_transaction: None,
webrender: state.webrender,
webrender_document: state.webrender_document,
webrender_api: state.webrender_api,
@@ -847,49 +839,24 @@ impl<Window: WindowMethods> IOCompositor<Window> {
&mut self,
delta: ScrollLocation,
cursor: DeviceIntPoint,
- phase: TouchEventType,
+ phase: TouchEventType
) {
match phase {
TouchEventType::Move => self.on_scroll_window_event(delta, cursor),
TouchEventType::Up | TouchEventType::Cancel => {
- self.on_scroll_end_window_event(delta, cursor);
+ self.on_scroll_window_event(delta, cursor);
},
TouchEventType::Down => {
- self.on_scroll_start_window_event(delta, cursor);
+ self.on_scroll_window_event(delta, cursor);
},
}
}
- fn on_scroll_window_event(&mut self, scroll_location: ScrollLocation, cursor: DeviceIntPoint) {
- self.in_scroll_transaction = Some(Instant::now());
- self.pending_scroll_zoom_events.push(ScrollZoomEvent {
- magnification: 1.0,
- scroll_location: scroll_location,
- cursor: cursor,
- event_count: 1,
- });
- }
-
- fn on_scroll_start_window_event(
+ fn on_scroll_window_event(
&mut self,
scroll_location: ScrollLocation,
- cursor: DeviceIntPoint,
- ) {
- self.scroll_in_progress = true;
- self.pending_scroll_zoom_events.push(ScrollZoomEvent {
- magnification: 1.0,
- scroll_location: scroll_location,
- cursor: cursor,
- event_count: 1,
- });
- }
-
- fn on_scroll_end_window_event(
- &mut self,
- scroll_location: ScrollLocation,
- cursor: DeviceIntPoint,
+ cursor: DeviceIntPoint
) {
- self.scroll_in_progress = false;
self.pending_scroll_zoom_events.push(ScrollZoomEvent {
magnification: 1.0,
scroll_location: scroll_location,