mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1245153 - Rename actions.js to action.js; r=automatedtester
MozReview-Commit-ID: 58v7aMH2deS
This commit is contained in:
parent
cfed1321e6
commit
dbfee71802
@ -12,16 +12,16 @@ Cu.import("chrome://marionette/content/event.js");
|
||||
const CONTEXT_MENU_DELAY_PREF = "ui.click_hold_context_menus.delay";
|
||||
const DEFAULT_CONTEXT_MENU_DELAY = 750; // ms
|
||||
|
||||
this.EXPORTED_SYMBOLS = ["actions"];
|
||||
this.EXPORTED_SYMBOLS = ["action"];
|
||||
|
||||
const logger = Log.repository.getLogger("Marionette");
|
||||
|
||||
this.actions = {};
|
||||
this.action = {};
|
||||
|
||||
/**
|
||||
* Functionality for (single finger) action chains.
|
||||
*/
|
||||
actions.Chain = function(checkForInterrupted) {
|
||||
action.Chain = function(checkForInterrupted) {
|
||||
// for assigning unique ids to all touches
|
||||
this.nextTouchId = 1000;
|
||||
// keep track of active Touches
|
||||
@ -47,7 +47,7 @@ actions.Chain = function(checkForInterrupted) {
|
||||
this.inputSource = null;
|
||||
};
|
||||
|
||||
actions.Chain.prototype.dispatchActions = function(
|
||||
action.Chain.prototype.dispatchActions = function(
|
||||
args,
|
||||
touchId,
|
||||
container,
|
||||
@ -105,7 +105,7 @@ actions.Chain.prototype.dispatchActions = function(
|
||||
* @param {Object} modifiers
|
||||
* An object of modifier keys present.
|
||||
*/
|
||||
actions.Chain.prototype.emitMouseEvent = function(
|
||||
action.Chain.prototype.emitMouseEvent = function(
|
||||
doc,
|
||||
type,
|
||||
elClientX,
|
||||
@ -147,7 +147,7 @@ actions.Chain.prototype.emitMouseEvent = function(
|
||||
/**
|
||||
* Reset any persisted values after a command completes.
|
||||
*/
|
||||
actions.Chain.prototype.resetValues = function() {
|
||||
action.Chain.prototype.resetValues = function() {
|
||||
this.onSuccess = null;
|
||||
this.onError = null;
|
||||
this.container = null;
|
||||
@ -163,7 +163,7 @@ actions.Chain.prototype.resetValues = function() {
|
||||
* keyModifiers is an object keeping track keyDown/keyUp pairs through
|
||||
* an action chain.
|
||||
*/
|
||||
actions.Chain.prototype.actions = function(chain, touchId, i, keyModifiers) {
|
||||
action.Chain.prototype.actions = function(chain, touchId, i, keyModifiers) {
|
||||
if (i == chain.length) {
|
||||
this.onSuccess(touchId || null);
|
||||
this.resetValues();
|
||||
@ -323,7 +323,7 @@ actions.Chain.prototype.actions = function(chain, touchId, i, keyModifiers) {
|
||||
* Y coordinate relative to target. If unspecified, the centre of
|
||||
* the target is used.
|
||||
*/
|
||||
actions.Chain.prototype.coordinates = function(target, x, y) {
|
||||
action.Chain.prototype.coordinates = function(target, x, y) {
|
||||
let box = target.getBoundingClientRect();
|
||||
if (x == null) {
|
||||
x = box.width / 2;
|
||||
@ -341,7 +341,7 @@ actions.Chain.prototype.coordinates = function(target, x, y) {
|
||||
* Given an element and a pair of coordinates, returns an array of the
|
||||
* form [clientX, clientY, pageX, pageY, screenX, screenY].
|
||||
*/
|
||||
actions.Chain.prototype.getCoordinateInfo = function(el, corx, cory) {
|
||||
action.Chain.prototype.getCoordinateInfo = function(el, corx, cory) {
|
||||
let win = el.ownerDocument.defaultView;
|
||||
return [
|
||||
corx, // clientX
|
||||
@ -361,7 +361,7 @@ actions.Chain.prototype.getCoordinateInfo = function(el, corx, cory) {
|
||||
* Y coordinate of the location to generate the event that is relative
|
||||
* to the viewport.
|
||||
*/
|
||||
actions.Chain.prototype.generateEvents = function(
|
||||
action.Chain.prototype.generateEvents = function(
|
||||
type, x, y, touchId, target, keyModifiers) {
|
||||
this.lastCoordinates = [x, y];
|
||||
let doc = this.container.frame.document;
|
||||
@ -494,7 +494,7 @@ actions.Chain.prototype.generateEvents = function(
|
||||
this.checkForInterrupted();
|
||||
};
|
||||
|
||||
actions.Chain.prototype.mouseTap = function(doc, x, y, button, count, mod) {
|
||||
action.Chain.prototype.mouseTap = function(doc, x, y, button, count, mod) {
|
||||
this.emitMouseEvent(doc, "mousemove", x, y, button, count, mod);
|
||||
this.emitMouseEvent(doc, "mousedown", x, y, button, count, mod);
|
||||
this.emitMouseEvent(doc, "mouseup", x, y, button, count, mod);
|
@ -23,7 +23,7 @@ this.DevToolsUtils = devtools.require("devtools/shared/DevToolsUtils");
|
||||
XPCOMUtils.defineLazyServiceGetter(
|
||||
this, "cookieManager", "@mozilla.org/cookiemanager;1", "nsICookieManager2");
|
||||
|
||||
Cu.import("chrome://marionette/content/actions.js");
|
||||
Cu.import("chrome://marionette/content/action.js");
|
||||
Cu.import("chrome://marionette/content/atom.js");
|
||||
Cu.import("chrome://marionette/content/interaction.js");
|
||||
Cu.import("chrome://marionette/content/element.js");
|
||||
@ -133,7 +133,7 @@ this.GeckoDriver = function(appName, device, stopSignal, emulator) {
|
||||
this.oopFrameId = null;
|
||||
this.observing = null;
|
||||
this._browserIds = new WeakMap();
|
||||
this.actions = new actions.Chain();
|
||||
this.actions = new action.Chain();
|
||||
|
||||
this.sessionCapabilities = {
|
||||
// mandated capabilities
|
||||
|
@ -160,7 +160,7 @@ event.sendKey = function(key, window = undefined) {
|
||||
event.synthesizeKey(keyName, {shiftKey: false}, window);
|
||||
};
|
||||
|
||||
// TODO(ato): Unexpose this when actions.Chain#emitMouseEvent
|
||||
// TODO(ato): Unexpose this when action.Chain#emitMouseEvent
|
||||
// no longer emits its own events
|
||||
event.parseModifiers_ = function(event) {
|
||||
let mval = 0;
|
||||
|
@ -6,7 +6,7 @@ marionette.jar:
|
||||
% content marionette %content/
|
||||
content/server.js (server.js)
|
||||
content/driver.js (driver.js)
|
||||
content/actions.js (actions.js)
|
||||
content/action.js (action.js)
|
||||
content/interaction.js (interaction.js)
|
||||
content/accessibility.js (accessibility.js)
|
||||
content/listener.js (listener.js)
|
||||
|
@ -13,7 +13,7 @@ var loader = Cc["@mozilla.org/moz/jssubscript-loader;1"]
|
||||
loader.loadSubScript("chrome://marionette/content/simpletest.js");
|
||||
loader.loadSubScript("chrome://marionette/content/common.js");
|
||||
|
||||
Cu.import("chrome://marionette/content/actions.js");
|
||||
Cu.import("chrome://marionette/content/action.js");
|
||||
Cu.import("chrome://marionette/content/atom.js");
|
||||
Cu.import("chrome://marionette/content/capture.js");
|
||||
Cu.import("chrome://marionette/content/cookies.js");
|
||||
@ -45,7 +45,7 @@ var elementManager = new ElementManager([]);
|
||||
var capabilities = {};
|
||||
var interactions = new Interactions(() => capabilities);
|
||||
|
||||
var actions = new actions.Chain(checkForInterrupted);
|
||||
var actions = new action.Chain(checkForInterrupted);
|
||||
var importedScripts = null;
|
||||
|
||||
// Contains the last file input element that was the target of
|
||||
|
Loading…
Reference in New Issue
Block a user