[Webkit-unassigned] [Bug 187523] New: WKWebView.backForwardList.currentItem is incorrect after canceled back/forward navigation
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Jul 10 09:10:33 PDT 2018
https://bugs.webkit.org/show_bug.cgi?id=187523
Bug ID: 187523
Summary: WKWebView.backForwardList.currentItem is incorrect
after canceled back/forward navigation
Product: WebKit
Version: Safari 11
Hardware: iPhone / iPad
OS: iOS 11
Status: NEW
Severity: Normal
Priority: P2
Component: Page Loading
Assignee: webkit-unassigned at lists.webkit.org
Reporter: danyao at chromium.org
CC: beidson at apple.com
Created attachment 344701
--> https://bugs.webkit.org/attachment.cgi?id=344701&action=review
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.
--
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/20180710/90371e9b/attachment.html>
More information about the webkit-unassigned
mailing list