Propagate inert state to OOPIFs when a modal dialog is active

When showModal is called on a <dialog> element, the rest of the
Document becomes inert which prevents it from receiving events or taking
focus. When the Document contains an out-of-process iframe, however, its
contents are not aware of the modal dialog in a remote ancestor.

This CL caches the current inert state on each LocalFrame, which is
changed when a modal dialog because active or inactive. The bit is
plumbed to remote frame children so that OOPIFs will respect inertness.

Also it prevents having to search up the entire frame tree when an
element checks whether it is inert.

BUG=719788
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation

Review-Url: https://codereview.chromium.org/2883033003
Cr-Commit-Position: refs/heads/master@{#481761}
diff --git a/content/renderer/render_widget.h b/content/renderer/render_widget.h
index 68706214..8f1d752 100644
--- a/content/renderer/render_widget.h
+++ b/content/renderer/render_widget.h
@@ -532,6 +532,7 @@
                            const gfx::Rect& window_screen_rect);
   void OnUpdateWindowScreenRect(const gfx::Rect& window_screen_rect);
   void OnSetViewportIntersection(const gfx::Rect& viewport_intersection);
+  void OnSetIsInert(bool);
   // Real data that is dragged is not included at DragEnter time.
   void OnDragTargetDragEnter(
       const std::vector<DropData::Metadata>& drop_meta_data,