[Webkit-unassigned] [Bug 193967] New: Regression (r240046): [PSON] Spurious changes to [WKWebView url] and [WKWebView loading] after [WKWebView loadRequest]

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jan 29 09:47:21 PST 2019


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

            Bug ID: 193967
           Summary: Regression (r240046): [PSON] Spurious changes to
                    [WKWebView url] and [WKWebView loading] after
                    [WKWebView loadRequest]
           Product: WebKit
           Version: WebKit Local Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Page Loading
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: ajuma at chromium.org
                CC: achristensen at apple.com, ajuma at chromium.org,
                    beidson at apple.com, cdumez at apple.com,
                    eugenebut at chromium.org

After r240046, on a cross-origin [WKWebView loadRequest], [WKWebView url] will first change to the new URL, then *change back* to the old URL, then change again to the new URL. Similarly, [WKWebView loading] will become true, then become false, and then become true again.

More specifically, we get the following sequence:
1) [WKWebView loadRequest] --> [WKWebView ur] becomes the request URL and [WKWebView loading] becomes true
2) WebPageProxy::receivedPolicyDecision --> [WKWebView url] reverts to the previous URL and [WKWebView loading] becomes false
3) WebPageProxy::didStartProvisionalLoadForFrameShared --> [WKWebView url] becomes the requested URL again, and [WKWebView loading] becomes true again

The extra changes in (2) and (3) are confusing to embedders (like Chrome) that are doing KVO on [WKWebView url] and [WKWebView loading], since the change in (2) makes it look like the load was aborted.

The cause of these changes is that in r240046, WebPageProxy::receivedNavigationPolicyDecision sets policyAction to Ignore (instead of Suspend) on navigations which trigger process swaps, which then makes WebPageProxy::receivedPolicyDecision call PageLoadState::clearPendingAPIRequestURL, and this has the effect of reverting [WKWebView url] to the old URL and making [WKWebView loading] false.

Navigations initiated by [WKWebView goToBackForwardListItem] also have this broken behavior.

-- 
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/20190129/c4cd09fc/attachment.html>


More information about the webkit-unassigned mailing list