mirror of
https://github.com/servo/servo.git
synced 2025-08-05 05:30:08 +01:00
Use keyboard-types crate
Have embedders send DOM keys to servo and use a strongly typed KeyboardEvent from the W3C UI Events spec. All keyboard handling now uses the new types. Introduce a ShortcutMatcher to recognize key bindings. Shortcuts are now recognized in a uniform way. Updated the winit port. Updated webdriver integration. part of #20331
This commit is contained in:
parent
76ddbe4d7a
commit
0ccaa7e1a9
35 changed files with 762 additions and 1604 deletions
|
@ -12,6 +12,7 @@ extern crate euclid;
|
|||
extern crate hyper;
|
||||
extern crate image;
|
||||
extern crate ipc_channel;
|
||||
extern crate keyboard_types;
|
||||
#[macro_use]
|
||||
extern crate log;
|
||||
extern crate msg;
|
||||
|
@ -995,12 +996,7 @@ impl Handler {
|
|||
))
|
||||
})?;
|
||||
|
||||
let keys = keycodes_to_keys(&keys.text).or_else(|_| {
|
||||
Err(WebDriverError::new(
|
||||
ErrorStatus::UnsupportedOperation,
|
||||
"Failed to convert keycodes",
|
||||
))
|
||||
})?;
|
||||
let keys = keycodes_to_keys(&keys.text);
|
||||
|
||||
// TODO: there's a race condition caused by the focus command and the
|
||||
// send keys command being two separate messages,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue