mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Associate logical and physical keypresses together to support non-QWERTY keyboards.
This commit is contained in:
parent
87c7772527
commit
04ce86c08c
15 changed files with 137 additions and 77 deletions
|
@ -5,7 +5,7 @@
|
|||
//! The `ByteString` struct.
|
||||
|
||||
use std::ascii::AsciiExt;
|
||||
use std::borrow::ToOwned;
|
||||
use std::borrow::{ToOwned, Cow};
|
||||
use std::fmt;
|
||||
use std::hash::{Hash, Hasher};
|
||||
use std::ops;
|
||||
|
@ -204,6 +204,15 @@ impl<'a> From<&'a str> for DOMString {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a> From<Cow<'a, str>> for DOMString {
|
||||
fn from(contents: Cow<'a, str>) -> DOMString {
|
||||
match contents {
|
||||
Cow::Owned(s) => DOMString::from(s),
|
||||
Cow::Borrowed(s) => DOMString::from(s),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<DOMString> for Atom {
|
||||
fn from(contents: DOMString) -> Atom {
|
||||
Atom::from(contents.0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue