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

Unified Diff: ui/views/accessibility/ax_window_obj_wrapper.cc

Issue 2929673002: Add null check when reporting changed nodes to an AX tree. (Closed)
Patch Set: Simplest fix Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/accessibility/ax_tree.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/accessibility/ax_window_obj_wrapper.cc
diff --git a/ui/views/accessibility/ax_window_obj_wrapper.cc b/ui/views/accessibility/ax_window_obj_wrapper.cc
index c05bab373e4886a68a5d80ecbf8a7d64b307e765..e4001154ca39d49767275fe6bbc1f93eef771cce 100644
--- a/ui/views/accessibility/ax_window_obj_wrapper.cc
+++ b/ui/views/accessibility/ax_window_obj_wrapper.cc
@@ -96,7 +96,7 @@ void AXWindowObjWrapper::OnWindowHierarchyChanged(
void AXWindowObjWrapper::OnWindowBoundsChanged(aura::Window* window,
const gfx::Rect& old_bounds,
const gfx::Rect& new_bounds) {
- if (window != window_)
+ if (window != window_ || !window->IsVisible())
return;
AXAuraObjCache::GetInstance()->FireEvent(this, ui::AX_EVENT_LOCATION_CHANGED);
@@ -112,7 +112,7 @@ void AXWindowObjWrapper::OnWindowBoundsChanged(aura::Window* window,
void AXWindowObjWrapper::OnWindowPropertyChanged(aura::Window* window,
const void* key,
intptr_t old) {
- if (window == window_ && key == ui::kChildAXTreeID) {
+ if (window == window_ && key == ui::kChildAXTreeID && window->IsVisible()) {
AXAuraObjCache::GetInstance()->FireEvent(this,
ui::AX_EVENT_CHILDREN_CHANGED);
}
« no previous file with comments | « ui/accessibility/ax_tree.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698