| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 var AutomationEvent = require('automationEvent').AutomationEvent; | 5 var AutomationEvent = require('automationEvent').AutomationEvent; |
| 6 var automationInternal = | 6 var automationInternal = |
| 7 require('binding').Binding.create('automationInternal').generate(); | 7 require('binding').Binding.create('automationInternal').generate(); |
| 8 var exceptionHandler = require('uncaught_exception_handler'); | 8 var exceptionHandler = require('uncaught_exception_handler'); |
| 9 var IsInteractPermitted = | 9 var IsInteractPermitted = |
| 10 requireNative('automationInternal').IsInteractPermitted; | 10 requireNative('automationInternal').IsInteractPermitted; |
| (...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 391 getImageData: function(maxWidth, maxHeight) { | 391 getImageData: function(maxWidth, maxHeight) { |
| 392 this.performAction_('getImageData', | 392 this.performAction_('getImageData', |
| 393 { maxWidth: maxWidth, | 393 { maxWidth: maxWidth, |
| 394 maxHeight: maxHeight }); | 394 maxHeight: maxHeight }); |
| 395 }, | 395 }, |
| 396 | 396 |
| 397 hitTest: function(x, y, eventToFire) { | 397 hitTest: function(x, y, eventToFire) { |
| 398 // Convert from global to tree-relative coordinates. | 398 // Convert from global to tree-relative coordinates. |
| 399 var location = GetLocation(this.treeID, GetRootID(this.treeID)); | 399 var location = GetLocation(this.treeID, GetRootID(this.treeID)); |
| 400 this.performAction_('hitTest', | 400 this.performAction_('hitTest', |
| 401 { x: x - location.left, | 401 { x: Math.floor(x - location.left), |
| 402 y: y - location.top, | 402 y: Math.floor(y - location.top), |
| 403 eventToFire: eventToFire }); | 403 eventToFire: eventToFire }); |
| 404 }, | 404 }, |
| 405 | 405 |
| 406 makeVisible: function() { | 406 makeVisible: function() { |
| 407 this.performAction_('makeVisible'); | 407 this.performAction_('makeVisible'); |
| 408 }, | 408 }, |
| 409 | 409 |
| 410 resumeMedia: function() { | 410 resumeMedia: function() { |
| 411 this.performAction_('resumeMedia'); | 411 this.performAction_('resumeMedia'); |
| 412 }, | 412 }, |
| (...skipping 753 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1166 utils.defineProperty(AutomationRootNode, 'getOrCreate', function(treeID) { | 1166 utils.defineProperty(AutomationRootNode, 'getOrCreate', function(treeID) { |
| 1167 return AutomationRootNodeImpl.getOrCreate(treeID); | 1167 return AutomationRootNodeImpl.getOrCreate(treeID); |
| 1168 }); | 1168 }); |
| 1169 | 1169 |
| 1170 utils.defineProperty(AutomationRootNode, 'destroy', function(treeID) { | 1170 utils.defineProperty(AutomationRootNode, 'destroy', function(treeID) { |
| 1171 AutomationRootNodeImpl.destroy(treeID); | 1171 AutomationRootNodeImpl.destroy(treeID); |
| 1172 }); | 1172 }); |
| 1173 | 1173 |
| 1174 exports.$set('AutomationNode', AutomationNode); | 1174 exports.$set('AutomationNode', AutomationNode); |
| 1175 exports.$set('AutomationRootNode', AutomationRootNode); | 1175 exports.$set('AutomationRootNode', AutomationRootNode); |
| OLD | NEW |