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

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

Issue 1801363003: Add a $joinedDescendants output specifier. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix tests 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 | « no previous file | chrome/browser/resources/chromeos/chromevox/cvox2/background/live_regions_test.extjs » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 Implements support for live regions in ChromeVox Next. 6 * @fileoverview Implements support for live regions in ChromeVox Next.
7 */ 7 */
8 8
9 goog.provide('LiveRegions'); 9 goog.provide('LiveRegions');
10 10
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 return; 122 return;
123 } 123 }
124 124
125 var range = cursors.Range.fromNode(node); 125 var range = cursors.Range.fromNode(node);
126 var output = new Output(); 126 var output = new Output();
127 if (opt_prependFormatStr) 127 if (opt_prependFormatStr)
128 output.format(opt_prependFormatStr); 128 output.format(opt_prependFormatStr);
129 output.withSpeech(range, range, Output.EventType.NAVIGATE); 129 output.withSpeech(range, range, Output.EventType.NAVIGATE);
130 130
131 if (!output.hasSpeech && node.liveAtomic) 131 if (!output.hasSpeech && node.liveAtomic)
132 output.format('$descendants', node); 132 output.format('$joinedDescendants', node);
133 133
134 output.withSpeechCategory(cvox.TtsCategory.LIVE); 134 output.withSpeechCategory(cvox.TtsCategory.LIVE);
135 135
136 if (!output.hasSpeech) 136 if (!output.hasSpeech)
137 return; 137 return;
138 138
139 // Enqueue live region updates that were received at approximately 139 // Enqueue live region updates that were received at approximately
140 // the same time, otherwise flush previous live region updates. 140 // the same time, otherwise flush previous live region updates.
141 var currentTime = new Date(); 141 var currentTime = new Date();
142 var queueTime = LiveRegions.LIVE_REGION_QUEUE_TIME_MS; 142 var queueTime = LiveRegions.LIVE_REGION_QUEUE_TIME_MS;
(...skipping 11 matching lines...) Expand all
154 return; 154 return;
155 parent = parent.parent; 155 parent = parent.parent;
156 } 156 }
157 157
158 this.liveRegionNodeSet_.add(node); 158 this.liveRegionNodeSet_.add(node);
159 output.go(); 159 output.go();
160 }, 160 },
161 }; 161 };
162 162
163 }); // goog.scope 163 }); // goog.scope
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/chromeos/chromevox/cvox2/background/live_regions_test.extjs » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698