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:
@@ -101,14 +101,14 @@ bool CefBrowserPlatformDelegateNativeLinux::CreateHostWindow() {
|
||||
prefs->inactive_selection_fg_color = SkColorSetRGB(50, 50, 50);
|
||||
|
||||
// Set font-related attributes.
|
||||
static const base::NoDestructor<gfx::FontRenderParams> params(
|
||||
static const gfx::FontRenderParams params(
|
||||
gfx::GetFontRenderParams(gfx::FontRenderParamsQuery(), nullptr));
|
||||
prefs->should_antialias_text = params->antialiasing;
|
||||
prefs->use_subpixel_positioning = params->subpixel_positioning;
|
||||
prefs->hinting = params->hinting;
|
||||
prefs->use_autohinter = params->autohinter;
|
||||
prefs->use_bitmaps = params->use_bitmaps;
|
||||
prefs->subpixel_rendering = params->subpixel_rendering;
|
||||
prefs->should_antialias_text = params.antialiasing;
|
||||
prefs->use_subpixel_positioning = params.subpixel_positioning;
|
||||
prefs->hinting = params.hinting;
|
||||
prefs->use_autohinter = params.autohinter;
|
||||
prefs->use_bitmaps = params.use_bitmaps;
|
||||
prefs->subpixel_rendering = params.subpixel_rendering;
|
||||
|
||||
web_contents_->SyncRendererPrefs();
|
||||
|
||||
|
@@ -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);
|
||||
|
@@ -29,6 +29,8 @@ void CefWindowDelegateView::Init(gfx::AcceleratedWidget parent_widget,
|
||||
web_view_->SetWebContents(web_contents);
|
||||
web_view_->SetPreferredSize(bounds.size());
|
||||
|
||||
SetCanResize(true);
|
||||
|
||||
views::Widget* widget = new views::Widget;
|
||||
|
||||
// See CalculateWindowStylesFromInitParams in
|
||||
|
@@ -34,7 +34,6 @@ class CefWindowDelegateView : public views::WidgetDelegateView {
|
||||
void InitContent();
|
||||
|
||||
// WidgetDelegateView methods:
|
||||
bool CanResize() const override { return true; }
|
||||
bool CanMaximize() const override { return true; }
|
||||
View* GetContentsView() override { return this; }
|
||||
|
||||
|
@@ -91,10 +91,10 @@ CefWindowX11::CefWindowX11(CefRefPtr<CefBrowserHostBase> browser,
|
||||
.depth = depth,
|
||||
.wid = xwindow_,
|
||||
.parent = parent_xwindow_,
|
||||
.x = bounds.x(),
|
||||
.y = bounds.y(),
|
||||
.width = bounds.width(),
|
||||
.height = bounds.height(),
|
||||
.x = static_cast<int16_t>(bounds.x()),
|
||||
.y = static_cast<int16_t>(bounds.y()),
|
||||
.width = static_cast<uint16_t>(bounds.width()),
|
||||
.height = static_cast<uint16_t>(bounds.height()),
|
||||
.c_class = x11::WindowClass::InputOutput,
|
||||
.visual = visual,
|
||||
.background_pixel = 0,
|
||||
|
Reference in New Issue
Block a user