Fix form submission's replace-before-load logic #9156
Merged
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.
In 524485a, we overhauled the logic which converts "push" navigations to "replace" navigations before the load event fires. However, for form submissions we erroneously checked the loading state of the form's document, instead of the loading state of the target document; they can be different when using the form's target="" attribute.
Further investigation reveals that this area is not interoperable, and neither Gecko nor WebKit pass tests for the "push"-to-"replace" conversion for such cross-document form submissions. (It's not clear exactly what they do, as they don't pass tests for the opposite behavior either.) Since we don't have interop here, we can standardize on a simpler behavior, of just avoiding the "push"-to-"replace" conversion.
Closes #9135.
(See WHATWG Working Mode: Changes for more details.)
/form-control-infrastructure.html ( diff )