New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 671276 link

Starred by 1 user

Issue metadata

Status: Started
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug



Sign in to add a comment

Back/forward to about:blank/#foo is asynchronous, possibly breaking scripting

Project Member Reported by creis@chromium.org, Dec 5 2016

Issue description

Chrome Version: 55.0.2883.75, 57.0.2939.0
OS: All

What steps will reproduce the problem?
(1) Visit http://csreis.github.io/tests/inject-into-blank-fragment-frame.html
(2) Visit http://csreis.github.io/tests/
(3) Go back.

What is the expected result?
You should see "This content was injected on page load" in the iframe after going back.

What happens instead?
The iframe is blank.

This is similar to issue 626416 and  issue 657896 , but I'm not aware of any real pages this affects yet.  Other browsers are also inconsistent: Firefox won't allow the content injection even on new page loads, Safari won't allow injection if there's a fragment on about:blank, and Edge doesn't support fragments on about:blank.  Still, it's inconsistent with how Chrome used to behave, before turning on the new navigation logic in r410150.

We came across it while reviewing https://codereview.chromium.org/2534393003/, when the fast/history/history-length-append-subframe-with-hash.html layout test (from  issue 353096 ) started failing.

The problem is that our session history logic for loading about:blank synchronously on back/forward/restore doesn't handle the fragment case well.  We currently exclude about:blank/#foo, which makes us load it asynchronously, and break cases that the parent synchronously injects content.  If we were to load it synchronously, though, it would lose the fragment and break the layout test.

It's likely that finishing issue 639842 and sending a subtree of PageStates will fix this bug.
 

Comment 1 by creis@chromium.org, Dec 5 2016

Cc: arthurso...@chromium.org
Status: Started (was: Assigned)
I'm working on a CL for this in https://codereview.chromium.org/2550113002/.  I need to fix a few tests and clean it up before it's ready for review.
Project Member

Comment 2 by bugdroid1@chromium.org, Jun 19 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f541bc35b24966de6982c2239b9cada4037f9403

commit f541bc35b24966de6982c2239b9cada4037f9403
Author: Dmitry Gozman <dgozman@chromium.org>
Date: Tue Jun 19 04:49:34 2018

Remove ShouldContinueForRedirectNavigationPolicy

Redirects should have been already checked in the browser
beforehand and the right NavigationPolicy already determined.

Also cleanup unused DidReceiveServerRedirectForProvisionalLoad
callback.

Bug: 789577, 671276
Change-Id: I40421f36b57e85d731dc44914d8efe48e017fa91
Reviewed-on: https://chromium-review.googlesource.com/1103657
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Camille Lamy <clamy@chromium.org>
Reviewed-by: Charlie Reis <creis@chromium.org>
Commit-Queue: Dmitry Gozman <dgozman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#568344}
[modify] https://crrev.com/f541bc35b24966de6982c2239b9cada4037f9403/content/renderer/render_frame_impl.cc
[modify] https://crrev.com/f541bc35b24966de6982c2239b9cada4037f9403/content/renderer/render_frame_impl.h
[modify] https://crrev.com/f541bc35b24966de6982c2239b9cada4037f9403/content/shell/test_runner/web_frame_test_client.cc
[modify] https://crrev.com/f541bc35b24966de6982c2239b9cada4037f9403/content/shell/test_runner/web_frame_test_client.h
[modify] https://crrev.com/f541bc35b24966de6982c2239b9cada4037f9403/content/shell/test_runner/web_frame_test_proxy.h
[modify] https://crrev.com/f541bc35b24966de6982c2239b9cada4037f9403/third_party/WebKit/LayoutTests/http/tests/loading/307-after-303-after-post-expected.txt
[modify] https://crrev.com/f541bc35b24966de6982c2239b9cada4037f9403/third_party/WebKit/LayoutTests/http/tests/loading/redirect-methods-expected.txt
[modify] https://crrev.com/f541bc35b24966de6982c2239b9cada4037f9403/third_party/blink/public/web/web_local_frame_client.h
[modify] https://crrev.com/f541bc35b24966de6982c2239b9cada4037f9403/third_party/blink/renderer/core/exported/local_frame_client_impl.cc
[modify] https://crrev.com/f541bc35b24966de6982c2239b9cada4037f9403/third_party/blink/renderer/core/exported/local_frame_client_impl.h
[modify] https://crrev.com/f541bc35b24966de6982c2239b9cada4037f9403/third_party/blink/renderer/core/frame/local_frame_client.h
[modify] https://crrev.com/f541bc35b24966de6982c2239b9cada4037f9403/third_party/blink/renderer/core/loader/document_loader.cc
[modify] https://crrev.com/f541bc35b24966de6982c2239b9cada4037f9403/third_party/blink/renderer/core/loader/empty_clients.h
[modify] https://crrev.com/f541bc35b24966de6982c2239b9cada4037f9403/third_party/blink/renderer/core/loader/frame_loader.cc
[modify] https://crrev.com/f541bc35b24966de6982c2239b9cada4037f9403/third_party/blink/renderer/core/loader/frame_loader.h

Sign in to add a comment