| Index: chrome/test/webdriver/commands/mouse_commands.cc
|
| diff --git a/chrome/test/webdriver/commands/mouse_commands.cc b/chrome/test/webdriver/commands/mouse_commands.cc
|
| index c331cbcd36e8d399e038671bc034ef01f8823198..d390a6d9100b5fce2ab671f07eb721f9ff85dc2d 100644
|
| --- a/chrome/test/webdriver/commands/mouse_commands.cc
|
| +++ b/chrome/test/webdriver/commands/mouse_commands.cc
|
| @@ -35,27 +35,13 @@ bool ElementMouseCommand::DoesPost() {
|
| }
|
|
|
| void ElementMouseCommand::ExecutePost(Response* response) {
|
| - Error* error = session_->CheckElementPreconditionsForClicking(element);
|
| - if (error) {
|
| - response->SetError(error);
|
| - return;
|
| - }
|
| -
|
| gfx::Point location;
|
| - error = session_->GetElementLocationInView(element, &location);
|
| - if (error) {
|
| - response->SetError(error);
|
| - return;
|
| - }
|
| -
|
| - gfx::Size size;
|
| - error = session_->GetElementSize(session_->current_target(), element, &size);
|
| + Error* error = session_->GetClickableLocation(element, &location);
|
| if (error) {
|
| response->SetError(error);
|
| return;
|
| }
|
|
|
| - location.Offset(size.width() / 2, size.height() / 2);
|
| error = Action(location);
|
| if (error) {
|
| response->SetError(error);
|
|
|