Skip to content

Commit 5c0e8e9

Browse files
author
Dan Bernstein
committed
WebKit always goes through LaunchServices for main frame navigation actions
https://bugs.webkit.org/show_bug.cgi?id=144608 Reviewed by Tim Horton. * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h: Defined _WKNavigationActionPolicyAllowWithoutTryingAppLink. * UIProcess/Cocoa/NavigationState.mm: (WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction): If the policy is _WKNavigationActionPolicyAllowWithoutTryingAppLink, don’t go through tryAppLink. Canonical link: https://commits.webkit.org/162619@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183784 268f45cc-cd09-0410-ab3c-d52691b4dbfc
1 parent ed1e36c commit 5c0e8e9

3 files changed

Lines changed: 20 additions & 0 deletions

File tree

Source/WebKit2/ChangeLog

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
2015-05-04 Dan Bernstein <mitz@apple.com>
2+
3+
WebKit always goes through LaunchServices for main frame navigation actions
4+
https://bugs.webkit.org/show_bug.cgi?id=144608
5+
6+
Reviewed by Tim Horton.
7+
8+
* UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h: Defined
9+
_WKNavigationActionPolicyAllowWithoutTryingAppLink.
10+
* UIProcess/Cocoa/NavigationState.mm:
11+
(WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction): If the policy
12+
is _WKNavigationActionPolicyAllowWithoutTryingAppLink, don’t go through tryAppLink.
13+
114
2015-05-04 Enrica Casucci <enrica@apple.com>
215

316
[iOS WK2] editorState should include information about selection clipping rectangle.

Source/WebKit2/UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
#if WK_API_ENABLED
3333

3434
static const WKNavigationActionPolicy _WKNavigationActionPolicyDownload = (WKNavigationActionPolicy)(WKNavigationActionPolicyAllow + 1);
35+
static const WKNavigationActionPolicy WK_AVAILABLE(WK_MAC_TBA, WK_IOS_TBA) _WKNavigationActionPolicyAllowWithoutTryingAppLink = (WKNavigationActionPolicy)(WKNavigationActionPolicyAllow + 2);
3536

3637
static const WKNavigationResponsePolicy _WKNavigationResponsePolicyBecomeDownload = (WKNavigationResponsePolicy)(WKNavigationResponsePolicyAllow + 1);
3738

Source/WebKit2/UIProcess/Cocoa/NavigationState.mm

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,12 @@ static void tryAppLink(RefPtr<API::NavigationAction> navigationAction, std::func
317317
#pragma clang diagnostic pop
318318
localListener->download();
319319
break;
320+
#pragma clang diagnostic push
321+
#pragma clang diagnostic ignored "-Wswitch"
322+
case _WKNavigationActionPolicyAllowWithoutTryingAppLink:
323+
#pragma clang diagnostic pop
324+
localListener->use();
325+
break;
320326
}
321327
}];
322328
}

0 commit comments

Comments
 (0)