[Webkit-unassigned] [Bug 225394] New: document is slow to change location when URL loaded from address bar

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed May 5 08:48:53 PDT 2021


https://bugs.webkit.org/show_bug.cgi?id=225394

            Bug ID: 225394
           Summary: document is slow to change location when URL loaded
                    from address bar
           Product: WebKit
           Version: Safari 14
          Hardware: Mac (Apple Silicon)
                OS: macOS 11
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: New Bugs
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: opendarwin at lapcatsoftware.com

Created attachment 427769

  --> https://bugs.webkit.org/attachment.cgi?id=427769&action=review

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.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20210505/4126c68c/attachment.htm>


More information about the webkit-unassigned mailing list