Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(10)

Issue 2482873002: Add is_srcdoc to FrameNavigationEntry and restore about::srcdoc URL. (Closed)

Created:
4 years, 1 month ago by arthursonzogni
Modified:
4 years ago
Reviewers:
Charlie Reis, alexmos, nasko
CC:
chromium-reviews, jam, nasko+codewatch_chromium.org, darin-cc_chromium.org, creis+watch_chromium.org, clamy, Charlie Reis
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add 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)
arthursonzogni
Hi Alex, Please, could you take a look at this patch? +@clamy, @creis [CC] https://codereview.chromium.org/2482873002/diff/1/content/browser/frame_host/navigator_impl.cc ...
4 years, 1 month ago (2016-11-07 15:20:33 UTC) #7
Charlie Reis
[+nasko] Thanks for taking this on! I'd like to review it as well. Structurally, this ...
4 years, 1 month ago (2016-11-07 21:32:58 UTC) #10
alexmos
+1 to Charlie's suggestion of allowing about:srcdoc as a valid URL, if it works out. ...
4 years, 1 month ago (2016-11-07 22:51:46 UTC) #11
arthursonzogni
Thanks for your comments! I strongly agree with Charlie's suggestion. I don't know if converting ...
4 years, 1 month ago (2016-11-08 12:21:30 UTC) #17
nasko
Let's try possibly in another CL an approach where we keep about:srcdoc intact as the ...
4 years, 1 month ago (2016-11-09 01:41:01 UTC) #18
arthursonzogni
Thanks! I will make another CL and try to remove is_srcdoc boolean from the browser ...
4 years, 1 month ago (2016-11-09 09:23:13 UTC) #19
Charlie Reis
This one can be closed in favor of https://codereview.chromium.org/2494633004/, right?
4 years ago (2016-11-24 00:17:18 UTC) #20
arthursonzogni
4 years ago (2016-11-24 09:12:42 UTC) #21
On 2016/11/24 00:17:18, Charlie Reis (slow) wrote:
> This one can be closed in favor of
https://codereview.chromium.org/2494633004/,
> right?

Yes, that's right.

Powered by Google App Engine
This is Rietveld 408576698