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

Unified Diff: content/renderer/accessibility/render_accessibility_impl.cc

Issue 2302353005: Revert of Re-land: Fix loading accessibility tree for child frame that's already loaded. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 3 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 | « content/browser/accessibility/dump_accessibility_tree_browsertest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/accessibility/render_accessibility_impl.cc
diff --git a/content/renderer/accessibility/render_accessibility_impl.cc b/content/renderer/accessibility/render_accessibility_impl.cc
index 55b08f74285c62d92968f55e81ac8d7928bad305..872beb31a5f03da8bd5da59d68a3a539281f090c 100644
--- a/content/renderer/accessibility/render_accessibility_impl.cc
+++ b/content/renderer/accessibility/render_accessibility_impl.cc
@@ -75,6 +75,15 @@
ack_pending_(false),
reset_token_(0),
weak_factory_(this) {
+ // There's only one AXObjectCache for the root of a local frame tree,
+ // so if this frame's parent is local we can safely do nothing.
+ if (render_frame_ &&
+ render_frame_->GetWebFrame() &&
+ render_frame_->GetWebFrame()->parent() &&
+ render_frame_->GetWebFrame()->parent()->isWebLocalFrame()) {
+ return;
+ }
+
WebView* web_view = render_frame_->GetRenderView()->GetWebView();
WebSettings* settings = web_view->settings();
settings->setAccessibilityEnabled(true);
« no previous file with comments | « content/browser/accessibility/dump_accessibility_tree_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698