aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2016-06-30 06:19:29 -0500
committerGitHub <noreply@github.com>2016-06-30 06:19:29 -0500
commit87d08eb4e8282f591261250d6b1d061fbb0584b6 (patch)
tree8466ce8276d1b84383a77cb3622bb4f19a0cdab4
parent2b2b6a3d0c011143ea133e415c6adf3a34bcfbdd (diff)
parentc7fd89a593bfd9b7d679a6fe5cf819f30d3959c9 (diff)
downloadservo-87d08eb4e8282f591261250d6b1d061fbb0584b6.tar.gz
servo-87d08eb4e8282f591261250d6b1d061fbb0584b6.zip
Auto merge of #11952 - cynicaldevil:master, r=Ms2ger
Creates KeyModifiers value using empty() instead of from_bits() <!-- Please describe your changes on the following line: --> --- <!-- 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 - [X] These changes fix #11935 . <!-- Either: --> - [X] These changes do not require tests because: @jdm said so :P <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11952) <!-- Reviewable:end -->
-rw-r--r--ports/glutin/window.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/ports/glutin/window.rs b/ports/glutin/window.rs
index 235afd4733c..e553ae0d188 100644
--- a/ports/glutin/window.rs
+++ b/ports/glutin/window.rs
@@ -576,7 +576,7 @@ impl Window {
}
fn glutin_mods_to_script_mods(modifiers: KeyModifiers) -> constellation_msg::KeyModifiers {
- let mut result = constellation_msg::KeyModifiers::from_bits(0).expect("infallible");
+ let mut result = constellation_msg::KeyModifiers::empty();
if modifiers.intersects(LEFT_SHIFT | RIGHT_SHIFT) {
result.insert(SHIFT);
}