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

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

Issue 2445003002: Reland: Make ChromeVox Next the default ChromeVox experience (Closed)
Patch Set: speculative fixes 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
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 976 matching lines...) Expand 10 before | Expand all | Expand 10 after
987 if (prevRange && !prevRange.isValid()) 987 if (prevRange && !prevRange.isValid())
988 prevRange = null; 988 prevRange = null;
989 989
990 // Scan unique ancestors to get the value of |outputContextFirst|. 990 // Scan unique ancestors to get the value of |outputContextFirst|.
991 var parent = range.start.node; 991 var parent = range.start.node;
992 var prevParent = prevRange ? prevRange.start.node : parent; 992 var prevParent = prevRange ? prevRange.start.node : parent;
993 if (!parent || !prevParent) 993 if (!parent || !prevParent)
994 return; 994 return;
995 var uniqueAncestors = AutomationUtil.getUniqueAncestors(prevParent, parent); 995 var uniqueAncestors = AutomationUtil.getUniqueAncestors(prevParent, parent);
996 for (var i = 0; parent = uniqueAncestors[i]; i++) { 996 for (var i = 0; parent = uniqueAncestors[i]; i++) {
997 if (parent.role == RoleType.window)
998 break;
997 if (Output.ROLE_INFO_[parent.role] && 999 if (Output.ROLE_INFO_[parent.role] &&
998 Output.ROLE_INFO_[parent.role].outputContextFirst) { 1000 Output.ROLE_INFO_[parent.role].outputContextFirst) {
999 this.outputContextFirst_ = true; 1001 this.outputContextFirst_ = true;
1000 break; 1002 break;
1001 } 1003 }
1002 } 1004 }
1003 1005
1004 if (range.isSubNode()) 1006 if (range.isSubNode())
1005 this.subNode_(range, prevRange, type, buff); 1007 this.subNode_(range, prevRange, type, buff);
1006 else 1008 else
(...skipping 762 matching lines...) Expand 10 before | Expand all | Expand 10 after
1769 /** 1771 /**
1770 * Gets the output buffer for braille. 1772 * Gets the output buffer for braille.
1771 * @return {!Spannable} 1773 * @return {!Spannable}
1772 */ 1774 */
1773 get brailleOutputForTest() { 1775 get brailleOutputForTest() {
1774 return this.createBrailleOutput_(); 1776 return this.createBrailleOutput_();
1775 } 1777 }
1776 }; 1778 };
1777 1779
1778 }); // goog.scope 1780 }); // goog.scope
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698