Closed Bug 2085411 Opened 1 month ago Closed 24 days ago

[wpt-sync] Sync PR 64031 - WebKit export of https://bugs.webkit.org/show_bug.cgi?id=328334

Categories

(Core :: DOM: Core & HTML, task, P4)

task

Tracking

()

RESOLVED FIXED
162 Branch
Tracking Status
firefox162 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 64031 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/64031
Details from upstream follow.

Anne van Kesteren <annevk@annevk.nl> wrote:

WebKit export of https://bugs.webkit.org/show_bug.cgi?id=328334

WebKit export from bug: Location-<!---->object navigations check the wrong document to decide whether they replace

<pre>
Location-object navigations check the wrong document to decide whether they replace

Some of HTML's rules for turning "auto" history handling into "replace" depend
on the navigated document: it is the initial about:blank document of a child
navigable, or, for a Location-object navigation without transient activation, it
isn't completely loaded yet. Location::setLocation() checked the latter against
the first window's frame and activation instead of the navigated document and
the incumbent's activation. For a frame in another process, the process with its
document applied neither rule, so such navigations added a session history
entry.

Location::setLocation() now only records whether the incumbent has transient
activation, as the new ReplaceIfNotCompletelyLoaded, and the navigated frame
checks whether its document is completely loaded: NavigationScheduler does so
for a frame in the same process, and FrameLoader::load() when the frame's
process gets the navigation from another process after its policy decision.
There it also applies the initial about:blank rule. Form submissions to a frame
in another process now leave "auto" to that process too.

So navigating a frame that has finished loading no longer replaces just because
the document doing it hasn't. Within a process,
NavigationScheduler::mustLockBackForwardList() still also replaces other script
navigations of a document that hasn't finished loading, such as window.open()
into an existing frame; across processes only HTML's rules apply.

WebKit-Bug: <a href="https://bugs.webkit.org/show_bug.cgi?id=328334">https://bugs.webkit.org/show_bug.cgi?id=328334</a>
WebKit-Canonical-Link: <a href="https://commits.webkit.org/324419@main">https://commits.webkit.org/324419@main</a>
</pre>

PR 64031 applied with additional changes from upstream: 02f5da61b96a03debc12e3c6d37614ac504fd2d2

Component: web-platform-tests → DOM: Core & HTML
Product: Testing → Core

CI Results

Ran 10 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 67 tests

Status Summary

Firefox

