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

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

Issue 2487043002: Refine braille output (Closed)
Patch Set: Add additional test. Created 4 years, 1 month 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
« no previous file with comments | « no previous file | chrome/browser/resources/chromeos/chromevox/cvox2/background/background_test.extjs » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 The entry point for all ChromeVox2 related code for the 6 * @fileoverview The entry point for all ChromeVox2 related code for the
7 * background page. 7 * background page.
8 */ 8 */
9 9
10 goog.provide('Background'); 10 goog.provide('Background');
(...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after
651 } 651 }
652 }); 652 });
653 if (!actionNodeSpan) 653 if (!actionNodeSpan)
654 return; 654 return;
655 var actionNode = actionNodeSpan.node; 655 var actionNode = actionNodeSpan.node;
656 if (actionNode.role === RoleType.inlineTextBox) 656 if (actionNode.role === RoleType.inlineTextBox)
657 actionNode = actionNode.parent; 657 actionNode = actionNode.parent;
658 actionNode.doDefault(); 658 actionNode.doDefault();
659 if (selectionSpan) { 659 if (selectionSpan) {
660 var start = text.getSpanStart(selectionSpan); 660 var start = text.getSpanStart(selectionSpan);
661 var targetPosition = position - start + selectionSpan.offset; 661 var targetPosition = position - start;
662 actionNode.setSelection(targetPosition, targetPosition); 662 actionNode.setSelection(targetPosition, targetPosition);
663 } 663 }
664 }, 664 },
665 665
666 /** 666 /**
667 * @param {Object} msg A message sent from a content script. 667 * @param {Object} msg A message sent from a content script.
668 * @param {Port} port 668 * @param {Port} port
669 * @private 669 * @private
670 */ 670 */
671 onMessage_: function(msg, port) { 671 onMessage_: function(msg, port) {
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
825 return new RegExp('^(' + globs.map(function(glob) { 825 return new RegExp('^(' + globs.map(function(glob) {
826 return glob.replace(/[.+^$(){}|[\]\\]/g, '\\$&') 826 return glob.replace(/[.+^$(){}|[\]\\]/g, '\\$&')
827 .replace(/\*/g, '.*') 827 .replace(/\*/g, '.*')
828 .replace(/\?/g, '.'); 828 .replace(/\?/g, '.');
829 }).join('|') + ')$'); 829 }).join('|') + ')$');
830 }; 830 };
831 831
832 new Background(); 832 new Background();
833 833
834 }); // goog.scope 834 }); // goog.scope
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/chromeos/chromevox/cvox2/background/background_test.extjs » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698