mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Update to Chromium version 90.0.4430.0 (#857950)
- Linux ARM builds require use_vaapi=false (see https://crbug.com/1185348) - Windows official builds require use_thin_lto=false (see https://crbug.com/1177001)
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
#include "libcef/browser/browser_host_base.h"
|
||||
|
||||
#include "content/common/cursors/webcursor.h"
|
||||
#include "ui/base/cursor/cursor_factory.h"
|
||||
#include "ui/base/cursor/mojom/cursor_type.mojom.h"
|
||||
|
||||
namespace cursor_util {
|
||||
@@ -34,19 +35,24 @@ bool OnCursorChange(CefBrowserHostBase* browser, const ui::Cursor& ui_cursor) {
|
||||
bool handled = false;
|
||||
|
||||
#if defined(USE_AURA)
|
||||
content::WebCursor web_cursor(ui_cursor);
|
||||
|
||||
CefCursorHandle platform_cursor;
|
||||
ui::PlatformCursor image_cursor = nullptr;
|
||||
|
||||
if (ui_cursor.type() == ui::mojom::CursorType::kCustom) {
|
||||
// |web_cursor| owns the resulting |platform_cursor|.
|
||||
platform_cursor =
|
||||
cursor_util::ToCursorHandle(web_cursor.GetPlatformCursor(ui_cursor));
|
||||
image_cursor = ui::CursorFactory::GetInstance()->CreateImageCursor(
|
||||
ui::mojom::CursorType::kCustom, ui_cursor.custom_bitmap(),
|
||||
ui_cursor.custom_hotspot());
|
||||
platform_cursor = cursor_util::ToCursorHandle(image_cursor);
|
||||
} else {
|
||||
platform_cursor = cursor_util::GetPlatformCursor(ui_cursor.type());
|
||||
}
|
||||
|
||||
handled = handler->OnCursorChange(browser, platform_cursor, cursor_type,
|
||||
custom_cursor_info);
|
||||
|
||||
if (image_cursor) {
|
||||
ui::CursorFactory::GetInstance()->UnrefImageCursor(image_cursor);
|
||||
}
|
||||
#elif defined(OS_MAC)
|
||||
// |web_cursor| owns the resulting |native_cursor|.
|
||||
content::WebCursor web_cursor(ui_cursor);
|
||||
|
@@ -9,6 +9,7 @@
|
||||
#include "libcef/common/app_manager.h"
|
||||
|
||||
#include "ui/base/cursor/mojom/cursor_type.mojom.h"
|
||||
#include "ui/base/cursor/win/win_cursor.h"
|
||||
#include "ui/resources/grit/ui_unscaled_resources.h"
|
||||
|
||||
namespace cursor_util {
|
||||
@@ -152,7 +153,7 @@ cef_cursor_handle_t GetPlatformCursor(ui::mojom::CursorType type) {
|
||||
}
|
||||
|
||||
cef_cursor_handle_t ToCursorHandle(ui::PlatformCursor cursor) {
|
||||
return cursor;
|
||||
return static_cast<ui::WinCursor*>(cursor)->hcursor();
|
||||
}
|
||||
|
||||
} // namespace cursor_util
|
||||
|
@@ -304,7 +304,7 @@ class CefNativeMenuWin::MenuHostWindow {
|
||||
DCHECK(type != ui::MenuModel::TYPE_CHECK);
|
||||
std::unique_ptr<SkCanvas> canvas = skia::CreatePlatformCanvas(
|
||||
skia_icon.width(), skia_icon.height(), false);
|
||||
canvas->drawBitmap(*skia_icon.bitmap(), 0, 0);
|
||||
canvas->drawImage(skia_icon.bitmap()->asImage(), 0, 0);
|
||||
DrawToNativeContext(
|
||||
canvas.get(), dc, draw_item_struct->rcItem.left + kItemLeftMargin,
|
||||
draw_item_struct->rcItem.top +
|
||||
|
Reference in New Issue
Block a user