diff options
author | Ms2ger <Ms2ger@gmail.com> | 2015-11-03 14:11:07 +0100 |
---|---|---|
committer | Ms2ger <Ms2ger@gmail.com> | 2015-11-04 12:09:10 +0100 |
commit | e6aa976462fad0aafb2d59d0a590b69a8c8b5ba9 (patch) | |
tree | 8c27ba2517c0a9039eea3b54c036cd272e91d204 /components/script/dom/keyboardevent.rs | |
parent | dab3926622515e57ea42dcdf617cfb5a353b7d26 (diff) | |
download | servo-e6aa976462fad0aafb2d59d0a590b69a8c8b5ba9.tar.gz servo-e6aa976462fad0aafb2d59d0a590b69a8c8b5ba9.zip |
Use DOMString::new() somewhat consistently.
Diffstat (limited to 'components/script/dom/keyboardevent.rs')
-rw-r--r-- | components/script/dom/keyboardevent.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/components/script/dom/keyboardevent.rs b/components/script/dom/keyboardevent.rs index 86c536f69e4..c7f91cccee8 100644 --- a/components/script/dom/keyboardevent.rs +++ b/components/script/dom/keyboardevent.rs @@ -17,7 +17,6 @@ use dom::window::Window; use msg::constellation_msg; use msg::constellation_msg::{ALT, CONTROL, SHIFT, SUPER}; use msg::constellation_msg::{Key, KeyModifiers}; -use std::borrow::ToOwned; use std::cell::Cell; use util::str::DOMString; @@ -45,8 +44,8 @@ impl KeyboardEvent { KeyboardEvent { uievent: UIEvent::new_inherited(), key: Cell::new(None), - key_string: DOMRefCell::new("".to_owned()), - code: DOMRefCell::new("".to_owned()), + key_string: DOMRefCell::new(DOMString::new()), + code: DOMRefCell::new(DOMString::new()), location: Cell::new(0), ctrl: Cell::new(false), alt: Cell::new(false), @@ -85,7 +84,7 @@ impl KeyboardEvent { key_code: u32) -> Root<KeyboardEvent> { let ev = KeyboardEvent::new_uninitialized(window); ev.InitKeyboardEvent(type_, canBubble, cancelable, view, key_string, location, - "".to_owned(), repeat, "".to_owned()); + DOMString::new(), repeat, DOMString::new()); // FIXME(https://github.com/rust-lang/rust/issues/23338) { let ev = ev.r(); |