browser(webkit): correctly report outerWidth/Height on Mac (#3131)

This commit is contained in:
Yury Semikhatsky 2020-07-23 16:16:31 -07:00 committed by GitHub
parent c1032ae483
commit 74941340be
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 2 deletions

View File

@ -1,2 +1,2 @@
1315
Changed: lushnikov@chromium.org Thu Jul 23 09:56:07 PDT 2020
1316
Changed: yurys@chromium.org Thu Jul 23 16:12:30 PDT 2020

View File

@ -368,6 +368,11 @@ const NSActivityOptions ActivityOptions =
}
}
- (void)_webView:(WKWebView *)webView getWindowFrameWithCompletionHandler:(void (^)(CGRect))completionHandler
{
completionHandler([webView.window frame]);
}
- (void)webView:(WKWebView *)webView runJavaScriptAlertPanelWithMessage:(NSString *)message initiatedByFrame:(WKFrameInfo *)frame completionHandler:(void (^)(void))completionHandler
{
WebViewDialog* dialog = [[WebViewDialog alloc] autorelease];

View File

@ -421,6 +421,11 @@ static BOOL areEssentiallyEqual(double a, double b)
[self.window close];
}
- (void)_webView:(WKWebView *)webView getWindowFrameWithCompletionHandler:(void (^)(CGRect))completionHandler
{
completionHandler([self.window frame]);
}
#define DefaultMinimumZoomFactor (.5)
#define DefaultMaximumZoomFactor (3.0)
#define DefaultZoomFactorRatio (1.2)