Auto merge of #5800 - aweinstock314:x11-clipboard, r=jdm

...ed test_clipboard_paste to the "test-unit" suite.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5800)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2015-05-06 16:09:37 -05:00
commit 5cb1356e9e
11 changed files with 748 additions and 452 deletions

View file

@ -701,8 +701,8 @@ impl<'a> DocumentHelpers<'a> for JSRef<'a, Document> {
let props = KeyboardEvent::key_properties(key, modifiers);
let keyevent = KeyboardEvent::new(window.r(), ev_type, true, true,
Some(window.r()), 0,
props.key.to_owned(), props.code.to_owned(),
Some(window.r()), 0, Some(key),
props.key_string.to_owned(), props.code.to_owned(),
props.location, is_repeating, is_composing,
ctrl, alt, shift, meta,
None, props.key_code).root();
@ -714,8 +714,8 @@ impl<'a> DocumentHelpers<'a> for JSRef<'a, Document> {
if state != KeyState::Released && props.is_printable() && !prevented {
// https://dvcs.w3.org/hg/dom3events/raw-file/tip/html/DOM3-Events.html#keypress-event-order
let event = KeyboardEvent::new(window.r(), "keypress".to_owned(),
true, true, Some(window.r()),
0, props.key.to_owned(), props.code.to_owned(),
true, true, Some(window.r()), 0, Some(key),
props.key_string.to_owned(), props.code.to_owned(),
props.location, is_repeating, is_composing,
ctrl, alt, shift, meta,
props.char_code, 0).root();

View file

@ -35,6 +35,7 @@ use dom::window::WindowHelpers;
use textinput::TextInput;
use textinput::KeyReaction::{TriggerDefaultAction, DispatchInput, Nothing};
use textinput::Lines::Single;
use msg::constellation_msg::ConstellationChan;
use util::str::DOMString;
use string_cache::Atom;
@ -72,7 +73,7 @@ pub struct HTMLInputElement {
indeterminate: Cell<bool>,
value_changed: Cell<bool>,
size: Cell<u32>,
textinput: DOMRefCell<TextInput>,
textinput: DOMRefCell<TextInput<ConstellationChan>>,
activation_state: DOMRefCell<InputActivationState>,
}
@ -122,7 +123,7 @@ impl HTMLInputElement {
checked_changed: Cell::new(false),
value_changed: Cell::new(false),
size: Cell::new(DEFAULT_INPUT_SIZE),
textinput: DOMRefCell::new(TextInput::new(Single, "".to_owned(), Some(chan))),
textinput: DOMRefCell::new(TextInput::new(Single, "".to_owned(), chan)),
activation_state: DOMRefCell::new(InputActivationState::new())
}
}

View file

@ -30,6 +30,7 @@ use textinput::{TextInput, Lines, KeyReaction};
use dom::virtualmethods::VirtualMethods;
use dom::window::WindowHelpers;
use script_task::{ScriptMsg, Runnable};
use msg::constellation_msg::ConstellationChan;
use util::str::DOMString;
use string_cache::Atom;
@ -40,7 +41,7 @@ use std::cell::Cell;
#[dom_struct]
pub struct HTMLTextAreaElement {
htmlelement: HTMLElement,
textinput: DOMRefCell<TextInput>,
textinput: DOMRefCell<TextInput<ConstellationChan>>,
cols: Cell<u32>,
rows: Cell<u32>,
// https://html.spec.whatwg.org/multipage/#concept-textarea-dirty
@ -95,7 +96,7 @@ impl HTMLTextAreaElement {
let chan = document.window().root().r().constellation_chan();
HTMLTextAreaElement {
htmlelement: HTMLElement::new_inherited(HTMLElementTypeId::HTMLTextAreaElement, localName, prefix, document),
textinput: DOMRefCell::new(TextInput::new(Lines::Multiple, "".to_owned(), Some(chan))),
textinput: DOMRefCell::new(TextInput::new(Lines::Multiple, "".to_owned(), chan)),
cols: Cell::new(DEFAULT_COLS),
rows: Cell::new(DEFAULT_ROWS),
value_changed: Cell::new(false),

File diff suppressed because it is too large Load diff