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

Side by Side Diff: chrome/browser/resources/chromeos/chromevox/walkers/table_walker.js

Issue 1774743002: Fix some ChromeVox Closure compiler errors. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/resources/chromeos/chromevox/walkers/layout_line_walker.js ('k') | 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 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 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 /** 377 /**
378 * Wrapper for going to somewhere so that boilerplate is not repeated. 378 * Wrapper for going to somewhere so that boilerplate is not repeated.
379 * @param {!cvox.CursorSelection} sel The selection from which to base the 379 * @param {!cvox.CursorSelection} sel The selection from which to base the
380 * movement. 380 * movement.
381 * @param {function(Array<number>):boolean} f The function to use for moving. 381 * @param {function(Array<number>):boolean} f The function to use for moving.
382 * Returns true on success and false on failure. 382 * Returns true on success and false on failure.
383 * @return {cvox.CursorSelection} The resulting selection. 383 * @return {cvox.CursorSelection} The resulting selection.
384 * @private 384 * @private
385 */ 385 */
386 cvox.TableWalker.prototype.goTo_ = function(sel, f) { 386 cvox.TableWalker.prototype.goTo_ = function(sel, f) {
387 if (!sel.end.node) {
388 return null;
389 }
387 this.tt.initialize(this.getTableNode_(sel)); 390 this.tt.initialize(this.getTableNode_(sel));
388 var position = this.tt.findNearestCursor(sel.end.node); 391 var position = this.tt.findNearestCursor(sel.end.node);
389 if (!position) { 392 if (!position) {
390 return null; 393 return null;
391 } 394 }
392 this.tt.goToCell(position); 395 this.tt.goToCell(position);
393 if (!f(position)) { 396 if (!f(position)) {
394 return null; 397 return null;
395 } 398 }
396 return cvox.CursorSelection.fromNode(this.tt.getCell()). 399 return cvox.CursorSelection.fromNode(this.tt.getCell()).
(...skipping 16 matching lines...) Expand all
413 * @return {Array<number>} The position [x, y] of the selection. 416 * @return {Array<number>} The position [x, y] of the selection.
414 * @private 417 * @private
415 */ 418 */
416 cvox.TableWalker.prototype.syncPosition_ = function(sel) { 419 cvox.TableWalker.prototype.syncPosition_ = function(sel) {
417 var tableNode = this.getTableNode_(sel); 420 var tableNode = this.getTableNode_(sel);
418 this.tt.initialize(tableNode); 421 this.tt.initialize(tableNode);
419 // we need to align the TraverseTable with our sel because our walker 422 // we need to align the TraverseTable with our sel because our walker
420 // uses parts of it (for example isSpanned relies on being at a specific cell) 423 // uses parts of it (for example isSpanned relies on being at a specific cell)
421 return this.tt.findNearestCursor(sel.end.node); 424 return this.tt.findNearestCursor(sel.end.node);
422 }; 425 };
OLDNEW
« no previous file with comments | « chrome/browser/resources/chromeos/chromevox/walkers/layout_line_walker.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698