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

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

Issue 1927953003: Merge to M51: Only fire accessible load complete events on the main frame on Android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2704
Patch Set: Created 4 years, 8 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/accessibility/browser_accessibility_manager_android.cc
diff --git a/content/browser/accessibility/browser_accessibility_manager_android.cc b/content/browser/accessibility/browser_accessibility_manager_android.cc
index 4d90de4c36dabdeafec6a81d7ac517d40afc6cc9..abfdcf7b55876039a1efe6ad95eac621603c502d 100644
--- a/content/browser/accessibility/browser_accessibility_manager_android.cc
+++ b/content/browser/accessibility/browser_accessibility_manager_android.cc
@@ -214,6 +214,12 @@ void BrowserAccessibilityManagerAndroid::NotifyAccessibilityEvent(
Java_BrowserAccessibilityManager_handleContentChanged(
env, obj.obj(), node->unique_id());
+ // Ignore load complete events on iframes.
+ if (event_type == ui::AX_EVENT_LOAD_COMPLETE &&
+ node->manager() != GetRootManager()) {
+ return;
+ }
+
switch (event_type) {
case ui::AX_EVENT_LOAD_COMPLETE:
Java_BrowserAccessibilityManager_handlePageLoaded(
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698