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

Unified Diff: content/browser/frame_host/render_frame_host_impl.cc

Issue 2674353003: Enable WebViewAccessiblityTest for OOPIF webview. (Closed)
Patch Set: Address alexmos final comments. 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
Index: content/browser/frame_host/render_frame_host_impl.cc
diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc
index 96fb5e17297cdd7154e8250f3581aa6e00c03acc..32743f67bb4f2d0455e5b4d384899080cccc0bfb 100644
--- a/content/browser/frame_host/render_frame_host_impl.cc
+++ b/content/browser/frame_host/render_frame_host_impl.cc
@@ -3739,13 +3739,6 @@ ui::AXTreeIDRegistry::AXTreeID RenderFrameHostImpl::RoutingIDToAXTreeID(
if (!rfh)
return ui::AXTreeIDRegistry::kNoAXTreeID;
- // As a sanity check, make sure we're within the same frame tree and
- // crash the renderer if not.
- if (rfh->frame_tree_node()->frame_tree() != frame_tree_node()->frame_tree()) {
- AccessibilityFatalError();
- return ui::AXTreeIDRegistry::kNoAXTreeID;
- }
-
return rfh->GetAXTreeID();
}
@@ -3813,14 +3806,10 @@ void RenderFrameHostImpl::AXContentTreeDataToAXTreeData(
return;
// For the root frame tree node, also store the AXTreeID of the focused frame.
- // TODO(avallee): https://crbug.com/610795: No focus ax events.
- // This is probably where we need to fix the bug to enable the test.
- FrameTreeNode* focused_frame_tree_node = frame_tree_->GetFocusedFrame();
- if (!focused_frame_tree_node)
+ auto* focused_frame = static_cast<RenderFrameHostImpl*>(
+ delegate_->GetFocusedFrameIncludingInnerWebContents());
+ if (!focused_frame)
return;
- RenderFrameHostImpl* focused_frame =
- focused_frame_tree_node->current_frame_host();
- DCHECK(focused_frame);
dst->focused_tree_id = focused_frame->GetAXTreeID();
}

Powered by Google App Engine
This is Rietveld 408576698