DescriptionAdd is_srcdoc to FrameNavigationEntry and restore about::srcdoc URL.
Bug description:
Iframes with the srcdoc attribute have the "about::srcdoc" URL inside the
renderer and the "about::blank" URL inside the browser. The conversion is
made in RenderFrameHostImpl::OnDidCommitProvisionalLoad for security reason.
A boolean 'is_srcdoc' is created and transmitted accross classes to keep track
of the conversion.
The problem was that this boolean was lost and nothing was there to
restore the about::srcdoc URL. On a back-forward navigation, there is an URL
mismatch in the renderer. Instead of restoring the previous content,
it navigates to about::blank. The bug occurs only with PlzNavigate because it
relies on the data sent by the browser and not by the renderer.
What the CL does:
* The is_srcdoc attribute is stored on each FrameNavigationEntry.
* The URL is restored to about::srcdoc when the navigation is committed to the
renderer.
TEST=NavigationControllerBrowserTest.FrameNavigationEntry_RecreatedInjectedSrcdocSubframe
RenderFrameHostManagerTest.RestoreSubframeFileAccessForHistoryNavigation
with --enable-browser-side-navigation.
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation
BUG=660061
Patch Set 1 #
Total comments: 16
Patch Set 2 : Addressed comments. #
Total comments: 8
Patch Set 3 : Addressed comments (@nasko) #Messages
Total messages: 21 (13 generated)
|