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

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

Issue 1081803005: Fix warnings and errors in ChromeVox since Closure compiler update. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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
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 Provides output services for ChromeVox. 6 * @fileoverview Provides output services for ChromeVox.
7 */ 7 */
8 8
9 goog.provide('Output'); 9 goog.provide('Output');
10 goog.provide('Output.EventType'); 10 goog.provide('Output.EventType');
(...skipping 518 matching lines...) Expand 10 before | Expand all | Expand 10 after
529 node.attributes.textSelEnd)); 529 node.attributes.textSelEnd));
530 } 530 }
531 } 531 }
532 // Annotate this as a name so we don't duplicate names from ancestors. 532 // Annotate this as a name so we don't duplicate names from ancestors.
533 if (node.role == chrome.automation.RoleType.inlineTextBox) 533 if (node.role == chrome.automation.RoleType.inlineTextBox)
534 token = 'name'; 534 token = 'name';
535 options.annotation.push(token); 535 options.annotation.push(token);
536 this.append_(buff, text, options); 536 this.append_(buff, text, options);
537 } else if (token == 'indexInParent') { 537 } else if (token == 'indexInParent') {
538 options.annotation.push(token); 538 options.annotation.push(token);
539 this.append_(buff, node.indexInParent + 1); 539 this.append_(buff, String(node.indexInParent + 1));
540 } else if (token == 'parentChildCount') { 540 } else if (token == 'parentChildCount') {
541 options.annotation.push(token); 541 options.annotation.push(token);
542 if (node.parent) 542 if (node.parent)
543 this.append_(buff, node.parent.children.length); 543 this.append_(buff, String(node.parent.children.length));
544 } else if (token == 'state') { 544 } else if (token == 'state') {
545 options.annotation.push(token); 545 options.annotation.push(token);
546 Object.getOwnPropertyNames(node.state).forEach(function(s) { 546 Object.getOwnPropertyNames(node.state).forEach(function(s) {
547 this.append_(buff, s, options); 547 this.append_(buff, s, options);
548 }.bind(this)); 548 }.bind(this));
549 } else if (token == 'find') { 549 } else if (token == 'find') {
550 // Find takes two arguments: JSON query string and format string. 550 // Find takes two arguments: JSON query string and format string.
551 if (tree.firstChild) { 551 if (tree.firstChild) {
552 var jsonQuery = tree.firstChild.value; 552 var jsonQuery = tree.firstChild.value;
553 node = node.find( 553 node = node.find(
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
867 } 867 }
868 868
869 if (currentNode != root) 869 if (currentNode != root)
870 throw 'Unbalanced parenthesis.'; 870 throw 'Unbalanced parenthesis.';
871 871
872 return root; 872 return root;
873 } 873 }
874 }; 874 };
875 875
876 }); // goog.scope 876 }); // goog.scope
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698