Fix rootScroller crash when swapping to OOPIF
This crash was occurring because a local frame is made the effective rootScroller. Then, it is navigated to a cross origin domain and it swaps in a remote frame. The code to handle this for rootScroller would mark the document as needing layout - after which we'll notice the rootScroller is no longer valid and replace it. However, before that happens we might get a resize IPC which executes code in RootScrollerController that assumes an iframe rootScroller is local. The fix here is to just immediately recompute the effective rootScroller when the iframe's FrameView is changed. We also need to notify the RootScrollerController of updates to an iframe's FrameView in more cases. Previously, we would early-out if the iframe wasn't the effective root scroller. This would fail in some situations. e.g. The iframe loses its FrameView which causes us to recalculate and remove it as the effective root scroller. The iframe then gets a new FrameView so we should recalculate again. This CL makes it so we early out only if the iframe isn't the rootScroller or implicit rootScroller. Bug: 805298 Change-Id: Ibf5c46c9fea6016bfa376116dc1f18723fe2c2d1 Reviewed-on: https://chromium-review.googlesource.com/957791Reviewed-by:Dave Tapuska <dtapuska@chromium.org> Commit-Queue: David Bokan <bokan@chromium.org> Cr-Commit-Position: refs/heads/master@{#544344}
Showing
Please register or sign in to comment