WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
225394
document is slow to change location when URL loaded from address bar (process swapping?)
https://bugs.webkit.org/show_bug.cgi?id=225394
Summary
document is slow to change location when URL loaded from address bar (process...
Jeff Johnson
Reported
2021-05-05 08:48:53 PDT
Created
attachment 427769
[details]
Sample HTML demonstrating the bug Overview: Sorry I don't have a great title for this bug. The bug is that when a URL is loaded from the address bar (with the web inspector closed), the document location can be slow to change (commit). I demonstrate the bug by calling window.stop() in a <script> element in <head>. This technique is just a way to demonstrate the bug; of course you wouldn't typically call window.stop() in these circumstances (but who knows). The way I discovered the bug was actually by working on a Safari app extension. I noticed that SFSafariTab methods such as close and navigateToURL failed to do anything if I called them very early in the page loading. This led me to investigate the cause of the bug, which appears to be in Safari itself rather than in the extension API. The extension bug is just a consequence of the Safari bug. Steps to Reproduce: 1) Download attached "index.html" file 2) In Terminal, cd Downloads 3) In Terminal, /usr/bin/python -m SimpleHTTPServer 8000 4) Open new Safari tab (don't open web inspector) 5) In address bar, enter
http://localhost:8000
6) Open JavaScript console Actual Results: Console should log "before" and "after", and window.location should be
http://localhost:8000
Expected Results: Console log is empty, and window.location is about:blank Build Date & Hardware: Safari 14.1 (16611.1.21.161.6) on macOS 11.3.1 (20E241) with Mac mini M1 Additional Builds and Platforms: Safari 14.1 (14611.1.21.161.7) on macOS 10.14.6 (18G9028) with Intel MacBook Pro Additional Information: The bug does not occur if you open the web inspector before you load the page from the address bar. The bug also does not occur if you call "open
http://localhost:8000
" from Terminal. Note that the bug occurs even when the previous page in not about:blank. For example, if you first load
https://www.apple.com/
and then
http://localhost:8000
, the window.location will still be apple.com even though Safari has clearly loaded index.html and executed its script.
Attachments
Sample HTML demonstrating the bug
(292 bytes, text/html)
2021-05-05 08:48 PDT
,
Jeff Johnson
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Jeff Johnson
Comment 1
2021-05-05 09:54:21 PDT
It appears that you can just load the sample HTML directly from this bug report rather than needing to download it and run SimpleHTTPServer.
Alexey Proskuryakov
Comment 2
2021-05-06 18:12:00 PDT
Could you please confirm if expected and actual results aren't swapped above? When I attempt to reproduce, I get the "expected result" in Safari, but "actual result" in Chrome.
Jeff Johnson
Comment 3
2021-05-06 18:29:43 PDT
(In reply to Alexey Proskuryakov from
comment #2
)
> Could you please confirm if expected and actual results aren't swapped > above? When I attempt to reproduce, I get the "expected result" in Safari, > but "actual result" in Chrome.
You're correct, I accidentally swapped expected and actual.
Alexey Proskuryakov
Comment 4
2021-05-07 10:44:57 PDT
Thank you for the report! If you have any additional details on how this impacts development (for example, if workarounds degrade customer experience), those would help with prioritization.
Radar WebKit Bug Importer
Comment 5
2021-05-07 10:45:17 PDT
<
rdar://problem/77662673
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug