Skip to content

Commit 3f8262b

Browse files
committed
Deleting obsolete functions used to get element size and position
1 parent 1d3df8c commit 3f8262b

File tree

2 files changed

+2
-31
lines changed

2 files changed

+2
-31
lines changed

javascript/firefox-driver/js/dispatcher.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,13 +201,13 @@ Dispatcher.prototype.init_ = function() {
201201
on(Request.Method.GET, Dispatcher.executeAs('isElementDisplayed'));
202202

203203
this.bind_('/session/:sessionId/element/:id/location').
204-
on(Request.Method.GET, Dispatcher.executeAs('getElementLocation'));
204+
on(Request.Method.GET, Dispatcher.executeAs('getElementRect'));
205205
this.bind_('/session/:sessionId/element/:id/location_in_view').
206206
on(Request.Method.GET, Dispatcher.executeAs(
207207
'getElementLocationOnceScrolledIntoView'));
208208

209209
this.bind_('/session/:sessionId/element/:id/size').
210-
on(Request.Method.GET, Dispatcher.executeAs('getElementSize'));
210+
on(Request.Method.GET, Dispatcher.executeAs('getElementRect'));
211211

212212
this.bind_('/session/:sessionId/element/:id/rect').
213213
on(Request.Method.GET, Dispatcher.executeAs('getElementRect'));

javascript/firefox-driver/js/wrappedElement.js

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -354,35 +354,6 @@ WebElement.isElementDisplayed = function(respond, parameters) {
354354
};
355355

356356

357-
WebElement.getElementLocation = function(respond, parameters) {
358-
var element = Utils.getElementAt(parameters.id,
359-
respond.session.getDocument());
360-
var win = respond.session.getWindow();
361-
362-
var location = Utils.getLocation(element);
363-
364-
respond.value = {
365-
x: Math.round(location.x + win.pageXOffset),
366-
y: Math.round(location.y + win.pageYOffset)
367-
};
368-
369-
respond.send();
370-
};
371-
372-
373-
WebElement.getElementSize = function(respond, parameters) {
374-
var element = Utils.getElementAt(parameters.id,
375-
respond.session.getDocument());
376-
377-
var box = Utils.getLocation(element);
378-
379-
respond.value = {
380-
width: Math.round(box.width),
381-
height: Math.round(box.height)
382-
};
383-
respond.send();
384-
};
385-
386357
WebElement.getElementRect = function(respond, parameters) {
387358
var element = Utils.getElementAt(parameters.id,
388359
respond.session.getDocument());

0 commit comments

Comments
 (0)