mirror of
https://github.com/servo/servo.git
synced 2025-08-12 00:45:33 +01:00
Update web-platform-tests to revision 6856483bcc86322198f10e0c42385a7f9127eb66
This commit is contained in:
parent
b1a2b6b5bf
commit
ff06f1d031
265 changed files with 7539 additions and 988 deletions
|
@ -22,6 +22,14 @@
|
|||
}
|
||||
|
||||
Actions.prototype = {
|
||||
ButtonType: {
|
||||
LEFT: 0,
|
||||
MIDDLE: 1,
|
||||
RIGHT: 2,
|
||||
BACK: 3,
|
||||
FORWARD: 4,
|
||||
},
|
||||
|
||||
/**
|
||||
* Generate the action sequence suitable for passing to
|
||||
* test_driver.action_sequence
|
||||
|
@ -98,7 +106,7 @@
|
|||
* @returns {Actions}
|
||||
*/
|
||||
addKeyboard: function(name, set=true) {
|
||||
this.createSource("key", name, true);
|
||||
this.createSource("key", name);
|
||||
if (set) {
|
||||
this.setKeyboard(name);
|
||||
}
|
||||
|
@ -125,7 +133,7 @@
|
|||
* @returns {Actions}
|
||||
*/
|
||||
addPointer: function(name, pointerType="mouse", set=true) {
|
||||
this.createSource("pointer", name, true, {pointerType: pointerType});
|
||||
this.createSource("pointer", name, {pointerType: pointerType});
|
||||
if (set) {
|
||||
this.setPointer(name);
|
||||
}
|
||||
|
@ -225,9 +233,9 @@
|
|||
* pointer source
|
||||
* @returns {Actions}
|
||||
*/
|
||||
pointerDown: function({button=0, sourceName=null}={}) {
|
||||
pointerDown: function(x, y, {origin="viewport", button=this.ButtonType.LEFT, sourceName=null}={}) {
|
||||
let source = this.getSource("pointer", sourceName);
|
||||
source.pointerDown(this, button);
|
||||
source.pointerDown(this, button, x, y, origin);
|
||||
return this;
|
||||
},
|
||||
|
||||
|
@ -239,7 +247,7 @@
|
|||
* source
|
||||
* @returns {Actions}
|
||||
*/
|
||||
pointerUp: function({button=0, sourceName=null}={}) {
|
||||
pointerUp: function({button=this.ButtonType.LEFT, sourceName=null}={}) {
|
||||
let source = this.getSource("pointer", sourceName);
|
||||
source.pointerUp(this, button);
|
||||
return this;
|
||||
|
@ -359,12 +367,12 @@
|
|||
return data;
|
||||
},
|
||||
|
||||
pointerDown: function(actions, button) {
|
||||
pointerDown: function(actions, button, x, y, origin) {
|
||||
let tick = actions.tickIdx;
|
||||
if (this.actions.has(tick)) {
|
||||
tick = actions.addTick().tickIdx;
|
||||
}
|
||||
this.actions.set(tick, {type: "pointerDown", button});
|
||||
this.actions.set(tick, {type: "pointerDown", button, x, y, origin});
|
||||
},
|
||||
|
||||
pointerUp: function(actions, button) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue