Bug 274745 - API URL change request can be cancelled by JS navigation
Summary: API URL change request can be cancelled by JS navigation
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Page Loading (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Przemyslaw Gorszkowski
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2024-05-27 00:59 PDT by Przemyslaw Gorszkowski
Modified: 2024-06-10 03:51 PDT (History)
8 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Przemyslaw Gorszkowski 2024-05-27 00:59:59 PDT
Originally it was reported and observed in https://github.com/WebPlatformForEmbedded/WPEWebKit/issues/1334, but the problem can be reproduced also with latest main. It can be reproduced with COG and cogctl(to sent API URL change request), WebKitGTK (minibrowser) or Safari. In case of Chrome or FireFox, I was not able to reproduce the problem.

The simple test case:
<html>
<head>
    <script>
        let i = 0;
        function changeLocation() {
            i += 1
            window.location.href = "#" + i;
            setTimeout(changeLocation, 10)
        }
        changeLocation()
    </script>
</head>
<body>
    Navigation test
</body>
</html>

Steps to reproduce:

1. Open "simple test case"
2. Try to navigate to some other site (e.g. https://www.igalia.com):
* by cogctl open https://www.igalia.com
* by click "home" button in WebKitGTK minibrowser
* by typing new site address in "address/URL bar" field

In case of Safari, COG, WebKitGTK the behaviour is not consistent, sometimes it is possible to open selected URL , sometimes the request is cancelled and we stay on the "simple test case" site.

In case of FF, Chrome we always navigate to new address.
Comment 1 Radar WebKit Bug Importer 2024-06-03 01:00:15 PDT
<rdar://problem/129151609>
Comment 2 Przemyslaw Gorszkowski 2024-06-10 03:51:02 PDT
Pull request: https://github.com/WebKit/WebKit/pull/29671