Don't update active document too early for same-origin navigations#12421
Open
shannonbooth wants to merge 1 commit into
Open
Don't update active document too early for same-origin navigations#12421shannonbooth wants to merge 1 commit into
shannonbooth wants to merge 1 commit into
Conversation
The active document was previously derived from the active window's associated Document, which changes during create-and-initialize for an initial about:blank same-origin navigation before the new document is made active. By making active document a variable of browsing context only set by the make active algorithm, this allows the document to be updated at the right time.
Member
Author
|
Okay, I have marked this as undraft, as I'm now thinking that this may be the correct fix and it's ready for review. But my concern is that this fix might be incomplete, as it perhaps changes (or maybe more accurately, highlights) a fundamental invariant that this same-origin navigation path has. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The active document was previously derived from the active window's
associated Document, which changes during create-and-initialize for
an initial about:blank same-origin navigation before the new document
is made active. By making active document a variable of browsing context
only set by the make active algorithm, this allows the document to be
updated at the right time.
One note - I have uncertainties here about how this interacts with "queue a global task" for tasks which are queued in the time between create-and-intialize and the point which make-active is made. But this is a little beyond my mental model for lifecycle of queued tasks. A potential fix there might be to change some instances of "queue a global task on the navigation and traversal task source given navigable's active window" to instead use "queue a task on the navigation and traversal task source given navigable's active document" - see: #12415 (comment). Even without that, I think this is an improvement anyhow, but let me know if I should investigate that more / improve my mental model of intended behavior.
(See WHATWG Working Mode: Changes for more details.)
/browsing-the-web.html ( diff )
/document-sequences.html ( diff )