Truly independent web browser
Compositor: Resolve a wheel latch on a context without a display list
Aliaksandr Kalenik25e82c100b8b
diff --git a/Services/Compositor/Rust/src/context_state/gestures_and_scrollbars.rs b/Services/Compositor/Rust/src/context_state/gestures_and_scrollbars.rsindex 3859f6a6c1b..01cc0b6ca01 100644--- a/Services/Compositor/Rust/src/context_state/gestures_and_scrollbars.rs+++ b/Services/Compositor/Rust/src/context_state/gestures_and_scrollbars.rs@@ -14,13 +14,9 @@ impl ContextState {scroll_gesture_phase: ScrollGesturePhase,gesture_id: Option<u64>,) -> ResolvedLatch {- // Only a hit test takes a latch, and it needs the tree of an installed display list.- if !self.wheel_gesture_routing.has_latch() {- return Default::default();- }self.wheel_gesture_routing.resolve_latch(&self.async_scroll_tree,- self.scene.current_visual_context_tree(),+ self.scene.visual_context_tree().as_ref(),scroll_gesture_phase,gesture_id,)diff --git a/Services/Compositor/Rust/src/context_state/wheel.rs b/Services/Compositor/Rust/src/context_state/wheel.rsindex 0c59526fd62..fab09c3b404 100644--- a/Services/Compositor/Rust/src/context_state/wheel.rs+++ b/Services/Compositor/Rust/src/context_state/wheel.rs@@ -832,7 +832,7 @@ impl ContextState {}let latch = self.wheel_gesture_routing.resolve_latch(&self.async_scroll_tree,- self.scene.current_visual_context_tree(),+ self.scene.visual_context_tree().as_ref(),step.scroll_gesture_phase,step.gesture_id,);diff --git a/Services/Compositor/Rust/src/wheel_gesture_routing.rs b/Services/Compositor/Rust/src/wheel_gesture_routing.rsindex 009960e1874..b10bf1a282e 100644--- a/Services/Compositor/Rust/src/wheel_gesture_routing.rs+++ b/Services/Compositor/Rust/src/wheel_gesture_routing.rs@@ -293,9 +293,6 @@ impl WheelGestureRouting {}}- pub fn has_latch(&self) -> bool {- self.latch.is_some()- }pub fn has_latch_for_gesture(&self, gesture_id: Option<u64>) -> bool {self.latch.as_ref().is_some_and(|latch| latch.gesture_id == gesture_id)}@@ -311,7 +308,7 @@ impl WheelGestureRouting {pub fn resolve_latch(&mut self,async_scroll_tree: &AsyncScrollTree,- current_visual_context_tree: &AccumulatedVisualContextTree,+ current_visual_context_tree: Option<&AccumulatedVisualContextTree>,scroll_gesture_phase: ScrollGesturePhase,gesture_id: Option<u64>,) -> ResolvedLatch {@@ -336,7 +333,7 @@ impl WheelGestureRouting {return ResolvedLatch::default();}// The hit test a latched step skips would refuse a tree the wheel hit-test targets were not built for.- if !async_scroll_tree.has_wheel_hit_test_targets_for(current_visual_context_tree) {+ if !current_visual_context_tree.is_some_and(|tree| async_scroll_tree.has_wheel_hit_test_targets_for(tree)) {return ResolvedLatch::default();}latch.last_scroll_gesture_phase = scroll_gesture_phase;