mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
implement and use From<bool> for enum and back
implement and use From<bool> for EventBubbles (and back direction) implement and use From<bool> for EventCancelable (and back direction)
This commit is contained in:
parent
7a9dc57761
commit
0a5ac3b207
10 changed files with 68 additions and 78 deletions
|
@ -68,8 +68,8 @@ impl TouchEvent {
|
|||
metaKey: bool) -> Root<TouchEvent> {
|
||||
let ev = TouchEvent::new_uninitialized(window, touches, changed_touches, target_touches);
|
||||
ev.upcast::<UIEvent>().InitUIEvent(type_,
|
||||
canBubble == EventBubbles::Bubbles,
|
||||
cancelable == EventCancelable::Cancelable,
|
||||
bool::from(canBubble),
|
||||
bool::from(cancelable),
|
||||
view, detail);
|
||||
ev.ctrl_key.set(ctrlKey);
|
||||
ev.alt_key.set(altKey);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue