servo/components
bors-servo 6f9ff7b8bf Auto merge of #14738 - Wafflespeanut:keypress, r=jdm
Properly dispatch keypress event

<!-- Please describe your changes on the following line: -->

This was an attempt to fix #14659. It turned out that the problem wasn't what I thought it was. So, I didn't fix that. On the brighter side, this fixes two related issues.

- Previously, we were unable to launch `keypress` events from `input` and `textarea` elements, because [we'd been cancelling](1327ebd52f/components/script/dom/htmlinputelement.rs (L1120-L1124)) the key events, so that they don't trigger window navigation - #8400). I've introduced an enum to represent an additional state to an event's cancellation.
- [According to the spec](https://w3c.github.io/uievents/#keypress-event-order), `keypress` (if available) should be dispatched immediately after `keydown`, and it should be followed by `input`. Canceling `keypress` should also cancel `input`. But, we'd been dispatching `input` before `keypress`. We now dispatch `input` once the `keypress` event is on the respective elements.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors

<!-- Either: -->
- [x] These changes do not require tests because it's a refactor?

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

r? @jdm or anyone interested

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/14738)
<!-- Reviewable:end -->
2017-01-04 10:52:06 -08:00
..
atoms Fire 'input' event after 'keypress' in input and textarea elements 2016-12-27 15:57:34 +05:30
bluetooth refactor Connect/Disconnect calls 2016-12-22 15:49:29 +01:00
bluetooth_traits Auto merge of #14612 - szeged:connect-disconnect-update, r=jdm 2016-12-22 06:51:16 -08:00
canvas Remove azure(canvas) dependency from canvas_traits 2016-12-25 17:41:29 +02:00
canvas_traits Remove azure(canvas) dependency from canvas_traits 2016-12-25 17:41:29 +02:00
compositing replace match by if let statements if possible 2016-12-31 12:34:05 +01:00
config Removed util. 2016-12-14 18:04:37 -06:00
constellation Remove useless call to map() in constellation.rs 2017-01-02 18:55:26 +01:00
debugger Removed util. 2016-12-14 18:04:37 -06:00
devtools replace match by if let statements if possible 2016-12-31 12:34:05 +01:00
devtools_traits Urlmageddon: Use refcounted urls more often. 2016-11-17 18:34:23 +01:00
geometry Removed util. 2016-12-14 18:04:37 -06:00
gfx replace match by if let statements if possible 2016-12-31 12:34:05 +01:00
gfx_traits Don't promote all scrollable regions to stacking contexts 2016-11-05 18:36:45 +01:00
jstraceable_derive Mark JSTraceable and its method as unsafe 2016-12-06 13:15:06 -10:00
layout Switch to crates.io for atomic_refcell. 2017-01-03 18:14:27 -08:00
layout_thread style: Document the stylist module. 2017-01-02 12:57:51 +01:00
layout_traits Make the layout content process shutdown sender optional. 2016-11-30 01:24:45 +01:00
msg Auto merge of #14286 - gterzian:update_canvas_with_offscreen_context, r=jdm 2016-11-24 12:29:52 -08:00
net Auto merge of #14784 - mattnenterprise:fetch-api-updates, r=jdm,KiChjang 2017-01-02 11:30:51 -08:00
net_traits Rustfmt net_traits. 2017-01-03 15:06:41 +01:00
plugins Update to rustc 1.16.0-nightly (4ecc85beb 2016-12-28) 2017-01-02 10:51:02 +01:00
profile replace match by if let statements if possible 2016-12-31 12:34:05 +01:00
profile_traits Removed util. 2016-12-14 18:04:37 -06:00
range Remove #![feature(rustc_attrs)] 2016-11-03 11:24:19 +01:00
remutex Removed util. 2016-12-14 18:04:37 -06:00
script Auto merge of #14738 - Wafflespeanut:keypress, r=jdm 2017-01-04 10:52:06 -08:00
script_layout_interface Switch to crates.io for atomic_refcell. 2017-01-03 18:14:27 -08:00
script_traits Rustfmt script_traits. 2017-01-03 14:07:30 +01:00
servo Update WR (windows font fixes, ridge/groove borders, scrolling improvements). 2016-12-23 14:00:40 +10:00
style Auto merge of #14844 - emilio:to-css-simplification, r=SimonSapin 2017-01-04 09:37:48 -08:00
style_traits style: Document style_traits and deny missing docs on it. 2016-12-31 12:17:07 +01:00
url Adds ServoUrl::is_secure_scheme helper 2016-12-25 09:02:44 +05:30
webdriver_server Remove unused boolean argument from ContellationMsg's GetPipeline 2016-12-25 13:06:31 +02:00