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

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

Issue 2508233002: Don't set sequential focus for offscreen nodes (Closed)
Patch Set: 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 | no next file » | 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 813 matching lines...) Expand 10 before | Expand all | Expand 10 after
824 if (!ancestor.state.focused) 824 if (!ancestor.state.focused)
825 ancestor.focus(); 825 ancestor.focus();
826 return; 826 return;
827 } 827 }
828 ancestor = ancestor.parent; 828 ancestor = ancestor.parent;
829 } 829 }
830 830
831 // If nothing is focusable, set the sequential focus navigation starting 831 // If nothing is focusable, set the sequential focus navigation starting
832 // point, which ensures that the next time you press Tab, you'll reach 832 // point, which ensures that the next time you press Tab, you'll reach
833 // the next or previous focusable node from |start|. 833 // the next or previous focusable node from |start|.
834 start.setSequentialFocusNavigationStartingPoint(); 834 if (!start.state.offscreen)
835 start.setSequentialFocusNavigationStartingPoint();
835 } 836 }
836 }; 837 };
837 838
838 /** 839 /**
839 * Converts a list of globs, as used in the extension manifest, to a regular 840 * Converts a list of globs, as used in the extension manifest, to a regular
840 * expression that matches if and only if any of the globs in the list matches. 841 * expression that matches if and only if any of the globs in the list matches.
841 * @param {!Array<string>} globs 842 * @param {!Array<string>} globs
842 * @return {!RegExp} 843 * @return {!RegExp}
843 * @private 844 * @private
844 */ 845 */
845 Background.globsToRegExp_ = function(globs) { 846 Background.globsToRegExp_ = function(globs) {
846 return new RegExp('^(' + globs.map(function(glob) { 847 return new RegExp('^(' + globs.map(function(glob) {
847 return glob.replace(/[.+^$(){}|[\]\\]/g, '\\$&') 848 return glob.replace(/[.+^$(){}|[\]\\]/g, '\\$&')
848 .replace(/\*/g, '.*') 849 .replace(/\*/g, '.*')
849 .replace(/\?/g, '.'); 850 .replace(/\?/g, '.');
850 }).join('|') + ')$'); 851 }).join('|') + ')$');
851 }; 852 };
852 853
853 new Background(); 854 new Background();
854 855
855 }); // goog.scope 856 }); // goog.scope
OLDNEW
« 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