browser(webkit): meta+click on mac (#11660)
This commit is contained in:
Родитель
d68f2f4990
Коммит
eb03436ff6
|
@ -1,2 +1,2 @@
|
||||||
1602
|
1603
|
||||||
Changed: yurys@chromium.org Tue 25 Jan 2022 06:07:37 PM PST
|
Changed: yurys@chromium.org Wed Jan 26 15:11:07 PST 2022
|
||||||
|
|
|
@ -451,6 +451,16 @@ const NSActivityOptions ActivityOptions =
|
||||||
decisionHandler(WKNavigationActionPolicyDownload);
|
decisionHandler(WKNavigationActionPolicyDownload);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (navigationAction.buttonNumber == 1 &&
|
||||||
|
(navigationAction.modifierFlags & (NSEventModifierFlagCommand | NSEventModifierFlagShift)) != 0) {
|
||||||
|
WKWindowFeatures* windowFeatures = [[[WKWindowFeatures alloc] init] autorelease];
|
||||||
|
WKWebView* newView = [self webView:webView createWebViewWithConfiguration:webView.configuration forNavigationAction:navigationAction windowFeatures:windowFeatures];
|
||||||
|
[newView loadRequest:navigationAction.request];
|
||||||
|
decisionHandler(WKNavigationActionPolicyCancel);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (navigationAction._canHandleRequest) {
|
if (navigationAction._canHandleRequest) {
|
||||||
decisionHandler(WKNavigationActionPolicyAllow);
|
decisionHandler(WKNavigationActionPolicyAllow);
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -740,6 +740,15 @@ static NSSet *dataTypes()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (navigationAction.buttonNumber == 1 &&
|
||||||
|
(navigationAction.modifierFlags & (NSEventModifierFlagCommand | NSEventModifierFlagShift)) != 0) {
|
||||||
|
WKWindowFeatures* windowFeatures = [[[WKWindowFeatures alloc] init] autorelease];
|
||||||
|
WKWebView* newView = [self webView:webView createWebViewWithConfiguration:webView.configuration forNavigationAction:navigationAction windowFeatures:windowFeatures];
|
||||||
|
[newView loadRequest:navigationAction.request];
|
||||||
|
decisionHandler(WKNavigationActionPolicyCancel);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (navigationAction._canHandleRequest) {
|
if (navigationAction._canHandleRequest) {
|
||||||
decisionHandler(WKNavigationActionPolicyAllow);
|
decisionHandler(WKNavigationActionPolicyAllow);
|
||||||
return;
|
return;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче