WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED WORKSFORME
187523
WKWebView.backForwardList.currentItem is incorrect after canceled back/forward navigation
https://bugs.webkit.org/show_bug.cgi?id=187523
Summary
WKWebView.backForwardList.currentItem is incorrect after canceled back/forwar...
Danyao Wang
Reported
2018-07-10 09:10:33 PDT
Created
attachment 344701
[details]
Minimal example to reproduce the bug For back/forward navigation, WebKit's URL and history state are updated before the |webView:decidePolicyForNavigationAction| callback. If the embedder returns WKNavigationActionPolicyCancel, only the URL change is undone, but not the WKWebView.backForwardList.currentItem change. Steps to reproduce: 1. Navigate to a URL in WKWebView, e.g.
https://wikipedia.org
2. Navigate to a second URL: e.g.
https://apple.com
3. Go back 4. In |webView:decidePolicyForNavigationAction|, return WKNavigationActionPolicyCancel 5. Observe WKWebView.URL and WKWebView.backForwardList.currentItem.URL in URL KVO Expected result: both WKWebView.URL and WKWebView.backForwardList.currentItem.URL are
https://apple.com
Observed result: WKWebView.URL is
https://apple.com
. WKWebView.backForwardList.currentItem.URL is
https://wikipedia.org
. The attached WKWebView project runs through the above states and logs the URLs to debug log. The history state is corrected after starting a new navigation. So this may be a discrepancy between the WebProcess and UIProcess.
Attachments
Minimal example to reproduce the bug
(71.11 KB, application/zip)
2018-07-10 09:10 PDT
,
Danyao Wang
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Ali Juma
Comment 1
2018-07-10 09:46:32 PDT
In reply to Danyao Wang from
comment #0
)
> So this may be a discrepancy between the WebProcess and UIProcess.
FrameLoader::continueLoadAfterNavigationPolicy has logic (in the !canContinue case) to reset back/forward state. Perhaps something is going wrong with sending that change to the UIProcess.
Radar WebKit Bug Importer
Comment 2
2018-07-10 11:19:30 PDT
<
rdar://problem/42032341
>
Brent Fulgham
Comment 3
2022-02-13 22:08:02 PST
This bug doesn't seem actionable.
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