Have WebContents::GetFocusedFrame include results from inner frame trees

GetFocusedFrame previously only considered nodes in the primary frame
tree. This means that if an inner frame tree had focus, this method
would return the placeholder RenderFrameHost representing the inner
tree. Beyond null checking the result of GetFocusedFrame, most of the call sites' interactions with the placeholder are not meaningful
(especially sending IPCs).

We now consider which frame tree has focus, and return the focused
RenderFrameHost therein.

This fixes multiple issues relating to fenced frames including:
- Printing selected text no longer DCHECKs
- DevTools element inspection with content_shell now expands the
  targeted element
- Reload frame context menu item now has an effect

By inspection of other call sites, I suspect this CL fixes additional
issues.

Bug: 1196715, 1337688
Change-Id: I2f05752a2449c310169ad998c58a4742b10f62ae
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3721876
Reviewed-by: Adithya Srinivasan <[email protected]>
Reviewed-by: Alex Moshchuk <[email protected]>
Commit-Queue: Kevin McNee <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1020896}
diff --git a/content/public/browser/web_contents.h b/content/public/browser/web_contents.h
index 7293829f..f1b8dee 100644
--- a/content/public/browser/web_contents.h
+++ b/content/public/browser/web_contents.h
@@ -399,8 +399,8 @@
   // be used instead of getting the primary page from the WebContents.
   virtual Page& GetPrimaryPage() = 0;
 
-  // Returns the focused frame for the currently active view. Might be nullptr
-  // if nothing is focused.
+  // Returns the focused frame for the primary page or an inner page thereof.
+  // Might be nullptr if nothing is focused.
   virtual RenderFrameHost* GetFocusedFrame() = 0;
 
   // Returns true if |frame_tree_node_id| refers to a frame in a prerendered