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

Unified Diff: content/browser/accessibility/browser_accessibility_manager_win.cc

Issue 830053004: Suppress accessibility events when user is navigating away. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase, disable test for now Created 5 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: content/browser/accessibility/browser_accessibility_manager_win.cc
diff --git a/content/browser/accessibility/browser_accessibility_manager_win.cc b/content/browser/accessibility/browser_accessibility_manager_win.cc
index ae4f0899749f678aa3eaa0b74ceaf52f02612ce3..79d936182af5b7001d085fd4f8e58063ddd46dc1 100644
--- a/content/browser/accessibility/browser_accessibility_manager_win.cc
+++ b/content/browser/accessibility/browser_accessibility_manager_win.cc
@@ -179,6 +179,10 @@ void BrowserAccessibilityManagerWin::OnWindowFocused() {
BrowserAccessibilityManager::OnWindowFocused();
}
+void BrowserAccessibilityManagerWin::UserIsReloading() {
+ MaybeCallNotifyWinEvent(IA2_EVENT_DOCUMENT_RELOAD, GetRoot());
+}
+
void BrowserAccessibilityManagerWin::NotifyAccessibilityEvent(
ui::AXEvent event_type,
BrowserAccessibility* node) {
@@ -188,6 +192,11 @@ void BrowserAccessibilityManagerWin::NotifyAccessibilityEvent(
return;
}
+ // Don't fire events when this document might be stale as the user has
+ // started navigating to a new document.
+ if (user_is_navigating_away_)
+ return;
+
// Inline text boxes are an internal implementation detail, we don't
// expose them to Windows.
if (node->GetRole() == ui::AX_ROLE_INLINE_TEXT_BOX)
« no previous file with comments | « content/browser/accessibility/browser_accessibility_manager_win.h ('k') | content/browser/web_contents/web_contents_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698