New issue
Advanced search Search tips

Issue 848175 link

Starred by 2 users

Issue metadata

Status: Assigned
Owner:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocking:
issue 848171
issue 848173



Sign in to add a comment

Simplify frame target calculation in navigation

Project Member Reported by dcheng@chromium.org, May 31 2018

Issue description

Today, FrameLoader::LoadInternal is (mostly) responsible for finding the target of a navigation. However, this gets fairly complicated as forms have their own target calculation:

https://cs.chromium.org/chromium/src/third_party/blink/renderer/core/html/forms/html_form_element.cc?rcl=a8bfa46d7cc22ea442dea915392cfd424765a9b6&l=462

And LoadInternal() goes to some length to make sure it coordinates properly with form submission:

https://cs.chromium.org/chromium/src/third_party/blink/renderer/core/loader/frame_loader.cc?rcl=a8bfa46d7cc22ea442dea915392cfd424765a9b6&l=884

FrameLoader::LoadInternal's responsibilities should be simplified: it should be in charge of driving navigations, and code that needs to call it needs to ensure that the navigation is already targeted at the correct frame.

This becomes important when trying to schedule navigations for hyperlinks (https://html.spec.whatwg.org/multipage/links.html#following-hyperlinks-2): the target needs to be resolved first (potentially creating a new window) before the navigation itself can be scheduled on the targeted browsing context.
 

Sign in to add a comment