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

Unified 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: Before revert of cross-platform ignored a11y elements. Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/view.h ('k') | ui/views/widget/native_widget_mac_accessibility_unittest.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/view.cc
diff --git a/ui/views/view.cc b/ui/views/view.cc
index 3cb42dca9dab0b6b57422f07348b4cc15293f3fa..30967d3c7d8e2ed8c8cd792891542ffa3a038b1d 100644
--- a/ui/views/view.cc
+++ b/ui/views/view.cc
@@ -1323,12 +1323,16 @@ bool View::ExceededDragThreshold(const gfx::Vector2d& delta) {
// Accessibility----------------------------------------------------------------
-gfx::NativeViewAccessible View::GetNativeViewAccessible() {
+NativeViewAccessibility* View::GetNativeViewAccessibility() {
if (!native_view_accessibility_)
native_view_accessibility_ = NativeViewAccessibility::Create(this);
- if (native_view_accessibility_)
- return native_view_accessibility_->GetNativeObject();
- return NULL;
+ return native_view_accessibility_;
+}
+
+gfx::NativeViewAccessible View::GetNativeViewAccessible() {
+ if (GetNativeViewAccessibility())
+ return GetNativeViewAccessibility()->GetNativeObject();
+ return nullptr;
}
void View::NotifyAccessibilityEvent(
@@ -1338,10 +1342,8 @@ void View::NotifyAccessibilityEvent(
ViewsDelegate::GetInstance()->NotifyAccessibilityEvent(this, event_type);
if (send_native_event && GetWidget()) {
- if (!native_view_accessibility_)
- native_view_accessibility_ = NativeViewAccessibility::Create(this);
- if (native_view_accessibility_)
- native_view_accessibility_->NotifyAccessibilityEvent(event_type);
+ if (GetNativeViewAccessibility())
+ GetNativeViewAccessibility()->NotifyAccessibilityEvent(event_type);
}
}
« no previous file with comments | « ui/views/view.h ('k') | ui/views/widget/native_widget_mac_accessibility_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698