aboutsummaryrefslogtreecommitdiffstats
path: root/components/compositing/touch.rs
diff options
context:
space:
mode:
authorBi Fuguo <1782765876@qq.com>2025-03-04 14:46:25 +0800
committerGitHub <noreply@github.com>2025-03-04 06:46:25 +0000
commitf594691af99175571db61c4a41203f7fd6723985 (patch)
tree9e01c9b2e1871047be278c9d9b516400e49c0ff5 /components/compositing/touch.rs
parentff5683680fa1a46c36c3278a58b727e84f25e457 (diff)
downloadservo-f594691af99175571db61c4a41203f7fd6723985.tar.gz
servo-f594691af99175571db61c4a41203f7fd6723985.zip
Optimize IPC for non-cancelable touch events (#35785)
* The cancelable feature is optimized. If the cancelable feature is a non-cancelable feature, no message is sent back to the Compositor. Add a warning log when prevent TouchsequenceInfo cannot be found. Signed-off-by: kongbai1996 <1782765876@qq.com> * fix Clippy Error Reported in the Pipeline. Signed-off-by: kongbai1996 <1782765876@qq.com> --------- Signed-off-by: kongbai1996 <1782765876@qq.com>
Diffstat (limited to 'components/compositing/touch.rs')
-rw-r--r--components/compositing/touch.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/components/compositing/touch.rs b/components/compositing/touch.rs
index 4d49b42189f..fb55bab8bb0 100644
--- a/components/compositing/touch.rs
+++ b/components/compositing/touch.rs
@@ -229,12 +229,16 @@ impl TouchHandler {
pub(crate) fn prevent_click(&mut self, sequence_id: TouchSequenceId) {
if let Some(sequence) = self.touch_sequence_map.get_mut(&sequence_id) {
sequence.prevent_click = true;
+ } else {
+ warn!("TouchSequenceInfo corresponding to the sequence number has been deleted.");
}
}
pub(crate) fn prevent_move(&mut self, sequence_id: TouchSequenceId) {
if let Some(sequence) = self.touch_sequence_map.get_mut(&sequence_id) {
sequence.prevent_move = TouchMoveAllowed::Prevented;
+ } else {
+ warn!("TouchSequenceInfo corresponding to the sequence number has been deleted.");
}
}