From c262d18283d5e715b6655df5f8b1652fb66d6656 Mon Sep 17 00:00:00 2001 From: Glenn Watson Date: Fri, 6 Apr 2018 15:22:01 +1000 Subject: [PATCH] Remove overscroll code and api. Fixes #2545. Fixes #1762. Fixes #1314. --- webrender/examples/scrolling.rs | 2 - webrender/src/clip_scroll_node.rs | 119 ++++-------------------------- webrender/src/clip_scroll_tree.rs | 93 +---------------------- webrender/src/internal_types.rs | 5 -- webrender/src/lib.rs | 1 - webrender/src/render_backend.rs | 31 ++------ webrender/src/renderer.rs | 6 -- webrender/src/spring.rs | 109 --------------------------- webrender_api/src/api.rs | 22 +----- 9 files changed, 23 insertions(+), 365 deletions(-) delete mode 100644 webrender/src/spring.rs diff --git a/webrender/examples/scrolling.rs b/webrender/examples/scrolling.rs index 11f7a393e1..626d75d778 100644 --- a/webrender/examples/scrolling.rs +++ b/webrender/examples/scrolling.rs @@ -165,7 +165,6 @@ impl Example for App { txn.scroll( ScrollLocation::Delta(LayoutVector2D::new(offset.0, offset.1)), self.cursor_position, - ScrollEventPhase::Start, ); } glutin::WindowEvent::CursorMoved { position: (x, y), .. } => { @@ -181,7 +180,6 @@ impl Example for App { txn.scroll( ScrollLocation::Delta(LayoutVector2D::new(dx, dy)), self.cursor_position, - ScrollEventPhase::Start, ); } glutin::WindowEvent::MouseInput { .. } => { diff --git a/webrender/src/clip_scroll_node.rs b/webrender/src/clip_scroll_node.rs index 58bb571d4a..cbb1136af3 100644 --- a/webrender/src/clip_scroll_node.rs +++ b/webrender/src/clip_scroll_node.rs @@ -4,7 +4,7 @@ use api::{DevicePixelScale, ExternalScrollId, LayerPixel, LayerPoint, LayerRect, LayerSize}; use api::{LayerVector2D, LayoutTransform, LayoutVector2D, PipelineId, PropertyBinding}; -use api::{ScrollClamping, ScrollEventPhase, ScrollLocation, ScrollSensitivity, StickyOffsetBounds}; +use api::{ScrollClamping, ScrollLocation, ScrollSensitivity, StickyOffsetBounds}; use api::WorldPoint; use clip::{ClipChain, ClipChainNode, ClipSourcesHandle, ClipStore, ClipWorkItem}; use clip_scroll_tree::{ClipChainIndex, ClipScrollNodeIndex, CoordinateSystemId}; @@ -15,16 +15,9 @@ use gpu_cache::GpuCache; use gpu_types::{ClipScrollNodeIndex as GPUClipScrollNodeIndex, ClipScrollNodeData}; use resource_cache::ResourceCache; use scene::SceneProperties; -use spring::{DAMPING, STIFFNESS, Spring}; use util::{LayerToWorldFastTransform, LayerFastTransform, LayoutFastTransform}; use util::{TransformedRectKind}; -#[cfg(target_os = "macos")] -const CAN_OVERSCROLL: bool = true; - -#[cfg(not(target_os = "macos"))] -const CAN_OVERSCROLL: bool = false; - #[derive(Debug)] pub struct StickyFrameInfo { pub margins: SideOffsets2D>, @@ -269,8 +262,6 @@ impl ClipScrollNode { } scrolling.offset = new_offset; - scrolling.bouncing_back = false; - scrolling.started_bouncing_back = false; true } @@ -666,17 +657,13 @@ impl ClipScrollNode { } - pub fn scroll(&mut self, scroll_location: ScrollLocation, phase: ScrollEventPhase) -> bool { + pub fn scroll(&mut self, scroll_location: ScrollLocation) -> bool { let scrolling = match self.node_type { NodeType::ScrollFrame(ref mut scrolling) => scrolling, _ => return false, }; - if scrolling.started_bouncing_back && phase == ScrollEventPhase::Move(false) { - return false; - } - - let mut delta = match scroll_location { + let delta = match scroll_location { ScrollLocation::Delta(delta) => delta, ScrollLocation::Start => { if scrolling.offset.y.round() >= 0.0 { @@ -699,56 +686,25 @@ impl ClipScrollNode { } }; - let overscroll_amount = scrolling.overscroll_amount(); - let overscrolling = CAN_OVERSCROLL && (overscroll_amount != LayerVector2D::zero()); - if overscrolling { - if overscroll_amount.x != 0.0 { - delta.x /= overscroll_amount.x.abs() - } - if overscroll_amount.y != 0.0 { - delta.y /= overscroll_amount.y.abs() - } - } - let scrollable_width = scrolling.scrollable_size.width; let scrollable_height = scrolling.scrollable_size.height; - let is_unscrollable = scrollable_width <= 0. && scrollable_height <= 0.; let original_layer_scroll_offset = scrolling.offset; if scrollable_width > 0. { - scrolling.offset.x = scrolling.offset.x + delta.x; - if is_unscrollable || !CAN_OVERSCROLL { - scrolling.offset.x = scrolling.offset.x.min(0.0).max(-scrollable_width).round(); - } + scrolling.offset.x = (scrolling.offset.x + delta.x) + .min(0.0) + .max(-scrollable_width) + .round(); } if scrollable_height > 0. { - scrolling.offset.y = scrolling.offset.y + delta.y; - if is_unscrollable || !CAN_OVERSCROLL { - scrolling.offset.y = scrolling.offset.y.min(0.0).max(-scrollable_height).round(); - } + scrolling.offset.y = (scrolling.offset.y + delta.y) + .min(0.0) + .max(-scrollable_height) + .round(); } - if phase == ScrollEventPhase::Start || phase == ScrollEventPhase::Move(true) { - scrolling.started_bouncing_back = false - } else if overscrolling && - ((delta.x < 1.0 && delta.y < 1.0) || phase == ScrollEventPhase::End) - { - scrolling.started_bouncing_back = true; - scrolling.bouncing_back = true - } - - if CAN_OVERSCROLL { - scrolling.stretch_overscroll_spring(overscroll_amount); - } - - scrolling.offset != original_layer_scroll_offset || scrolling.started_bouncing_back - } - - pub fn tick_scrolling_bounce_animation(&mut self) { - if let NodeType::ScrollFrame(ref mut scrolling) = self.node_type { - scrolling.tick_scrolling_bounce_animation(); - } + scrolling.offset != original_layer_scroll_offset } pub fn ray_intersects_node(&self, cursor: &WorldPoint) -> bool { @@ -781,13 +737,6 @@ impl ClipScrollNode { } } - pub fn is_overscrolling(&self) -> bool { - match self.node_type { - NodeType::ScrollFrame(ref state) => state.overscroll_amount() != LayerVector2D::zero(), - _ => false, - } - } - pub fn matches_external_id(&self, external_id: ExternalScrollId) -> bool { match self.node_type { NodeType::ScrollFrame(info) if info.external_id == Some(external_id) => true, @@ -799,10 +748,6 @@ impl ClipScrollNode { #[derive(Copy, Clone, Debug)] pub struct ScrollFrameInfo { pub offset: LayerVector2D, - pub spring: Spring, - pub started_bouncing_back: bool, - pub bouncing_back: bool, - pub should_handoff_scroll: bool, pub scroll_sensitivity: ScrollSensitivity, /// Amount that this ScrollFrame can scroll in both directions. @@ -815,7 +760,7 @@ pub struct ScrollFrameInfo { } -/// Manages scrolling offset, overscroll state, etc. +/// Manages scrolling offset. impl ScrollFrameInfo { pub fn new( scroll_sensitivity: ScrollSensitivity, @@ -824,10 +769,6 @@ impl ScrollFrameInfo { ) -> ScrollFrameInfo { ScrollFrameInfo { offset: LayerVector2D::zero(), - spring: Spring::at(LayerPoint::zero(), STIFFNESS, DAMPING), - started_bouncing_back: false, - bouncing_back: false, - should_handoff_scroll: false, scroll_sensitivity, scrollable_size, external_id, @@ -840,40 +781,6 @@ impl ScrollFrameInfo { ScrollSensitivity::Script => false, } } - - pub fn stretch_overscroll_spring(&mut self, overscroll_amount: LayerVector2D) { - let offset = self.offset.to_point(); - self.spring - .coords(offset, offset, offset + overscroll_amount); - } - - pub fn tick_scrolling_bounce_animation(&mut self) { - let finished = self.spring.animate(); - self.offset = self.spring.current().to_vector(); - if finished { - self.bouncing_back = false - } - } - - pub fn overscroll_amount(&self) -> LayerVector2D { - let overscroll_x = if self.offset.x > 0.0 { - -self.offset.x - } else if self.offset.x < -self.scrollable_size.width { - -self.scrollable_size.width - self.offset.x - } else { - 0.0 - }; - - let overscroll_y = if self.offset.y > 0.0 { - -self.offset.y - } else if self.offset.y < -self.scrollable_size.height { - -self.scrollable_size.height - self.offset.y - } else { - 0.0 - }; - - LayerVector2D::new(overscroll_x, overscroll_y) - } } /// Contains information about reference frames. diff --git a/webrender/src/clip_scroll_tree.rs b/webrender/src/clip_scroll_tree.rs index 74320cffbb..c698617c74 100644 --- a/webrender/src/clip_scroll_tree.rs +++ b/webrender/src/clip_scroll_tree.rs @@ -3,7 +3,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ use api::{DeviceIntRect, DevicePixelScale, ExternalScrollId, LayerPoint, LayerRect, LayerVector2D}; -use api::{PipelineId, ScrollClamping, ScrollEventPhase, ScrollLocation, ScrollNodeState}; +use api::{PipelineId, ScrollClamping, ScrollLocation, ScrollNodeState}; use api::WorldPoint; use clip::{ClipChain, ClipSourcesHandle, ClipStore}; use clip_scroll_node::{ClipScrollNode, NodeType, ScrollFrameInfo, StickyFrameInfo}; @@ -70,10 +70,6 @@ pub struct ClipScrollTree { pub pending_scroll_offsets: FastHashMap, - /// The ClipId of the currently scrolling node. Used to allow the same - /// node to scroll even if a touch operation leaves the boundaries of that node. - pub currently_scrolling_node_index: Option, - /// The current frame id, used for giving a unique id to all new dynamically /// added frames and clips. The ClipScrollTree increments this by one every /// time a new dynamic frame is created. @@ -116,7 +112,6 @@ impl ClipScrollTree { clip_chains_descriptors: Vec::new(), clip_chains: vec![ClipChain::empty(&DeviceIntRect::zero())], pending_scroll_offsets: FastHashMap::default(), - currently_scrolling_node_index: None, current_new_node_item: 1, pipelines_to_discard: FastHashSet::default(), } @@ -138,18 +133,6 @@ impl ClipScrollTree { TOPMOST_SCROLL_NODE_INDEX } - pub fn collect_nodes_bouncing_back(&self) -> FastHashSet { - let mut nodes_bouncing_back = FastHashSet::default(); - for (index, node) in self.nodes.iter().enumerate() { - if let NodeType::ScrollFrame(ref scrolling) = node.node_type { - if scrolling.bouncing_back { - nodes_bouncing_back.insert(ClipScrollNodeIndex(index)); - } - } - } - nodes_bouncing_back - } - fn find_scrolling_node_at_point_in_node( &self, cursor: &WorldPoint, @@ -235,71 +218,13 @@ impl ClipScrollTree { &mut self, scroll_location: ScrollLocation, cursor: WorldPoint, - phase: ScrollEventPhase, ) -> bool { if self.nodes.is_empty() { return false; } - let node_index = match ( - phase, - self.find_scrolling_node_at_point(&cursor), - self.currently_scrolling_node_index, - ) { - (ScrollEventPhase::Start, scroll_node_at_point_index, _) => { - self.currently_scrolling_node_index = Some(scroll_node_at_point_index); - scroll_node_at_point_index - } - (_, scroll_node_at_point_index, Some(cached_node_index)) => { - match self.nodes.get(cached_node_index.0) { - Some(_) => cached_node_index, - None => { - self.currently_scrolling_node_index = Some(scroll_node_at_point_index); - scroll_node_at_point_index - } - } - } - (_, _, None) => return false, - }; - - let topmost_scroll_node_index = self.topmost_scroll_node_index(); - let non_root_overscroll = if node_index != topmost_scroll_node_index { - self.nodes[node_index.0].is_overscrolling() - } else { - false - }; - - let mut switch_node = false; - { - let node = &mut self.nodes[node_index.0]; - if let NodeType::ScrollFrame(ref mut scrolling) = node.node_type { - match phase { - ScrollEventPhase::Start => { - // if this is a new gesture, we do not switch node, - // however we do save the state of non_root_overscroll, - // for use in the subsequent Move phase. - scrolling.should_handoff_scroll = non_root_overscroll; - } - ScrollEventPhase::Move(_) => { - // Switch node if movement originated in a new gesture, - // from a non root node in overscroll. - switch_node = scrolling.should_handoff_scroll && non_root_overscroll - } - ScrollEventPhase::End => { - // clean-up when gesture ends. - scrolling.should_handoff_scroll = false; - } - } - } - } - - let node_index = if switch_node { - topmost_scroll_node_index - } else { - node_index - }; - - self.nodes[node_index.0].scroll(scroll_location, phase) + let node_index = self.find_scrolling_node_at_point(&cursor); + self.nodes[node_index.0].scroll(scroll_location) } pub fn update_tree( @@ -433,12 +358,6 @@ impl ClipScrollTree { } } - pub fn tick_scrolling_bounce_animations(&mut self) { - for node in &mut self.nodes { - node.tick_scrolling_bounce_animation() - } - } - pub fn finalize_and_apply_pending_scroll_offsets(&mut self, old_states: ScrollStates) { for node in &mut self.nodes { let external_id = match node.node_type { @@ -529,12 +448,6 @@ impl ClipScrollTree { pub fn discard_frame_state_for_pipeline(&mut self, pipeline_id: PipelineId) { self.pipelines_to_discard.insert(pipeline_id); - - if let Some(index) = self.currently_scrolling_node_index { - if self.nodes[index.0].pipeline_id == pipeline_id { - self.currently_scrolling_node_index = None; - } - } } fn print_node( diff --git a/webrender/src/internal_types.rs b/webrender/src/internal_types.rs index 72d31f7ce5..73737183c7 100644 --- a/webrender/src/internal_types.rs +++ b/webrender/src/internal_types.rs @@ -4,7 +4,6 @@ use api::{DebugCommand, DeviceUintRect, DocumentId, ExternalImageData, ExternalImageId}; use api::ImageFormat; -use clip_scroll_tree::ClipScrollNodeIndex; use device::TextureFilter; use renderer::PipelineInfo; use gpu_cache::GpuCacheUpdateList; @@ -138,8 +137,6 @@ pub struct RenderedDocument { /// been rendered, which is necessary for reftests. /// - Pipelines that were removed from the scene. pub pipeline_info: PipelineInfo, - /// The layers that are currently affected by the over-scrolling animation. - pub layers_bouncing_back: FastHashSet, pub frame: tiling::Frame, } @@ -147,12 +144,10 @@ pub struct RenderedDocument { impl RenderedDocument { pub fn new( pipeline_info: PipelineInfo, - layers_bouncing_back: FastHashSet, frame: tiling::Frame, ) -> Self { RenderedDocument { pipeline_info, - layers_bouncing_back, frame, } } diff --git a/webrender/src/lib.rs b/webrender/src/lib.rs index 4fe25440aa..8036506215 100644 --- a/webrender/src/lib.rs +++ b/webrender/src/lib.rs @@ -100,7 +100,6 @@ mod scene; mod scene_builder; mod segment; mod shade; -mod spring; mod texture_allocator; mod texture_cache; mod tiling; diff --git a/webrender/src/render_backend.rs b/webrender/src/render_backend.rs index 1d5235e729..a43fff4005 100644 --- a/webrender/src/render_backend.rs +++ b/webrender/src/render_backend.rs @@ -8,7 +8,7 @@ use api::{BuiltDisplayListIter, SpecificDisplayItem}; use api::{DeviceIntPoint, DevicePixelScale, DeviceUintPoint, DeviceUintRect, DeviceUintSize}; use api::{DocumentId, DocumentLayer, ExternalScrollId, FrameMsg, HitTestResult}; use api::{IdNamespace, LayerPoint, PipelineId, RenderNotifier, SceneMsg, ScrollClamping}; -use api::{ScrollEventPhase, ScrollLocation, ScrollNodeState, TransactionMsg, WorldPoint}; +use api::{ScrollLocation, ScrollNodeState, TransactionMsg, WorldPoint}; use api::channel::{MsgReceiver, Payload}; #[cfg(feature = "capture")] use api::CaptureBits; @@ -301,13 +301,11 @@ impl Document { } pub fn make_rendered_document(&mut self, frame: Frame, removed_pipelines: Vec) -> RenderedDocument { - let nodes_bouncing_back = self.clip_scroll_tree.collect_nodes_bouncing_back(); RenderedDocument::new( PipelineInfo { epochs: self.current.scene.pipeline_epochs.clone(), removed_pipelines, }, - nodes_bouncing_back, frame ) } @@ -322,9 +320,8 @@ impl Document { &mut self, scroll_location: ScrollLocation, cursor: WorldPoint, - phase: ScrollEventPhase, ) -> bool { - self.clip_scroll_tree.scroll(scroll_location, cursor, phase) + self.clip_scroll_tree.scroll(scroll_location, cursor) } /// Returns true if the node actually changed position or false otherwise. @@ -337,10 +334,6 @@ impl Document { self.clip_scroll_tree.scroll_node(origin, id, clamp) } - pub fn tick_scrolling_bounce_animations(&mut self) { - self.clip_scroll_tree.tick_scrolling_bounce_animations(); - } - pub fn get_scroll_node_state(&self) -> Vec { self.clip_scroll_tree.get_scroll_node_state() } @@ -622,10 +615,10 @@ impl RenderBackend { } DocumentOps::nop() } - FrameMsg::Scroll(delta, cursor, move_phase) => { + FrameMsg::Scroll(delta, cursor) => { profile_scope!("Scroll"); - let should_render = doc.scroll(delta, cursor, move_phase) + let should_render = doc.scroll(delta, cursor) && doc.render_on_scroll == Some(true); DocumentOps { @@ -664,20 +657,6 @@ impl RenderBackend { ..DocumentOps::nop() } } - FrameMsg::TickScrollingBounce => { - profile_scope!("TickScrollingBounce"); - - doc.tick_scrolling_bounce_animations(); - - let should_render = doc.render_on_scroll == Some(true); - - DocumentOps { - scroll: true, - render: should_render, - composite: should_render, - ..DocumentOps::nop() - } - } FrameMsg::GetScrollNodeState(tx) => { profile_scope!("GetScrollNodeState"); tx.send(doc.get_scroll_node_state()).unwrap(); @@ -1188,7 +1167,7 @@ impl RenderBackend { &mut profile_counters.resources, ); //TODO: write down full `RenderedDocument`? - // it has `pipeline_epoch_map` and `layers_bouncing_back`, + // it has `pipeline_epoch_map`, // which may capture necessary details for some cases. let file_name = format!("frame-{}-{}", (id.0).0, id.1); config.serialize(&rendered_document.frame, file_name); diff --git a/webrender/src/renderer.rs b/webrender/src/renderer.rs index 75547cd43e..6cc6bd872d 100644 --- a/webrender/src/renderer.rs +++ b/webrender/src/renderer.rs @@ -2321,12 +2321,6 @@ impl Renderer { } } - pub fn layers_are_bouncing_back(&self) -> bool { - self.active_documents - .iter() - .any(|&(_, ref render_doc)| !render_doc.layers_bouncing_back.is_empty()) - } - fn update_gpu_cache(&mut self) { let _gm = self.gpu_profile.start_marker("gpu cache update"); diff --git a/webrender/src/spring.rs b/webrender/src/spring.rs deleted file mode 100644 index 40ce684621..0000000000 --- a/webrender/src/spring.rs +++ /dev/null @@ -1,109 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -use api::LayerPoint; - -/// Some arbitrarily small positive number used as threshold value. -pub const EPSILON: f32 = 0.1; - -/// The default stiffness factor. -pub const STIFFNESS: f32 = 0.2; - -/// The default damping factor. -pub const DAMPING: f32 = 1.0; - -#[derive(Copy, Clone, Debug)] -pub struct Spring { - /// The current position of spring. - cur: LayerPoint, - /// The position of spring at previous tick. - prev: LayerPoint, - /// The destination of spring. - dest: LayerPoint, - /// How hard it springs back. - stiffness: f32, - /// Friction. 1.0 means no bounce. - damping: f32, -} - -impl Spring { - /// Create a new spring at location. - pub fn at(pos: LayerPoint, stiffness: f32, damping: f32) -> Spring { - Spring { - cur: pos, - prev: pos, - dest: pos, - stiffness, - damping, - } - } - - /// Set coords on a spring, mutating spring - pub fn coords(&mut self, cur: LayerPoint, prev: LayerPoint, dest: LayerPoint) { - self.cur = cur; - self.prev = prev; - self.dest = dest - } - - pub fn current(&self) -> LayerPoint { - self.cur - } - - /// Run one tick of the spring animation. Return true if the animation is complete. - pub fn animate(&mut self) -> bool { - if !is_resting(self.cur.x, self.prev.x, self.dest.x) || - !is_resting(self.cur.y, self.prev.y, self.dest.y) - { - let next = LayerPoint::new( - next( - self.cur.x, - self.prev.x, - self.dest.x, - self.stiffness, - self.damping, - ), - next( - self.cur.y, - self.prev.y, - self.dest.y, - self.stiffness, - self.damping, - ), - ); - let (cur, dest) = (self.cur, self.dest); - self.coords(next, cur, dest); - false - } else { - let dest = self.dest; - self.coords(dest, dest, dest); - true - } - } -} - -/// Given numbers, calculate the next position for a spring. -fn next(cur: f32, prev: f32, dest: f32, stiffness: f32, damping: f32) -> f32 { - // Calculate spring force - let fspring = -stiffness * (cur - dest); - - // Calculate velocity - let vel = cur - prev; - - // Calculate damping force. - let fdamping = -damping * vel; - - // Calc acceleration by adjusting spring force to damping force - let acc = fspring + fdamping; - - // Calculate new velocity after adding acceleration. Scale to framerate. - let nextv = vel + acc; - - // Calculate next position by integrating velocity. Scale to framerate. - cur + nextv -} - -/// Given numbers, calculate if a spring is at rest. -fn is_resting(cur: f32, prev: f32, dest: f32) -> bool { - (cur - prev).abs() < EPSILON && (cur - dest).abs() < EPSILON -} diff --git a/webrender_api/src/api.rs b/webrender_api/src/api.rs index 8939674292..90d9256573 100644 --- a/webrender_api/src/api.rs +++ b/webrender_api/src/api.rs @@ -288,9 +288,8 @@ impl Transaction { &mut self, scroll_location: ScrollLocation, cursor: WorldPoint, - phase: ScrollEventPhase, ) { - self.frame_ops.push(FrameMsg::Scroll(scroll_location, cursor, phase)); + self.frame_ops.push(FrameMsg::Scroll(scroll_location, cursor)); } pub fn scroll_node_with_id( @@ -314,10 +313,6 @@ impl Transaction { self.frame_ops.push(FrameMsg::SetPan(pan)); } - pub fn tick_scrolling_bounce_animations(&mut self) { - self.frame_ops.push(FrameMsg::TickScrollingBounce); - } - /// Generate a new frame. pub fn generate_frame(&mut self) { self.generate_frame = true; @@ -487,9 +482,8 @@ pub enum FrameMsg { HitTest(Option, WorldPoint, HitTestFlags, MsgSender), SetPan(DeviceIntPoint), EnableFrameOutput(PipelineId, bool), - Scroll(ScrollLocation, WorldPoint, ScrollEventPhase), + Scroll(ScrollLocation, WorldPoint), ScrollNodeWithId(LayoutPoint, ExternalScrollId, ScrollClamping), - TickScrollingBounce, GetScrollNodeState(MsgSender>), UpdateDynamicProperties(DynamicProperties), } @@ -516,7 +510,6 @@ impl fmt::Debug for FrameMsg { FrameMsg::SetPan(..) => "FrameMsg::SetPan", FrameMsg::Scroll(..) => "FrameMsg::Scroll", FrameMsg::ScrollNodeWithId(..) => "FrameMsg::ScrollNodeWithId", - FrameMsg::TickScrollingBounce => "FrameMsg::TickScrollingBounce", FrameMsg::GetScrollNodeState(..) => "FrameMsg::GetScrollNodeState", FrameMsg::EnableFrameOutput(..) => "FrameMsg::EnableFrameOutput", FrameMsg::UpdateDynamicProperties(..) => "FrameMsg::UpdateDynamicProperties", @@ -987,17 +980,6 @@ impl Drop for RenderApi { } } -#[derive(Clone, Copy, Debug, Deserialize, PartialEq, Serialize)] -pub enum ScrollEventPhase { - /// The user started scrolling. - Start, - /// The user performed a scroll. The Boolean flag indicates whether the user's fingers are - /// down, if a touchpad is in use. (If false, the event is a touchpad fling.) - Move(bool), - /// The user ended scrolling. - End, -} - #[derive(Clone, Deserialize, Serialize)] pub struct ScrollNodeState { pub id: ExternalScrollId,