OK : 62[Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview] 63[Gecko-android-em-14-x86_64-debug-geckoview] 64[Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
PASS : 1[Gecko-linux2204-64-wayland-debug, Gecko-linux2204-64-wayland-opt] 4[GitHub] 254[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview] 255[Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
FAIL : 37[Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview] 38[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
TIMEOUT: 2
NOTRUN : 5

Chrome

OK : 1
PASS : 9
FAIL : 1

Safari

OK : 1
PASS : 10

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

Firefox-only Failures

New Tests That Don't Pass

  • /html/browsers/history/the-location-interface/location_replace_session_history.html [wpt.fyi]: SKIP
  • /html/browsers/history/the-location-interface/location-ancestor-origins-referrerpolicy-unsupported-elements.html [wpt.fyi]
    • <object> with referrerpolicy='no-referrer' ancestorOrigins must strictly equal [window.origin]: FAIL
  • /html/browsers/history/the-location-interface/location-replace-cross-site.html [wpt.fyi]: TIMEOUT (Chrome: OK, Safari: OK)
    • location.replace() of a popup by its cross-site child: TIMEOUT (Chrome: PASS, Safari: PASS)
    • location.replace() of a cross-site popup: NOTRUN (Chrome: PASS, Safari: PASS)
    • location.replace() of a popup by the cross-site popup it opened: NOTRUN (Chrome: PASS, Safari: PASS)
    • Setting location.href of a cross-site iframe: NOTRUN (Chrome: PASS, Safari: PASS)
    • Setting location.href of a cross-site popup: NOTRUN (Chrome: PASS, Safari: PASS)
    • Setting location.href of a cross-site iframe that is not completely loaded: NOTRUN (Chrome: FAIL, Safari: PASS)
  • /html/browsers/history/the-location-interface/no-browsing-context.window.html [wpt.fyi]
    • Setting href to https://example.com/ of a Location object sans browsing context is a no-op: FAIL
    • Setting href to / of a Location object sans browsing context is a no-op: FAIL
    • Setting href to http://test:test/ of a Location object sans browsing context is a no-op: FAIL
    • Setting href to test test of a Location object sans browsing context is a no-op: FAIL
    • Setting href to test:test of a Location object sans browsing context is a no-op: FAIL
    • Setting href to chrome:fail of a Location object sans browsing context is a no-op: FAIL
    • Setting protocol to http of a Location object sans browsing context is a no-op: FAIL
    • Setting protocol to about of a Location object sans browsing context is a no-op: FAIL
    • Setting protocol to test of a Location object sans browsing context is a no-op: FAIL
    • Setting pathname to / of a Location object sans browsing context is a no-op: FAIL
    • Setting pathname to x of a Location object sans browsing context is a no-op: FAIL
    • Setting search to test of a Location object sans browsing context is a no-op: FAIL
    • Getting origin of a Location object sans browsing context should be "null": FAIL
    • Invoking assign with about:blank on a Location object sans browsing context is a no-op: FAIL
    • Invoking assign with https://example.com/ on a Location object sans browsing context is a no-op: FAIL
    • Invoking assign with / on a Location object sans browsing context is a no-op: FAIL
    • Invoking assign with http://test:test/ on a Location object sans browsing context is a no-op: FAIL
    • Invoking assign with test test on a Location object sans browsing context is a no-op: FAIL
    • Invoking assign with test:test on a Location object sans browsing context is a no-op: FAIL
    • Invoking assign with chrome:fail on a Location object sans browsing context is a no-op: FAIL
    • Invoking replace with about:blank on a Location object sans browsing context is a no-op: FAIL
    • Invoking replace with https://example.com/ on a Location object sans browsing context is a no-op: FAIL
    • Invoking replace with / on a Location object sans browsing context is a no-op: FAIL
    • Invoking replace with http://test:test/ on a Location object sans browsing context is a no-op: FAIL
    • Invoking replace with test test on a Location object sans browsing context is a no-op: FAIL
    • Invoking replace with test:test on a Location object sans browsing context is a no-op: FAIL
    • Invoking replace with chrome:fail on a Location object sans browsing context is a no-op: FAIL
    • Invoking reload with about:blank on a Location object sans browsing context is a no-op: FAIL
    • Invoking reload with https://example.com/ on a Location object sans browsing context is a no-op: FAIL
    • Invoking reload with / on a Location object sans browsing context is a no-op: FAIL
    • Invoking reload with http://test:test/ on a Location object sans browsing context is a no-op: FAIL
    • Invoking reload with test test on a Location object sans browsing context is a no-op: FAIL
    • Invoking reload with test:test on a Location object sans browsing context is a no-op: FAIL
    • Invoking reload with chrome:fail on a Location object sans browsing context is a no-op: FAIL
  • /html/browsers/history/the-location-interface/per-global.window.html [wpt.fyi]
    • Navigating from the initial about:blank must not replace window.location: FAIL
  • /html/browsers/history/the-location-interface/reload_document_write_onload.html [wpt.fyi]
    • Reload document with document.written content written in load event: FAIL
  • /html/browsers/history/the-location-interface/scripted_click_location_assign_during_load.html [wpt.fyi]: OK [Gecko-android-em-14-x86_64-debug-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt], SKIP [Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview]
    • location.assign with click during load: FAIL
  • /html/browsers/history/the-location-interface/security_location_0.htm [wpt.fyi]: OK [Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt], SKIP [Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview]

Tests Disabled in Gecko Infrastructure

Status: NEW → RESOLVED
Closed: 24 days ago
Resolution: --- → FIXED
Target Milestone: --- → 162 Branch
You need to log in before you can comment on or make changes to this bug.