aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/touchevent.rs
diff options
context:
space:
mode:
authorAlexander Popiak <alex@zenguard.org>2016-03-17 22:50:22 +0100
committerAlexander Popiak <alex@zenguard.org>2016-03-17 22:50:22 +0100
commit0a5ac3b207b74a5388334abb85e19c67771248a5 (patch)
tree48d805a78027792cb90b121c109cb6318d3b4c5a /components/script/dom/touchevent.rs
parent7a9dc577617b442ff0fe07eaa683207234c519ee (diff)
downloadservo-0a5ac3b207b74a5388334abb85e19c67771248a5.tar.gz
servo-0a5ac3b207b74a5388334abb85e19c67771248a5.zip
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)
Diffstat (limited to 'components/script/dom/touchevent.rs')
-rw-r--r--components/script/dom/touchevent.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/components/script/dom/touchevent.rs b/components/script/dom/touchevent.rs
index 5d6b85a550a..86f53968fe3 100644
--- a/components/script/dom/touchevent.rs
+++ b/components/script/dom/touchevent.rs
@@ -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);