Bug 238838
| Summary: | [iOS] Need API on NavigationAction to detect a simulated request | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Ali Juma <ajuma> |
| Component: | WebKit API | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW | ||
| Severity: | Normal | CC: | achristensen, beidson, bfulgham, cdumez, webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Ali Juma
Chrome for iOS is using WKWebView’s loadSimulatedRequest API to display error pages for failed navigations. One reason for a navigation failing is when a URL is blocked by enterprise policy.
In this case, Chrome tries to load a simulated request with an error message, using the URL of the blocked page.
However, in decidePolicyForNavigationAction, the URL blocking logic cannot distinguish a real load of the blocked page vs a simulated request using that URL, since there's no information in the WKNavigationAction to tell us that this is a simulated request.
One way to fix this would be to promote the _mainFrameNavigation SPI in WKNavigationAction to API, so that we can compare that WKNavigation* to the one returned by loadSimulatedRequest.
I've also filed FB9974496 for this request.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Alexey Proskuryakov
rdar://91316525