Created attachment 367579 [details] Reproducible script that can be ran on bugs.webkit.org What happened: When an `iframe` calls `window.history.pushState`, the parent window's `window.history.state` becomes replaced with a `null` value. Expected behavior: The top page's `history.state` should remain untouched. Steps to reproduce: 1. Give the top page a `history.state` value (eg, call `window.history.pushState({something}, 'something')`) 2. In an iframe, perform `window.history.pushState(...)` 3. In the top page, observe that `history.state` has become set to `null` Attached is a minimal working example of the problem that can be ran in the JS console on `bugs.webkit.org`
Created attachment 367580 [details] Sample output of reproducible steps Attached example output of the reproducible script being ran on Safari (undesired result) and Chrome (desired result)
*** Bug 196989 has been marked as a duplicate of this bug. ***
Additionally, a test case was submitted to https://github.com/web-platform-tests/wpt/pull/16381, which can also be used to reproduce this case. Additionally, it appears that this is also the behavior in Safari TP release 79.
<rdar://problem/50019069>