Navigation: DocumentState request referrer is not set for about:srcdoc
What is the issue with the HTML Standard?
There's a new assertion in attempt to populate the history entry's document that is firing in a navigation from about:blank to about:srcdoc.
The step is 6.7.3.1
- If entry's document state's request referrer is "client", and navigationParams is a navigation params (i.e., neither null nor a non-fetch scheme navigation params), then:
- Assert: navigationParams's request is not null.
- Set entry's document state's request referrer to navigationParams's request's referrer.
When navigating to about:srcdoc, we create a NavigationParams for the request in create navigation params from a srcdoc resource
This is explicitly called out as a NavigationParams, not a non-fetch-scheme navigation params.
The DocumentState for this navigation is created in navigate step 20.4, and updated with about:srcdoc specific parameters in 20.5:
- If url matches about:blank or is about:srcdoc, then:
- Set documentState's origin to initiatorOriginSnapshot.
- Set documentState's about base URL to initiatorBaseURLSnapshot.
However, the request referrer of the DocumentState is not set. In fact, the only place it is set explicitly (and not copied from another DocumentState) is the new step in attempt to populate the history entry's document 6.7.3.2. Therefore the default of Client is used for the navigation to about:srcdoc and asserts in ``attempt to populate the history entry's document` 6.7.3.1.
It seems like one of two things should happen:
- Set the request referrer in a new substep of navigate 20.5.3 for about:blank and about:srcdoc navigations
- Use non-fetch-scheme navigation params in
reate navigation params from a srcdoc resource
cc @domenic @kalenikaliaksandr