mirror of
https://github.com/servo/servo.git
synced 2025-08-02 20:20:14 +01:00
Auto merge of #20101 - servo:rm-rootedvec, r=asajeffrey
Remove a use of rooted_vec in Document::handle_touch_event <!-- Reviewable:start --> This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/20101) <!-- Reviewable:end -->
This commit is contained in:
commit
9e1479bbdd
1 changed files with 21 additions and 21 deletions
|
@ -1176,29 +1176,29 @@ impl Document {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
rooted_vec!(let mut touches);
|
|
||||||
touches.extend(self.active_touch_points.borrow().iter().cloned());
|
|
||||||
rooted_vec!(let mut target_touches);
|
rooted_vec!(let mut target_touches);
|
||||||
target_touches.extend(self.active_touch_points
|
let touches = {
|
||||||
.borrow()
|
let touches = self.active_touch_points.borrow();
|
||||||
.iter()
|
target_touches.extend(touches.iter().filter(|t| t.Target() == target).cloned());
|
||||||
.filter(|t| t.Target() == target)
|
TouchList::new(window, touches.r())
|
||||||
.cloned());
|
};
|
||||||
|
|
||||||
let event = TouchEvent::new(window,
|
let event = TouchEvent::new(
|
||||||
DOMString::from(event_name),
|
window,
|
||||||
EventBubbles::Bubbles,
|
DOMString::from(event_name),
|
||||||
EventCancelable::Cancelable,
|
EventBubbles::Bubbles,
|
||||||
Some(window),
|
EventCancelable::Cancelable,
|
||||||
0i32,
|
Some(window),
|
||||||
&TouchList::new(window, touches.r()),
|
0i32,
|
||||||
&TouchList::new(window, ref_slice(&&*touch)),
|
&touches,
|
||||||
&TouchList::new(window, target_touches.r()),
|
&TouchList::new(window, ref_slice(&&*touch)),
|
||||||
// FIXME: modifier keys
|
&TouchList::new(window, target_touches.r()),
|
||||||
false,
|
// FIXME: modifier keys
|
||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
false);
|
false,
|
||||||
|
false,
|
||||||
|
);
|
||||||
let event = event.upcast::<Event>();
|
let event = event.upcast::<Event>();
|
||||||
let result = event.fire(&target);
|
let result = event.fire(&target);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue