Backed out changeset e64e659c077d: servo PR #18809 and revendor for reftest failures, e.g. in layout/reftests/bugs/392435-1.html. r=backout on a CLOSED TREE

Backs out https://github.com/servo/servo/pull/18809
This commit is contained in:
Gecko Backout 2017-10-19 21:26:51 +00:00 committed by moz-servo-sync
parent fe16c1d5c3
commit 11c64178d8
142 changed files with 1635 additions and 1685 deletions

View file

@ -15,6 +15,7 @@ use dom::event::Event;
use dom::uievent::UIEvent;
use dom::window::Window;
use dom_struct::dom_struct;
use msg::constellation_msg;
use msg::constellation_msg::{Key, KeyModifiers};
use std::borrow::Cow;
use std::cell::Cell;
@ -143,16 +144,16 @@ impl KeyboardEvent {
pub fn get_key_modifiers(&self) -> KeyModifiers {
let mut result = KeyModifiers::empty();
if self.shift.get() {
result = result | KeyModifiers::SHIFT;
result = result | constellation_msg::SHIFT;
}
if self.ctrl.get() {
result = result | KeyModifiers::CONTROL;
result = result | constellation_msg::CONTROL;
}
if self.alt.get() {
result = result | KeyModifiers::ALT;
result = result | constellation_msg::ALT;
}
if self.meta.get() {
result = result | KeyModifiers::SUPER;
result = result | constellation_msg::SUPER;
}
result
}
@ -164,7 +165,7 @@ pub fn key_value(ch: Option<char>, key: Key, mods: KeyModifiers) -> Cow<'static,
return Cow::from(format!("{}", ch));
}
let shift = mods.contains(KeyModifiers::SHIFT);
let shift = mods.contains(constellation_msg::SHIFT);
Cow::from(match key {
Key::Space => " ",
Key::Apostrophe if shift => "\"",