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

Side by Side Diff: ui/accessibility/ax_tree.cc

Issue 332893004: Fix bug where NVDA wouldn't enter browse mode on page load. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@simpler_race_fix
Patch Set: Created 6 years, 6 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #include "ui/accessibility/ax_tree.h" 5 #include "ui/accessibility/ax_tree.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 } else { 162 } else {
163 if (src.role != AX_ROLE_ROOT_WEB_AREA) { 163 if (src.role != AX_ROLE_ROOT_WEB_AREA) {
164 error_ = base::StringPrintf( 164 error_ = base::StringPrintf(
165 "%d is not in the tree and not the new root", src.id); 165 "%d is not in the tree and not the new root", src.id);
166 return false; 166 return false;
167 } 167 }
168 new_node = CreateNode(NULL, src.id, 0); 168 new_node = CreateNode(NULL, src.id, 0);
169 node = new_node; 169 node = new_node;
170 update_state->new_nodes.insert(node); 170 update_state->new_nodes.insert(node);
171 node->SetData(src); 171 node->SetData(src);
172 if (delegate_)
aboxhall 2014/06/12 22:31:45 Suggestion: pull these two lines out below the who
dmazzoni 2014/06/12 23:27:22 Done.
173 delegate_->OnNodeChanged(node);
172 } 174 }
173 175
174 // First, delete nodes that used to be children of this node but aren't 176 // First, delete nodes that used to be children of this node but aren't
175 // anymore. 177 // anymore.
176 if (!DeleteOldChildren(node, src.child_ids)) { 178 if (!DeleteOldChildren(node, src.child_ids)) {
177 if (new_node) 179 if (new_node)
178 DestroyNodeAndSubtree(new_node); 180 DestroyNodeAndSubtree(new_node);
179 return false; 181 return false;
180 } 182 }
181 183
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 update_state->pending_nodes.insert(child); 261 update_state->pending_nodes.insert(child);
260 update_state->new_nodes.insert(child); 262 update_state->new_nodes.insert(child);
261 } 263 }
262 new_children->push_back(child); 264 new_children->push_back(child);
263 } 265 }
264 266
265 return success; 267 return success;
266 } 268 }
267 269
268 } // namespace ui 270 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698