mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +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
|
@ -52,6 +52,8 @@ extern crate hyper;
|
|||
#[cfg(feature = "servo")]
|
||||
extern crate hyper_serde;
|
||||
#[cfg(feature = "servo")]
|
||||
extern crate keyboard_types;
|
||||
#[cfg(feature = "servo")]
|
||||
extern crate mozjs as js;
|
||||
extern crate selectors;
|
||||
#[cfg(feature = "servo")]
|
||||
|
@ -957,6 +959,19 @@ malloc_size_of_is_0!(webrender_api::StickyOffsetBounds);
|
|||
#[cfg(feature = "webrender_api")]
|
||||
malloc_size_of_is_0!(webrender_api::TransformStyle);
|
||||
|
||||
#[cfg(feature = "servo")]
|
||||
impl MallocSizeOf for keyboard_types::Key {
|
||||
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize {
|
||||
match self {
|
||||
keyboard_types::Key::Character(ref s) => s.size_of(ops),
|
||||
_ => 0,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "servo")]
|
||||
malloc_size_of_is_0!(keyboard_types::Modifiers);
|
||||
|
||||
#[cfg(feature = "servo")]
|
||||
impl MallocSizeOf for xml5ever::QualName {
|
||||
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue