diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2019-10-29 00:57:40 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-29 00:57:40 -0400 |
commit | f78ca5794a905dca45f479ac5bca6975b93b64ab (patch) | |
tree | 96a7aabaf49d3fa49f7b21efcae961816d5677ec | |
parent | 1b77e42d79dbd250012045d2c0cc606530f35ff1 (diff) | |
parent | 3a8d306281fc2a5564d75cb8098376b89c02b382 (diff) | |
download | servo-f78ca5794a905dca45f479ac5bca6975b93b64ab.tar.gz servo-f78ca5794a905dca45f479ac5bca6975b93b64ab.zip |
Auto merge of #24564 - paulrouget:initButtons, r=jdm
Properly set MouseEvent buttons property
Properly set MouseEvent buttons property. Same behavior as Chrome and Firefox.
---
<!-- 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 #24363 (GitHub issue number if applicable)
<!-- Either: -->
- [x] There are tests for these changes OR
- [ ] These changes do not require tests because ___
<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
-rw-r--r-- | components/script/dom/mouseevent.rs | 2 | ||||
-rw-r--r-- | tests/wpt/metadata/dom/events/Event-subclasses-constructors.html.ini | 3 |
2 files changed, 1 insertions, 4 deletions
diff --git a/components/script/dom/mouseevent.rs b/components/script/dom/mouseevent.rs index fc0f777ecd5..48600f1155e 100644 --- a/components/script/dom/mouseevent.rs +++ b/components/script/dom/mouseevent.rs @@ -137,7 +137,7 @@ impl MouseEvent { init.parent.shiftKey, init.parent.metaKey, init.button, - 0, + init.buttons, init.relatedTarget.as_deref(), None, ); diff --git a/tests/wpt/metadata/dom/events/Event-subclasses-constructors.html.ini b/tests/wpt/metadata/dom/events/Event-subclasses-constructors.html.ini index 952d6bea81c..57bf766d5ba 100644 --- a/tests/wpt/metadata/dom/events/Event-subclasses-constructors.html.ini +++ b/tests/wpt/metadata/dom/events/Event-subclasses-constructors.html.ini @@ -1,8 +1,5 @@ [Event-subclasses-constructors.html] type: testharness - [MouseEvent constructor (argument with non-default values)] - expected: FAIL - [WheelEvent constructor (argument with non-default values)] expected: FAIL |