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

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

Issue 1716663002: Add a treeChange type to Automation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: git cl set_commit Created 4 years, 10 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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 return; 89 return;
90 } 90 }
91 91
92 var type = treeChange.type; 92 var type = treeChange.type;
93 var relevant = node.containerLiveRelevant; 93 var relevant = node.containerLiveRelevant;
94 if (relevant.indexOf('additions') >= 0 && 94 if (relevant.indexOf('additions') >= 0 &&
95 (type == 'nodeCreated' || type == 'subtreeCreated')) { 95 (type == 'nodeCreated' || type == 'subtreeCreated')) {
96 this.outputLiveRegionChange_(node, null); 96 this.outputLiveRegionChange_(node, null);
97 } 97 }
98 98
99 if (relevant.indexOf('text') >= 0 && type == 'nodeChanged') 99 if (relevant.indexOf('text') >= 0 && type == 'textChanged')
100 this.outputLiveRegionChange_(node, null); 100 this.outputLiveRegionChange_(node, null);
101 101
102 if (relevant.indexOf('removals') >= 0 && type == 'nodeRemoved') 102 if (relevant.indexOf('removals') >= 0 && type == 'nodeRemoved')
103 this.outputLiveRegionChange_(node, '@live_regions_removed'); 103 this.outputLiveRegionChange_(node, '@live_regions_removed');
104 }, 104 },
105 105
106 /** 106 /**
107 * Given a node that needs to be spoken as part of a live region 107 * Given a node that needs to be spoken as part of a live region
108 * change and an additional optional format string, output the 108 * change and an additional optional format string, output the
109 * live region description. 109 * live region description.
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
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