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

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: Fix CrOS. Created 3 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 side-by-side diff with in-line comments
Download patch
Index: ui/views/view.cc
diff --git a/ui/views/view.cc b/ui/views/view.cc
index 04c5f2fae25957c3ca3b706654e263fc8b3c6638..17bf01916eac6a4ad52ab1a8d01d49f22ed6a95b 100644
--- a/ui/views/view.cc
+++ b/ui/views/view.cc
@@ -145,8 +145,7 @@ View::View()
previous_focusable_view_(NULL),
focus_behavior_(FocusBehavior::NEVER),
context_menu_controller_(NULL),
- drag_controller_(NULL),
- native_view_accessibility_(NULL) {
+ drag_controller_(NULL) {
SetTargetHandler(this);
}
@@ -164,11 +163,6 @@ View::~View() {
delete child;
}
}
-
- // Release ownership of the native accessibility object, but it's
- // reference-counted on some platforms, so it may not be deleted right away.
- if (native_view_accessibility_)
- native_view_accessibility_->Destroy();
}
// Tree operations -------------------------------------------------------------
@@ -1422,10 +1416,10 @@ bool View::HandleAccessibleAction(const ui::AXActionData& action_data) {
gfx::NativeViewAccessible View::GetNativeViewAccessible() {
if (!native_view_accessibility_)
- native_view_accessibility_ = NativeViewAccessibility::Create(this);
+ native_view_accessibility_ = NativeViewAccessibility::CreateForView(this);
if (native_view_accessibility_)
return native_view_accessibility_->GetNativeObject();
- return NULL;
+ return nullptr;
}
void View::NotifyAccessibilityEvent(
@@ -1436,7 +1430,7 @@ void View::NotifyAccessibilityEvent(
if (send_native_event && GetWidget()) {
if (!native_view_accessibility_)
- native_view_accessibility_ = NativeViewAccessibility::Create(this);
+ native_view_accessibility_ = NativeViewAccessibility::CreateForView(this);
if (native_view_accessibility_)
native_view_accessibility_->NotifyAccessibilityEvent(event_type);
}

Powered by Google App Engine
This is Rietveld 408576698