mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Update to Chromium version 93.0.4577.0 (#902210)
This commit is contained in:
@@ -166,14 +166,18 @@ bool CefBrowserPlatformDelegateNativeMac::CreateHostWindow() {
|
||||
|
||||
NSView* parentView =
|
||||
CAST_CEF_WINDOW_HANDLE_TO_NSVIEW(window_info_.parent_view);
|
||||
NSRect contentRect = {{window_info_.x, window_info_.y},
|
||||
{window_info_.width, window_info_.height}};
|
||||
NSRect contentRect = {{static_cast<CGFloat>(window_info_.x),
|
||||
static_cast<CGFloat>(window_info_.y)},
|
||||
{static_cast<CGFloat>(window_info_.width),
|
||||
static_cast<CGFloat>(window_info_.height)}};
|
||||
if (parentView == nil) {
|
||||
// Create a new window.
|
||||
NSRect screen_rect = [[NSScreen mainScreen] visibleFrame];
|
||||
NSRect window_rect = {
|
||||
{window_info_.x, screen_rect.size.height - window_info_.y},
|
||||
{window_info_.width, window_info_.height}};
|
||||
{static_cast<CGFloat>(window_info_.x),
|
||||
screen_rect.size.height - static_cast<CGFloat>(window_info_.y)},
|
||||
{static_cast<CGFloat>(window_info_.width),
|
||||
static_cast<CGFloat>(window_info_.height)}};
|
||||
if (window_rect.size.width == 0)
|
||||
window_rect.size.width = 750;
|
||||
if (window_rect.size.height == 0)
|
||||
@@ -328,7 +332,8 @@ gfx::Point CefBrowserPlatformDelegateNativeMac::GetScreenPoint(
|
||||
NSView* nsview = CAST_CEF_WINDOW_HANDLE_TO_NSVIEW(window_info_.parent_view);
|
||||
if (nsview) {
|
||||
NSRect bounds = [nsview bounds];
|
||||
NSPoint view_pt = {view.x(), bounds.size.height - view.y()};
|
||||
NSPoint view_pt = {static_cast<CGFloat>(view.x()),
|
||||
bounds.size.height - static_cast<CGFloat>(view.y())};
|
||||
NSPoint window_pt = [nsview convertPoint:view_pt toView:nil];
|
||||
NSPoint screen_pt =
|
||||
ui::ConvertPointFromWindowToScreen([nsview window], window_pt);
|
||||
|
Reference in New Issue
Block a user