| 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 A class for walking tables. | 6 * @fileoverview A class for walking tables. |
| 7 * NOTE: This class has a very different interface than the other walkers. | 7 * NOTE: This class has a very different interface than the other walkers. |
| 8 * This means it does not lend itself easily to e.g. decorators. | 8 * This means it does not lend itself easily to e.g. decorators. |
| 9 * TODO (stoarca): This might be able to be fixed by breaking it up into | 9 * TODO (stoarca): This might be able to be fixed by breaking it up into |
| 10 * separate walkers for cell, row and column. | 10 * separate walkers for cell, row and column. |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 }, this)); | 197 }, this)); |
| 198 }; | 198 }; |
| 199 | 199 |
| 200 /** | 200 /** |
| 201 * @param {!cvox.CursorSelection} sel The current selection. | 201 * @param {!cvox.CursorSelection} sel The current selection. |
| 202 * @return {cvox.CursorSelection} The resulting selection. | 202 * @return {cvox.CursorSelection} The resulting selection. |
| 203 * @expose | 203 * @expose |
| 204 */ | 204 */ |
| 205 cvox.TableWalker.prototype.announceHeaders = function(sel) { | 205 cvox.TableWalker.prototype.announceHeaders = function(sel) { |
| 206 cvox.ChromeVox.tts.speak(this.getHeaderText_(sel), | 206 cvox.ChromeVox.tts.speak(this.getHeaderText_(sel), |
| 207 cvox.AbstractTts.QUEUE_MODE_FLUSH, | 207 cvox.QueueMode.FLUSH, |
| 208 cvox.AbstractTts.PERSONALITY_ANNOTATION); | 208 cvox.AbstractTts.PERSONALITY_ANNOTATION); |
| 209 return sel; | 209 return sel; |
| 210 }; | 210 }; |
| 211 | 211 |
| 212 /** | 212 /** |
| 213 * @param {!cvox.CursorSelection} sel The current selection. | 213 * @param {!cvox.CursorSelection} sel The current selection. |
| 214 * @return {cvox.CursorSelection} The resulting selection. | 214 * @return {cvox.CursorSelection} The resulting selection. |
| 215 * @expose | 215 * @expose |
| 216 */ | 216 */ |
| 217 cvox.TableWalker.prototype.speakTableLocation = function(sel) { | 217 cvox.TableWalker.prototype.speakTableLocation = function(sel) { |
| 218 cvox.ChromeVox.navigationManager.speakDescriptionArray( | 218 cvox.ChromeVox.navigationManager.speakDescriptionArray( |
| 219 this.getLocationDescription_(sel), | 219 this.getLocationDescription_(sel), |
| 220 cvox.AbstractTts.QUEUE_MODE_FLUSH, | 220 cvox.QueueMode.FLUSH, |
| 221 null); | 221 null); |
| 222 return sel; | 222 return sel; |
| 223 }; | 223 }; |
| 224 | 224 |
| 225 | 225 |
| 226 /** | 226 /** |
| 227 * @param {!cvox.CursorSelection} sel The current selection. | 227 * @param {!cvox.CursorSelection} sel The current selection. |
| 228 * @return {cvox.CursorSelection} The resulting selection. | 228 * @return {cvox.CursorSelection} The resulting selection. |
| 229 * @expose | 229 * @expose |
| 230 */ | 230 */ |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 412 * @return {Array.<number>} The position [x, y] of the selection. | 412 * @return {Array.<number>} The position [x, y] of the selection. |
| 413 * @private | 413 * @private |
| 414 */ | 414 */ |
| 415 cvox.TableWalker.prototype.syncPosition_ = function(sel) { | 415 cvox.TableWalker.prototype.syncPosition_ = function(sel) { |
| 416 var tableNode = this.getTableNode_(sel); | 416 var tableNode = this.getTableNode_(sel); |
| 417 this.tt.initialize(tableNode); | 417 this.tt.initialize(tableNode); |
| 418 // we need to align the TraverseTable with our sel because our walker | 418 // we need to align the TraverseTable with our sel because our walker |
| 419 // uses parts of it (for example isSpanned relies on being at a specific cell) | 419 // uses parts of it (for example isSpanned relies on being at a specific cell) |
| 420 return this.tt.findNearestCursor(sel.end.node); | 420 return this.tt.findNearestCursor(sel.end.node); |
| 421 }; | 421 }; |
| OLD | NEW |