Index: content/browser/accessibility/dump_accessibility_browsertest_base.cc |
diff --git a/content/browser/accessibility/dump_accessibility_browsertest_base.cc b/content/browser/accessibility/dump_accessibility_browsertest_base.cc |
index 0c09681752226a2b0bb249d9d5c6e58acba5a8d1..1dea550b6517b3bb381bcd4a65c521d21fa64ea4 100644 |
--- a/content/browser/accessibility/dump_accessibility_browsertest_base.cc |
+++ b/content/browser/accessibility/dump_accessibility_browsertest_base.cc |
@@ -267,12 +267,10 @@ void DumpAccessibilityTestBase::RunTestForPlatform( |
// We won't get the correct coordinate transformations for |
// out-of-process iframes until each frame's surface is ready. |
RenderFrameHostImpl* current_frame_host = node->current_frame_host(); |
- if (!current_frame_host) |
+ if (!current_frame_host || !current_frame_host->is_local_root()) |
continue; |
- RenderWidgetHostImpl* rwh = current_frame_host->GetRenderWidgetHost(); |
- if (!rwh) |
- continue; |
- RenderWidgetHostViewBase* rwhv = rwh->GetView(); |
+ RenderWidgetHostViewBase* rwhv = |
+ static_cast<RenderWidgetHostViewBase*>(current_frame_host->GetView()); |
if (rwhv && rwhv->IsChildFrameForTesting()) { |
SurfaceHitTestReadyNotifier notifier( |
static_cast<RenderWidgetHostViewChildFrame*>(rwhv)); |