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

Side by Side Diff: ui/views/view.cc

Issue 2119413004: a11y: Exclude children of nested keyboard accessible controls from a11y tree. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Refactor to use ui::AX_ROLE_IGNORED for excluding a11y elements from the tree instead of focusabili… Created 3 years, 12 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 (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 #define _USE_MATH_DEFINES // For VC++ to get M_PI. This has to be first. 5 #define _USE_MATH_DEFINES // For VC++ to get M_PI. This has to be first.
6 6
7 #include "ui/views/view.h" 7 #include "ui/views/view.h"
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <cmath> 10 #include <cmath>
(...skipping 1321 matching lines...) Expand 10 before | Expand all | Expand 10 after
1332 } 1332 }
1333 1333
1334 // Accessibility---------------------------------------------------------------- 1334 // Accessibility----------------------------------------------------------------
1335 1335
1336 bool View::HandleAccessibleAction(const ui::AXActionData& action_data) { 1336 bool View::HandleAccessibleAction(const ui::AXActionData& action_data) {
1337 return false; 1337 return false;
1338 } 1338 }
1339 1339
1340 gfx::NativeViewAccessible View::GetNativeViewAccessible() { 1340 gfx::NativeViewAccessible View::GetNativeViewAccessible() {
1341 if (!native_view_accessibility_) 1341 if (!native_view_accessibility_)
1342 native_view_accessibility_ = NativeViewAccessibility::Create(this); 1342 native_view_accessibility_ = NativeViewAccessibility::GetOrCreate(this);
1343 if (native_view_accessibility_) 1343 if (native_view_accessibility_)
1344 return native_view_accessibility_->GetNativeObject(); 1344 return native_view_accessibility_->GetNativeObject();
1345 return NULL; 1345 return nullptr;
1346 } 1346 }
1347 1347
1348 void View::NotifyAccessibilityEvent( 1348 void View::NotifyAccessibilityEvent(
1349 ui::AXEvent event_type, 1349 ui::AXEvent event_type,
1350 bool send_native_event) { 1350 bool send_native_event) {
1351 if (ViewsDelegate::GetInstance()) 1351 if (ViewsDelegate::GetInstance())
1352 ViewsDelegate::GetInstance()->NotifyAccessibilityEvent(this, event_type); 1352 ViewsDelegate::GetInstance()->NotifyAccessibilityEvent(this, event_type);
1353 1353
1354 if (send_native_event && GetWidget()) { 1354 if (send_native_event && GetWidget()) {
1355 if (!native_view_accessibility_) 1355 if (!native_view_accessibility_)
1356 native_view_accessibility_ = NativeViewAccessibility::Create(this); 1356 native_view_accessibility_ = NativeViewAccessibility::GetOrCreate(this);
1357 if (native_view_accessibility_) 1357 if (native_view_accessibility_)
1358 native_view_accessibility_->NotifyAccessibilityEvent(event_type); 1358 native_view_accessibility_->NotifyAccessibilityEvent(event_type);
1359 } 1359 }
1360 } 1360 }
1361 1361
1362 // Scrolling ------------------------------------------------------------------- 1362 // Scrolling -------------------------------------------------------------------
1363 1363
1364 void View::ScrollRectToVisible(const gfx::Rect& rect) { 1364 void View::ScrollRectToVisible(const gfx::Rect& rect) {
1365 // We must take RTL UI mirroring into account when adjusting the position of 1365 // We must take RTL UI mirroring into account when adjusting the position of
1366 // the region. 1366 // the region.
(...skipping 1081 matching lines...) Expand 10 before | Expand all | Expand 10 after
2448 // Message the RootView to do the drag and drop. That way if we're removed 2448 // Message the RootView to do the drag and drop. That way if we're removed
2449 // the RootView can detect it and avoid calling us back. 2449 // the RootView can detect it and avoid calling us back.
2450 gfx::Point widget_location(event.location()); 2450 gfx::Point widget_location(event.location());
2451 ConvertPointToWidget(this, &widget_location); 2451 ConvertPointToWidget(this, &widget_location);
2452 widget->RunShellDrag(this, data, widget_location, drag_operations, source); 2452 widget->RunShellDrag(this, data, widget_location, drag_operations, source);
2453 // WARNING: we may have been deleted. 2453 // WARNING: we may have been deleted.
2454 return true; 2454 return true;
2455 } 2455 }
2456 2456
2457 } // namespace views 2457 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698