Bug 147040 - The external URL policy is not reported correctly in navigation actions that create new windows
Summary: The external URL policy is not reported correctly in navigation actions that ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit API (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: mitz
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2015-07-17 09:29 PDT by mitz
Modified: 2015-07-17 14:17 PDT (History)
3 users (show)

See Also:


Attachments
Report the correct policy (27.68 KB, patch)
2015-07-17 12:55 PDT, mitz
dino: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description mitz 2015-07-17 09:29:40 PDT
<rdar://problem/21803781>

When a navigation targets a new window, the WKNavigationAction passed to -webView:decidePolicyForNavigationAction:decisionHandler: doesn’t have the correct values for -_shouldOpenExternalSchemes and -_shouldOpenAppLinks.

When window.open is called, the WKNavigationAction passed to -webView:createWebViewWithConfiguration:forNavigationAction:windowFeatures: doesn’t have the correct values for  -_shouldOpenExternalSchemes and -_shouldOpenAppLinks, and so does the WKNavigationAction passed to the new view’s -webView:decidePolicyForNavigationAction:decisionHandler:.
Comment 1 mitz 2015-07-17 12:55:42 PDT
Created attachment 256980 [details]
Report the correct policy
Comment 2 mitz 2015-07-17 12:58:47 PDT
Comment on attachment 256980 [details]
Report the correct policy

View in context: https://bugs.webkit.org/attachment.cgi?id=256980&action=review

> Tools/TestWebKitAPI/Tests/WebKit2Cocoa/ShouldOpenExternalURLsInNewWindowActions.mm:2
> + * Copyright (C) 2014 Apple Inc. All rights reserved.

2014?

> Tools/TestWebKitAPI/Tests/WebKit2Cocoa/ShouldOpenExternalURLsInNewWindowActions.mm:69
> +TEST(WebKit2, ShouldOpenExternalURLsInWindowOpen)

I should split this up to multiple tests, at least a separate one for targeted links.
Comment 3 mitz 2015-07-17 14:17:35 PDT
Fixed in <http://trac.webkit.org/r186964>.