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

Unified Diff: chrome/browser/resources/chromeos/chromevox/cvox2/background/command_handler.js

Issue 2795083003: Add support for in-page links in ChromeVox. (Closed)
Patch Set: Make getTree take optional callback as well. Created 3 years, 8 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
Index: chrome/browser/resources/chromeos/chromevox/cvox2/background/command_handler.js
diff --git a/chrome/browser/resources/chromeos/chromevox/cvox2/background/command_handler.js b/chrome/browser/resources/chromeos/chromevox/cvox2/background/command_handler.js
index fe87f8026ad4a47a50484650eaa79625ead8560d..9cc9cd73d552e55830c2a2046ce9a11c7f3f3739 100644
--- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/command_handler.js
+++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/command_handler.js
@@ -456,11 +456,17 @@ CommandHandler.onCommand = function(command) {
current = cursors.Range.fromNode(node);
break;
case 'forceClickOnCurrentItem':
- if (ChromeVoxState.instance.currentRange_) {
- var actionNode = ChromeVoxState.instance.currentRange_.start.node;
- if (actionNode.role == RoleType.INLINE_TEXT_BOX)
+ if (ChromeVoxState.instance.currentRange) {
+ var actionNode = ChromeVoxState.instance.currentRange.start.node;
+ while (actionNode.role == RoleType.INLINE_TEXT_BOX ||
+ actionNode.role == RoleType.STATIC_TEXT)
actionNode = actionNode.parent;
- actionNode.doDefault();
+ if (actionNode.inPageLinkTarget) {
+ ChromeVoxState.instance.navigateToRange(
+ cursors.Range.fromNode(actionNode.inPageLinkTarget));
+ } else {
+ actionNode.doDefault();
+ }
}
// Skip all other processing; if focus changes, we should get an event
// for that.

Powered by Google App Engine
This is Rietveld 408576698