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

Side by Side Diff: chrome/browser/resources/chromeos/chromevox/cvox2/background/automation_util.js

Issue 2092743002: Revert of Make ChromeVox Next a setting in options page. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 unified diff | Download patch
OLDNEW
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 /** 5 /**
6 * @fileoverview ChromeVox utilities for the automation extension API. 6 * @fileoverview ChromeVox utilities for the automation extension API.
7 */ 7 */
8 8
9 goog.provide('AutomationUtil'); 9 goog.provide('AutomationUtil');
10 10
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 return hit; 284 return hit;
285 child = child.nextSibling; 285 child = child.nextSibling;
286 } 286 }
287 287
288 if (point.x <= (loc.left + loc.width) && point.x >= loc.left && 288 if (point.x <= (loc.left + loc.width) && point.x >= loc.left &&
289 point.y <= (loc.top + loc.height) && point.y >= loc.top) 289 point.y <= (loc.top + loc.height) && point.y >= loc.top)
290 return node; 290 return node;
291 return null; 291 return null;
292 }; 292 };
293 293
294 /**
295 * Gets a top level root.
296 * @param {!AutomationNode} node
297 * @return {AutomationNode}
298 */
299 AutomationUtil.getTopLevelRoot = function(node) {
300 var root = node.root;
301 if (!root || root.role == RoleType.desktop)
302 return null;
303
304 while (root &&
305 root.parent &&
306 root.parent.root &&
307 root.parent.root.role != RoleType.desktop) {
308 root = root.parent.root;
309 }
310 return root;
311 };
312
313 }); // goog.scope 294 }); // goog.scope
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698