Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5318)

Unified Diff: chrome/test/chromedriver/js/get_element_region.js

Issue 591723002: [ChromeDriver] Fix clicking a map area broken by blink change 180610. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/chromedriver/js/get_element_region.js
diff --git a/chrome/test/chromedriver/js/get_element_region.js b/chrome/test/chromedriver/js/get_element_region.js
index 19cf11c8a83184052f918eb8930ada07bdb2154c..0ca871891a86a83be93b2ea8e5a9b46dc361c313 100644
--- a/chrome/test/chromedriver/js/get_element_region.js
+++ b/chrome/test/chromedriver/js/get_element_region.js
@@ -11,7 +11,11 @@ function getElementRegion(element) {
// and then the bounding client rect.
// SVG is one case that doesn't have a first client rect.
var clientRects = element.getClientRects();
- if (clientRects.length == 0) {
+
+ // Element area of a map has same first ClientRect and BoundingClientRect
+ // after blink roll at chromium commit position 290738 which includes blink
+ // revision 180610. Thus handle area as a special case.
+ if (clientRects.length == 0 || element.tagName.toLowerCase() == 'area') {
var box = element.getBoundingClientRect();
if (element.tagName.toLowerCase() == 'area') {
var coords = element.coords.split(',');
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698