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

Side by Side Diff: content/browser/accessibility/browser_accessibility_manager_win.cc

Issue 1923663002: Don't suppress the load complete accessibility event (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "content/browser/accessibility/browser_accessibility_manager_win.h" 5 #include "content/browser/accessibility/browser_accessibility_manager_win.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <vector> 10 #include <vector>
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 // Don't fire events when this document might be stale as the user has 148 // Don't fire events when this document might be stale as the user has
149 // started navigating to a new document. 149 // started navigating to a new document.
150 if (user_is_navigating_away_) 150 if (user_is_navigating_away_)
151 return; 151 return;
152 152
153 // Inline text boxes are an internal implementation detail, we don't 153 // Inline text boxes are an internal implementation detail, we don't
154 // expose them to Windows. 154 // expose them to Windows.
155 if (node->GetRole() == ui::AX_ROLE_INLINE_TEXT_BOX) 155 if (node->GetRole() == ui::AX_ROLE_INLINE_TEXT_BOX)
156 return; 156 return;
157 157
158 // Don't fire focus, blur, or load complete notifications if the
159 // window isn't focused, because that can confuse screen readers into
160 // entering their "browse" mode.
161 if ((event_type == ui::AX_EVENT_FOCUS ||
162 event_type == ui::AX_EVENT_BLUR ||
163 event_type == ui::AX_EVENT_LOAD_COMPLETE) &&
164 !NativeViewHasFocus()) {
165 return;
166 }
167
168 LONG event_id = EVENT_MIN; 158 LONG event_id = EVENT_MIN;
169 switch (event_type) { 159 switch (event_type) {
170 case ui::AX_EVENT_ACTIVEDESCENDANTCHANGED: 160 case ui::AX_EVENT_ACTIVEDESCENDANTCHANGED:
171 event_id = IA2_EVENT_ACTIVE_DESCENDANT_CHANGED; 161 event_id = IA2_EVENT_ACTIVE_DESCENDANT_CHANGED;
172 break; 162 break;
173 case ui::AX_EVENT_ALERT: 163 case ui::AX_EVENT_ALERT:
174 event_id = EVENT_SYSTEM_ALERT; 164 event_id = EVENT_SYSTEM_ALERT;
175 break; 165 break;
176 case ui::AX_EVENT_AUTOCORRECTION_OCCURED: 166 case ui::AX_EVENT_AUTOCORRECTION_OCCURED:
177 event_id = IA2_EVENT_OBJECT_ATTRIBUTE_CHANGED; 167 event_id = IA2_EVENT_OBJECT_ATTRIBUTE_CHANGED;
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 326
337 void BrowserAccessibilityManagerWin::TrackScrollingObject( 327 void BrowserAccessibilityManagerWin::TrackScrollingObject(
338 BrowserAccessibilityWin* node) { 328 BrowserAccessibilityWin* node) {
339 if (tracked_scroll_object_) 329 if (tracked_scroll_object_)
340 tracked_scroll_object_->Release(); 330 tracked_scroll_object_->Release();
341 tracked_scroll_object_ = node; 331 tracked_scroll_object_ = node;
342 tracked_scroll_object_->AddRef(); 332 tracked_scroll_object_->AddRef();
343 } 333 }
344 334
345 } // namespace content 335 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698