Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
document.open(): Align document aborting behavior with spec
Currently, we have different behaviors for the "having a provisional document loader" state versus the "having a queued navigation" state. In the first case, we call FrameLoader::StopAllLoaders(), which cancels the ongoing navigation as well as fetches on the current page (e.g. XMLHttpRequest). In the second, we merely cancel the task to navigate, but do NOT cancel fetches. Indeed, it is recognized that the spec is currently unclear about canceling queued navigation vs. direct navigation (see [1]). However, it is worth noting that Chrome does not always follow the spec with this distinction in the first place (through location.href, for example, which queues a navigation task in Chrome but navigates directly in spec). Additionally, since even the current code cancels navigation in both circumstances (the only disagreement being if peripheral fetches are also canceled), we see no reason to have an inconsistency in this regard (see [2]). This CL now always calls FrameLoader::StopAllLoaders(), for both when we have a provisional loader and when we have a queued navigation, thus ridding ourselves of the inconsistency. By doing so, we implement the "ideal 2" plan laid out in [2], which recently became part of the HTML Standard in [3]. Tests for this new behavior (which this CL fully passes) are in [4], which was imported into our tree by the WPT Importer bot, whose expectations this CL now change. [1]: whatwg/html#3447 [2]: whatwg/html#3975 [3]: whatwg/html#3999 [4]: web-platform-tests/wpt#10789 Bug: 866274 Change-Id: I4e3ffac6b7c07bc8da812f6f210ab5d6933bdfd1 Reviewed-on: https://chromium-review.googlesource.com/1195837 Commit-Queue: Timothy Gu <timothygu@chromium.org> Reviewed-by: Nate Chapin <japhet@chromium.org> Reviewed-by: Kent Tamura <tkent@chromium.org> Cr-Commit-Position: refs/heads/master@{#590011}
- Loading branch information