| OLD | NEW |
| 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 792 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 803 } | 803 } |
| 804 | 804 |
| 805 if (pred) { | 805 if (pred) { |
| 806 var bound = current.getBound(dir).node; | 806 var bound = current.getBound(dir).node; |
| 807 if (bound) { | 807 if (bound) { |
| 808 var node = AutomationUtil.findNextNode( | 808 var node = AutomationUtil.findNextNode( |
| 809 bound, dir, pred, {skipInitialAncestry: true}); | 809 bound, dir, pred, {skipInitialAncestry: true}); |
| 810 | 810 |
| 811 if (node) { | 811 if (node) { |
| 812 node = AutomationUtil.findNodePre( | 812 node = AutomationUtil.findNodePre( |
| 813 node, dir, AutomationPredicate.object) || node; | 813 node, Dir.FORWARD, AutomationPredicate.object) || node; |
| 814 } | 814 } |
| 815 | 815 |
| 816 if (node) { | 816 if (node) { |
| 817 current = cursors.Range.fromNode(node); | 817 current = cursors.Range.fromNode(node); |
| 818 } else { | 818 } else { |
| 819 if (predErrorMsg) { | 819 if (predErrorMsg) { |
| 820 cvox.ChromeVox.tts.speak(Msgs.getMsg(predErrorMsg), | 820 cvox.ChromeVox.tts.speak(Msgs.getMsg(predErrorMsg), |
| 821 cvox.QueueMode.FLUSH); | 821 cvox.QueueMode.FLUSH); |
| 822 } | 822 } |
| 823 return false; | 823 return false; |
| (...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1194 return glob.replace(/[.+^$(){}|[\]\\]/g, '\\$&') | 1194 return glob.replace(/[.+^$(){}|[\]\\]/g, '\\$&') |
| 1195 .replace(/\*/g, '.*') | 1195 .replace(/\*/g, '.*') |
| 1196 .replace(/\?/g, '.'); | 1196 .replace(/\?/g, '.'); |
| 1197 }).join('|') + ')$'); | 1197 }).join('|') + ')$'); |
| 1198 }; | 1198 }; |
| 1199 | 1199 |
| 1200 /** @type {Background} */ | 1200 /** @type {Background} */ |
| 1201 global.backgroundObj = new Background(); | 1201 global.backgroundObj = new Background(); |
| 1202 | 1202 |
| 1203 }); // goog.scope | 1203 }); // goog.scope |
| OLD | NEW |