Compare commits

...

18 Commits
5304 ... 4280

Author SHA1 Message Date
Marshall Greenblatt
a29e9a3611 Add workaround for crash on Views popup window creation (see issue #3040) 2021-01-21 13:34:59 -05:00
Marshall Greenblatt
481a82af37 Update to Chromium version 87.0.4280.141 2021-01-07 16:31:23 -05:00
Marshall Greenblatt
03f933676a Update to Chromium version 87.0.4280.88 2020-12-07 21:22:20 -05:00
Marshall Greenblatt
8bb770500e Fix OSR transparency after navigating to cross-origin (fixes issue #3043) 2020-11-25 13:09:28 -05:00
Marshall Greenblatt
fc87911e98 Add workaround for crash on popup window creation (see issue #3040) 2020-11-25 12:57:53 -05:00
Marshall Greenblatt
a717e440aa Fix incorrect thread execution in CefBrowserHostBase (fixes issue #3052) 2020-11-25 12:31:57 -05:00
Marshall Greenblatt
8856df480e Linux: Fix redundant fd_set in file_path_watcher_linux.cc (fixes issue #3051) 2020-11-25 12:12:04 -05:00
Marshall Greenblatt
ca81ee15f8 Mac: Add ARM64 configuration support
Requires Xcode 12.2 and the MacOS 11.0 SDK. To generate ARM64 builds set
the CEF_ENABLE_ARM64=1 environment variable and replace all usage of
--x64-build with --arm64-build in script command-line arguments.
2020-11-24 16:48:03 -05:00
Marshall Greenblatt
315d248d53 Linux: Fix ATK assertion error when generating ARM build config. 2020-11-18 16:59:31 -05:00
Marshall Greenblatt
dd613a387b Mac: Add platform suffix to v8_context_snapshot.bin
See https://crrev.com/71bd0fa328 for background.
2020-11-18 15:11:45 -05:00
Marshall Greenblatt
68f4b0c134 Update to Chromium version 87.0.4280.66 2020-11-17 21:22:51 -05:00
Marshall Greenblatt
bbf40c7646 Update to Chromium version 87.0.4280.47 2020-11-10 18:39:06 -05:00
Marshall Greenblatt
04acc3ebc4 Prevent UB if a WeakPtr to an already-destroyed object is dereferenced.
If a WeakPtr references an already-destroyed object, operator-> and
operator* end up simply dereferencing nullptr. However, dereferencing
nullptr is undefined behavior and can be optimized in surprising ways
by compilers. To prevent this from happening, add a defence of last
resort and CHECK that the WeakPtr is still valid.

Based on https://crrev.com/bbb64b5c69
2020-11-10 11:54:08 -05:00
Cristian Amarie
9a70877443 Win/Linux: Add support for chrome://sandbox (fixes issue #3029) 2020-10-29 13:57:09 -04:00
Marshall Greenblatt
be119b4c9a Move OnCursorChange from CefRenderHandler to CefDisplayHandler
The cursor change can now be handled by the client with both windowed and
off-screen rendering.

Returning true from OnCursorChange will disable the default cursor change
behavior. This is functionally equivalent to the
CefBrowserHost::SetMouseCursorChangeDisabled method, so that method has been
removed.
2020-10-28 12:53:31 -04:00
Marshall Greenblatt
cc1b6ac609 Windows: Fix focus assignment when clicking WebView with external parent (fixes issue #3031) 2020-10-27 14:38:04 -04:00
Marshall Greenblatt
4578ec8d19 Update to Chromium version 87.0.4280.27 2020-10-23 15:24:56 -04:00
Marshall Greenblatt
4dd4abc3c2 Update to Chromium version 87.0.4280.20 2020-10-15 20:32:28 -04:00
76 changed files with 487 additions and 492 deletions

View File

@@ -556,6 +556,8 @@ static_library("libcef_static") {
"libcef/browser/menu_runner.h",
"libcef/browser/native/browser_platform_delegate_native.cc",
"libcef/browser/native/browser_platform_delegate_native.h",
"libcef/browser/native/cursor_util.h",
"libcef/browser/native/cursor_util.cc",
"libcef/browser/navigate_params.cc",
"libcef/browser/navigate_params.h",
"libcef/browser/navigation_entry_impl.cc",
@@ -938,6 +940,7 @@ static_library("libcef_static") {
"libcef/browser/alloy/alloy_browser_main_win.cc",
"libcef/browser/native/browser_platform_delegate_native_win.cc",
"libcef/browser/native/browser_platform_delegate_native_win.h",
"libcef/browser/native/cursor_util_win.cc",
"libcef/browser/native/file_dialog_runner_win.cc",
"libcef/browser/native/file_dialog_runner_win.h",
"libcef/browser/native/javascript_dialog_runner_win.cc",
@@ -951,7 +954,6 @@ static_library("libcef_static") {
"libcef/browser/native/native_menu_win.h",
"libcef/browser/osr/browser_platform_delegate_osr_win.cc",
"libcef/browser/osr/browser_platform_delegate_osr_win.h",
"libcef/browser/osr/render_widget_host_view_osr_win.cc",
# Part of //chrome/utility.
"//chrome/utility/printing_handler.cc",
@@ -982,11 +984,11 @@ static_library("libcef_static") {
sources += includes_linux + [
"libcef/browser/native/browser_platform_delegate_native_linux.cc",
"libcef/browser/native/browser_platform_delegate_native_linux.h",
"libcef/browser/native/cursor_util_linux.cc",
"libcef/browser/native/menu_runner_linux.cc",
"libcef/browser/native/menu_runner_linux.h",
"libcef/browser/osr/browser_platform_delegate_osr_linux.cc",
"libcef/browser/osr/browser_platform_delegate_osr_linux.h",
"libcef/browser/osr/render_widget_host_view_osr_linux.cc",
"libcef/browser/printing/print_dialog_linux.cc",
"libcef/browser/printing/print_dialog_linux.h",
]
@@ -1265,7 +1267,10 @@ if (is_mac) {
sources = [ "libcef_dll/sandbox/sandbox_mac.mm" ]
# CEF sources use include paths relative to the CEF root directory.
include_dirs = [ "." ]
deps = [ "//sandbox/mac:seatbelt" ]
deps = [
"//build/config:executable_deps",
"//sandbox/mac:seatbelt"
]
}
}
@@ -1630,7 +1635,7 @@ if (is_mac) {
]
public_deps += [ "//v8" ]
if (use_v8_context_snapshot) {
sources += [ "$root_out_dir/v8_context_snapshot.bin" ]
sources += [ "$root_out_dir/$v8_context_snapshot_filename" ]
public_deps += [ "//tools/v8_context_snapshot" ]
}
}

View File

@@ -7,5 +7,6 @@
# https://bitbucket.org/chromiumembedded/cef/wiki/BranchesAndBuilding
{
'chromium_checkout': 'refs/tags/87.0.4280.0'
'chromium_checkout': 'refs/tags/87.0.4280.141',
'depot_tools_checkout': '39d870e1f0'
}

View File

@@ -12,7 +12,7 @@
# distribution include:
#
# Linux: Ninja, Unix Makefiles
# MacOS: Ninja, Xcode 8+
# MacOS: Ninja, Xcode 8+ (x64) or Xcode 12.2+ (ARM64)
# Windows: Ninja, Visual Studio 2015+
#
# Ninja is a cross-platform open-source tool for running fast builds using
@@ -84,6 +84,15 @@
# > cmake -G "Ninja" -DPROJECT_ARCH="x86_64" -DCMAKE_BUILD_TYPE=Debug ..
# > ninja cefclient cefsimple
#
# To perform a MacOS build using an ARM64 CEF binary distribution:
# Using the Xcode IDE:
# > cmake -G "Xcode" -DPROJECT_ARCH="arm64" ..
# Open build\cef.xcodeproj in Xcode and select Product > Build.
#
# Using Ninja:
# > cmake -G "Ninja" -DPROJECT_ARCH="arm64" -DCMAKE_BUILD_TYPE=Debug ..
# > ninja cefclient cefsimple
#
# To perform a Windows build using a 32-bit CEF binary distribution:
# Using the Visual Studio 2019 IDE:
# > cmake -G "Visual Studio 16" -A Win32 ..

View File

@@ -328,6 +328,8 @@ if(OS_MAC)
# Target architecture.
if(PROJECT_ARCH STREQUAL "x86_64")
set(CMAKE_OSX_ARCHITECTURES "x86_64")
elseif(PROJECT_ARCH STREQUAL "arm64")
set(CMAKE_OSX_ARCHITECTURES "arm64")
else()
set(CMAKE_OSX_ARCHITECTURES "i386")
endif()

View File

@@ -250,11 +250,11 @@ class WeakPtr : public cef_internal::WeakPtrBase {
T* get() const { return ref_.is_valid() ? ptr_ : NULL; }
T& operator*() const {
DCHECK(get() != NULL);
CHECK(ref_.is_valid());
return *get();
}
T* operator->() const {
DCHECK(get() != NULL);
CHECK(ref_.is_valid());
return get();
}

View File

@@ -33,7 +33,7 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=6cb00a0fa3631a46903abb3a783f315895511db2$
// $hash=965eb2e55afec0a4618a7acd9478b9c1215be29d$
//
#ifndef CEF_INCLUDE_CAPI_CEF_BROWSER_CAPI_H_
@@ -562,19 +562,6 @@ typedef struct _cef_browser_host_t {
struct _cef_navigation_entry_visitor_t* visitor,
int current_only);
///
// Set whether mouse cursor change is disabled.
///
void(CEF_CALLBACK* set_mouse_cursor_change_disabled)(
struct _cef_browser_host_t* self,
int disabled);
///
// Returns true (1) if mouse cursor change is disabled.
///
int(CEF_CALLBACK* is_mouse_cursor_change_disabled)(
struct _cef_browser_host_t* self);
///
// If a misspelled word is currently selected in an editable node calling this
// function will replace it with the specified |word|.

View File

@@ -33,7 +33,7 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=951c936c8070dbf9bd246cc766b81cdfe06a3d81$
// $hash=eada7e92085d96497f4e69f3e8a7e8aa6746b175$
//
#ifndef CEF_INCLUDE_CAPI_CEF_DISPLAY_HANDLER_CAPI_H_
@@ -141,6 +141,19 @@ typedef struct _cef_display_handler_t {
struct _cef_display_handler_t* self,
struct _cef_browser_t* browser,
double progress);
///
// Called when the browser's cursor has changed. If |type| is CT_CUSTOM then
// |custom_cursor_info| will be populated with the custom cursor information.
// Return true (1) if the cursor change was handled or false (0) for default
// handling.
///
int(CEF_CALLBACK* on_cursor_change)(
struct _cef_display_handler_t* self,
struct _cef_browser_t* browser,
cef_cursor_handle_t cursor,
cef_cursor_type_t type,
const struct _cef_cursor_info_t* custom_cursor_info);
} cef_display_handler_t;
#ifdef __cplusplus

View File

@@ -33,7 +33,7 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=e642fc1fe3b97a90c0eae7f0fc0a5cfd385e3e17$
// $hash=f9806cd79f33b6a762fff25edd4189ae42bc8fd2$
//
#ifndef CEF_INCLUDE_CAPI_CEF_RENDER_HANDLER_CAPI_H_
@@ -159,17 +159,6 @@ typedef struct _cef_render_handler_t {
cef_rect_t const* dirtyRects,
void* shared_handle);
///
// Called when the browser's cursor has changed. If |type| is CT_CUSTOM then
// |custom_cursor_info| will be populated with the custom cursor information.
///
void(CEF_CALLBACK* on_cursor_change)(
struct _cef_render_handler_t* self,
struct _cef_browser_t* browser,
cef_cursor_handle_t cursor,
cef_cursor_type_t type,
const struct _cef_cursor_info_t* custom_cursor_info);
///
// Called when the user starts dragging content in the web view. Contextual
// information about the dragged content is supplied by |drag_data|. (|x|,

View File

@@ -42,13 +42,13 @@
// way that may cause binary incompatibility with other builds. The universal
// hash value will change if any platform is affected whereas the platform hash
// values will change only if that particular platform is affected.
#define CEF_API_HASH_UNIVERSAL "22df40aa24a8bd920a2d18500c94dcc1b2c9508f"
#define CEF_API_HASH_UNIVERSAL "7f349b7262bfe13bda037370004f56a6081e543b"
#if defined(OS_WIN)
#define CEF_API_HASH_PLATFORM "7698e6c4e3bc0f749609a0172a24d34cddbe8a1f"
#define CEF_API_HASH_PLATFORM "8a5523fec15255e2fb1de64deaa15dc3554b91e5"
#elif defined(OS_MAC)
#define CEF_API_HASH_PLATFORM "5189bd75f9d076d7f136bf140b6cc5990ad452ec"
#define CEF_API_HASH_PLATFORM "f572c8f7d3aee3cd3b85bd398b0ba43eb7fe79a0"
#elif defined(OS_LINUX)
#define CEF_API_HASH_PLATFORM "96412a3d498054d352e5f9dcf5ad8ff90917c361"
#define CEF_API_HASH_PLATFORM "abf4cc6ff102e5cd019aaf51f13eb30f9bfeae45"
#endif
#ifdef __cplusplus

View File

@@ -592,18 +592,6 @@ class CefBrowserHost : public virtual CefBaseRefCounted {
CefRefPtr<CefNavigationEntryVisitor> visitor,
bool current_only) = 0;
///
// Set whether mouse cursor change is disabled.
///
/*--cef()--*/
virtual void SetMouseCursorChangeDisabled(bool disabled) = 0;
///
// Returns true if mouse cursor change is disabled.
///
/*--cef()--*/
virtual bool IsMouseCursorChangeDisabled() = 0;
///
// If a misspelled word is currently selected in an editable node calling
// this method will replace it with the specified |word|.

View File

@@ -135,6 +135,19 @@ class CefDisplayHandler : public virtual CefBaseRefCounted {
/*--cef()--*/
virtual void OnLoadingProgressChange(CefRefPtr<CefBrowser> browser,
double progress) {}
///
// Called when the browser's cursor has changed. If |type| is CT_CUSTOM then
// |custom_cursor_info| will be populated with the custom cursor information.
// Return true if the cursor change was handled or false for default handling.
///
/*--cef()--*/
virtual bool OnCursorChange(CefRefPtr<CefBrowser> browser,
CefCursorHandle cursor,
cef_cursor_type_t type,
const CefCursorInfo& custom_cursor_info) {
return false;
}
};
#endif // CEF_INCLUDE_CEF_DISPLAY_HANDLER_H_

View File

@@ -52,7 +52,6 @@
/*--cef(source=client)--*/
class CefRenderHandler : public virtual CefBaseRefCounted {
public:
typedef cef_cursor_type_t CursorType;
typedef cef_drag_operations_mask_t DragOperation;
typedef cef_drag_operations_mask_t DragOperationsMask;
typedef cef_paint_element_type_t PaintElementType;
@@ -162,16 +161,6 @@ class CefRenderHandler : public virtual CefBaseRefCounted {
const RectList& dirtyRects,
void* shared_handle) {}
///
// Called when the browser's cursor has changed. If |type| is CT_CUSTOM then
// |custom_cursor_info| will be populated with the custom cursor information.
///
/*--cef()--*/
virtual void OnCursorChange(CefRefPtr<CefBrowser> browser,
CefCursorHandle cursor,
CursorType type,
const CefCursorInfo& custom_cursor_info) {}
///
// Called when the user starts dragging content in the web view. Contextual
// information about the dragged content is supplied by |drag_data|.

View File

@@ -17,6 +17,7 @@
#include "libcef/browser/context.h"
#include "libcef/browser/devtools/devtools_manager.h"
#include "libcef/browser/media_capture_devices_dispatcher.h"
#include "libcef/browser/native/cursor_util.h"
#include "libcef/browser/osr/osr_util.h"
#include "libcef/browser/request_context_impl.h"
#include "libcef/browser/thread_util.h"
@@ -102,10 +103,11 @@ class CefWidgetHostInterceptor
// WidgetHostInterceptorForTesting method:
void SetCursor(const ui::Cursor& cursor) override {
if (browser_->IsMouseCursorChangeDisabled()) {
if (cursor_util::OnCursorChange(browser_, cursor)) {
// Don't change the cursor.
return;
}
GetForwardingInterface()->SetCursor(cursor);
}
@@ -363,12 +365,13 @@ bool AlloyBrowserHostImpl::TryCloseBrowser() {
}
void AlloyBrowserHostImpl::SetFocus(bool focus) {
if (!CEF_CURRENTLY_ON_UIT()) {
CEF_POST_TASK(CEF_UIT,
base::BindOnce(&AlloyBrowserHostImpl::SetFocus, this, focus));
return;
}
// Always execute asynchronously to work around issue #3040.
CEF_POST_TASK(CEF_UIT, base::BindOnce(&AlloyBrowserHostImpl::SetFocusInternal,
this, focus));
}
void AlloyBrowserHostImpl::SetFocusInternal(bool focus) {
CEF_REQUIRE_UIT();
if (focus)
OnSetFocus(FOCUS_SOURCE_SYSTEM);
else if (platform_delegate_)
@@ -643,18 +646,6 @@ bool AlloyBrowserHostImpl::IsBackgroundHost() {
return is_background_host_;
}
void AlloyBrowserHostImpl::SetMouseCursorChangeDisabled(bool disabled) {
base::AutoLock lock_scope(state_lock_);
if (mouse_cursor_change_disabled_ == disabled)
return;
mouse_cursor_change_disabled_ = disabled;
}
bool AlloyBrowserHostImpl::IsMouseCursorChangeDisabled() {
base::AutoLock lock_scope(state_lock_);
return mouse_cursor_change_disabled_;
}
bool AlloyBrowserHostImpl::IsWindowRenderingDisabled() {
return IsWindowless();
}

View File

@@ -119,8 +119,6 @@ class AlloyBrowserHostImpl : public CefBrowserHostBase,
CefRefPtr<CefDictionaryValue> params) override;
CefRefPtr<CefRegistration> AddDevToolsMessageObserver(
CefRefPtr<CefDevToolsMessageObserver> observer) override;
void SetMouseCursorChangeDisabled(bool disabled) override;
bool IsMouseCursorChangeDisabled() override;
bool IsWindowRenderingDisabled() override;
void WasResized() override;
void WasHidden(bool hidden) override;
@@ -373,6 +371,8 @@ class AlloyBrowserHostImpl : public CefBrowserHostBase,
void InitializeDevToolsRegistrationOnUIThread(
CefRefPtr<CefRegistration> registration);
void SetFocusInternal(bool focus);
CefWindowHandle opener_;
const bool is_windowless_;
const bool is_views_hosted_;
@@ -388,9 +388,6 @@ class AlloyBrowserHostImpl : public CefBrowserHostBase,
// on the UI thread.
bool window_destroyed_ = false;
// True if mouse cursor change is disabled.
bool mouse_cursor_change_disabled_ = false;
// Used for creating and managing file dialogs.
std::unique_ptr<CefFileDialogManager> file_dialog_manager_;

View File

@@ -454,6 +454,7 @@ void CefBrowserHostBase::GoBack() {
auto callback = base::BindOnce(&CefBrowserHostBase::GoBack, this);
if (!CEF_CURRENTLY_ON_UIT()) {
CEF_POST_TASK(CEF_UIT, std::move(callback));
return;
}
if (browser_info_->IsNavigationLocked(std::move(callback))) {
@@ -475,6 +476,7 @@ void CefBrowserHostBase::GoForward() {
auto callback = base::BindOnce(&CefBrowserHostBase::GoForward, this);
if (!CEF_CURRENTLY_ON_UIT()) {
CEF_POST_TASK(CEF_UIT, std::move(callback));
return;
}
if (browser_info_->IsNavigationLocked(std::move(callback))) {
@@ -496,6 +498,7 @@ void CefBrowserHostBase::Reload() {
auto callback = base::BindOnce(&CefBrowserHostBase::Reload, this);
if (!CEF_CURRENTLY_ON_UIT()) {
CEF_POST_TASK(CEF_UIT, std::move(callback));
return;
}
if (browser_info_->IsNavigationLocked(std::move(callback))) {
@@ -512,6 +515,7 @@ void CefBrowserHostBase::ReloadIgnoreCache() {
auto callback = base::BindOnce(&CefBrowserHostBase::ReloadIgnoreCache, this);
if (!CEF_CURRENTLY_ON_UIT()) {
CEF_POST_TASK(CEF_UIT, std::move(callback));
return;
}
if (browser_info_->IsNavigationLocked(std::move(callback))) {
@@ -528,6 +532,7 @@ void CefBrowserHostBase::StopLoad() {
auto callback = base::BindOnce(&CefBrowserHostBase::StopLoad, this);
if (!CEF_CURRENTLY_ON_UIT()) {
CEF_POST_TASK(CEF_UIT, std::move(callback));
return;
}
if (browser_info_->IsNavigationLocked(std::move(callback))) {

View File

@@ -265,15 +265,6 @@ CefRefPtr<CefRegistration> ChromeBrowserHostImpl::AddDevToolsMessageObserver(
return nullptr;
}
void ChromeBrowserHostImpl::SetMouseCursorChangeDisabled(bool disabled) {
NOTIMPLEMENTED();
}
bool ChromeBrowserHostImpl::IsMouseCursorChangeDisabled() {
NOTIMPLEMENTED();
return false;
}
bool ChromeBrowserHostImpl::IsWindowRenderingDisabled() {
return false;
}

View File

@@ -97,8 +97,6 @@ class ChromeBrowserHostImpl : public CefBrowserHostBase {
CefRefPtr<CefDictionaryValue> params) override;
CefRefPtr<CefRegistration> AddDevToolsMessageObserver(
CefRefPtr<CefDevToolsMessageObserver> observer) override;
void SetMouseCursorChangeDisabled(bool disabled) override;
bool IsMouseCursorChangeDisabled() override;
bool IsWindowRenderingDisabled() override;
void WasResized() override;
void WasHidden(bool hidden) override;

View File

@@ -0,0 +1,63 @@
// Copyright 2020 The Chromium Embedded Framework Authors. Portions copyright
// 2012 The Chromium Authors. All rights reserved. Use of this source code is
// governed by a BSD-style license that can be found in the LICENSE file.
#include "libcef/browser/native/cursor_util.h"
#include "libcef/browser/browser_host_base.h"
#include "content/common/cursors/webcursor.h"
#include "ui/base/cursor/mojom/cursor_type.mojom.h"
namespace cursor_util {
bool OnCursorChange(CefBrowserHostBase* browser, const ui::Cursor& ui_cursor) {
auto client = browser->GetClient();
if (!client)
return false;
auto handler = client->GetDisplayHandler();
if (!handler)
return false;
const cef_cursor_type_t cursor_type =
static_cast<cef_cursor_type_t>(ui_cursor.type());
CefCursorInfo custom_cursor_info;
if (ui_cursor.type() == ui::mojom::CursorType::kCustom) {
custom_cursor_info.hotspot.x = ui_cursor.custom_hotspot().x();
custom_cursor_info.hotspot.y = ui_cursor.custom_hotspot().y();
custom_cursor_info.image_scale_factor = ui_cursor.image_scale_factor();
custom_cursor_info.buffer = ui_cursor.custom_bitmap().getPixels();
custom_cursor_info.size.width = ui_cursor.custom_bitmap().width();
custom_cursor_info.size.height = ui_cursor.custom_bitmap().height();
}
bool handled = false;
#if defined(USE_AURA)
content::WebCursor web_cursor(ui_cursor);
CefCursorHandle platform_cursor;
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));
} else {
platform_cursor = cursor_util::GetPlatformCursor(ui_cursor.type());
}
handled = handler->OnCursorChange(browser, platform_cursor, cursor_type,
custom_cursor_info);
#elif defined(OS_MAC)
// |web_cursor| owns the resulting |native_cursor|.
content::WebCursor web_cursor(ui_cursor);
CefCursorHandle native_cursor = web_cursor.GetNativeCursor();
handled = handler->OnCursorChange(browser, native_cursor, cursor_type,
custom_cursor_info);
#else
NOTIMPLEMENTED();
#endif
return handled;
}
} // namespace cursor_util

View File

@@ -0,0 +1,27 @@
// Copyright 2020 The Chromium Embedded Framework Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CEF_LIBCEF_BROWSER_NATIVE_CURSOR_UTIL_H_
#define CEF_LIBCEF_BROWSER_NATIVE_CURSOR_UTIL_H_
#include "include/internal/cef_types.h"
#include "ui/base/cursor/cursor.h"
#include "ui/base/cursor/mojom/cursor_type.mojom-forward.h"
class CefBrowserHostBase;
namespace cursor_util {
#if defined(USE_AURA)
cef_cursor_handle_t GetPlatformCursor(ui::mojom::CursorType type);
cef_cursor_handle_t ToCursorHandle(ui::PlatformCursor cursor);
#endif // defined(USE_AURA)
// Returns true if the client handled the cursor change.
bool OnCursorChange(CefBrowserHostBase* browser, const ui::Cursor& ui_cursor);
} // namespace cursor_util
#endif // CEF_LIBCEF_BROWSER_NATIVE_CURSOR_UTIL_H_

View File

@@ -1,9 +1,8 @@
// Copyright (c) 2014 The Chromium Embedded Framework Authors.
// Portions copyright (c) 2012 The Chromium Authors. All rights reserved.
// Copyright 2020 The Chromium Embedded Framework Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "libcef/browser/osr/render_widget_host_view_osr.h"
#include "libcef/browser/native/cursor_util.h"
#include "ui/base/cursor/cursor_factory.h"
@@ -11,8 +10,9 @@
#include "ui/base/x/x11_cursor.h"
#endif
CefCursorHandle CefRenderWidgetHostViewOSR::GetPlatformCursor(
ui::mojom::CursorType type) {
namespace cursor_util {
cef_cursor_handle_t GetPlatformCursor(ui::mojom::CursorType type) {
auto cursor = ui::CursorFactory::GetInstance()->GetDefaultCursor(type);
if (cursor) {
return ToCursorHandle(*cursor);
@@ -20,13 +20,14 @@ CefCursorHandle CefRenderWidgetHostViewOSR::GetPlatformCursor(
return 0;
}
CefCursorHandle CefRenderWidgetHostViewOSR::ToCursorHandle(
ui::PlatformCursor cursor) {
cef_cursor_handle_t ToCursorHandle(ui::PlatformCursor cursor) {
#if defined(USE_X11)
// See https://crbug.com/1029142 for background.
return static_cast<CefCursorHandle>(
return static_cast<cef_cursor_handle_t>(
static_cast<ui::X11Cursor*>(cursor)->xcursor());
#else
return cursor;
#endif
}
} // namespace cursor_util

View File

@@ -1,42 +1,21 @@
// Copyright (c) 2014 The Chromium Embedded Framework Authors.
// Portions copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Copyright 2020 The Chromium Embedded Framework Authors. Portions copyright
// 2012 The Chromium Authors. All rights reserved. Use of this source code is
// governed by a BSD-style license that can be found in the LICENSE file.
#include "libcef/browser/osr/render_widget_host_view_osr.h"
#include "libcef/browser/native/cursor_util.h"
#include <windows.h>
#include "libcef/common/app_manager.h"
#include "ui/base/cursor/mojom/cursor_type.mojom.h"
#include "ui/resources/grit/ui_unscaled_resources.h"
namespace cursor_util {
namespace {
class CefCompositorHostWin : public gfx::WindowImpl {
public:
CefCompositorHostWin() {
// Create a hidden 1x1 borderless window.
set_window_style(WS_POPUP | WS_SYSMENU);
Init(NULL, gfx::Rect(0, 0, 1, 1));
}
~CefCompositorHostWin() override { DestroyWindow(hwnd()); }
private:
CR_BEGIN_MSG_MAP_EX(CefCompositorHostWin)
CR_MSG_WM_PAINT(OnPaint)
CR_END_MSG_MAP()
CR_MSG_MAP_CLASS_DECLARATIONS(CefCompositorHostWin)
void OnPaint(HDC dc) { ValidateRect(hwnd(), NULL); }
DISALLOW_COPY_AND_ASSIGN(CefCompositorHostWin);
};
// From content/common/cursors/webcursor_win.cc.
LPCWSTR ToCursorID(ui::mojom::CursorType type) {
switch (type) {
case ui::mojom::CursorType::kPointer:
@@ -152,8 +131,7 @@ bool IsSystemCursorID(LPCWSTR cursor_id) {
} // namespace
CefCursorHandle CefRenderWidgetHostViewOSR::GetPlatformCursor(
ui::mojom::CursorType type) {
cef_cursor_handle_t GetPlatformCursor(ui::mojom::CursorType type) {
// Using a dark 1x1 bit bmp kNone cursor may still cause DWM to do composition
// work unnecessarily. Better to totally remove it from the screen.
// crbug.com/1069698
@@ -173,7 +151,8 @@ CefCursorHandle CefRenderWidgetHostViewOSR::GetPlatformCursor(
return LoadCursor(module_handle, cursor_id);
}
CefCursorHandle CefRenderWidgetHostViewOSR::ToCursorHandle(
ui::PlatformCursor cursor) {
cef_cursor_handle_t ToCursorHandle(ui::PlatformCursor cursor) {
return cursor;
}
} // namespace cursor_util

View File

@@ -91,6 +91,9 @@ const char* kAllowedWebUIHosts[] = {
chrome::kChromeUIPrintHost,
content::kChromeUIProcessInternalsHost,
content::kChromeUIResourcesHost,
#if defined(OS_WIN) || defined(OS_LINUX)
chrome::kChromeUISandboxHost,
#endif
content::kChromeUIServiceWorkerInternalsHost,
chrome::kChromeUISystemInfoHost,
chrome::kChromeUIThemeHost,

View File

@@ -604,54 +604,7 @@ void CefRenderWidgetHostViewOSR::InitAsFullscreen(
}
void CefRenderWidgetHostViewOSR::UpdateCursor(
const content::WebCursor& cursor) {
TRACE_EVENT0("cef", "CefRenderWidgetHostViewOSR::UpdateCursor");
if (!browser_impl_.get())
return;
CefRefPtr<CefRenderHandler> handler =
browser_impl_->GetClient()->GetRenderHandler();
CHECK(handler);
const auto& ui_cursor = cursor.cursor();
const cef_cursor_type_t cursor_type =
static_cast<cef_cursor_type_t>(ui_cursor.type());
CefCursorInfo custom_cursor_info;
if (ui_cursor.type() == ui::mojom::CursorType::kCustom) {
custom_cursor_info.hotspot.x = ui_cursor.custom_hotspot().x();
custom_cursor_info.hotspot.y = ui_cursor.custom_hotspot().y();
custom_cursor_info.image_scale_factor = ui_cursor.image_scale_factor();
custom_cursor_info.buffer = ui_cursor.custom_bitmap().getPixels();
custom_cursor_info.size.width = ui_cursor.custom_bitmap().width();
custom_cursor_info.size.height = ui_cursor.custom_bitmap().height();
}
#if defined(USE_AURA)
content::WebCursor web_cursor(ui_cursor);
CefCursorHandle platform_cursor;
if (ui_cursor.type() == ui::mojom::CursorType::kCustom) {
// |web_cursor| owns the resulting |platform_cursor|.
platform_cursor = ToCursorHandle(web_cursor.GetPlatformCursor(ui_cursor));
} else {
platform_cursor = GetPlatformCursor(ui_cursor.type());
}
handler->OnCursorChange(browser_impl_.get(), platform_cursor, cursor_type,
custom_cursor_info);
#elif defined(OS_MAC)
// |web_cursor| owns the resulting |native_cursor|.
content::WebCursor web_cursor(cursor);
CefCursorHandle native_cursor = web_cursor.GetNativeCursor();
handler->OnCursorChange(browser_impl_.get(), native_cursor, cursor_type,
custom_cursor_info);
#else
// TODO(port): Implement this method to work on other platforms as part of
// off-screen rendering support.
NOTREACHED();
#endif
}
const content::WebCursor& cursor) {}
content::CursorManager* CefRenderWidgetHostViewOSR::GetCursorManager() {
return cursor_manager_.get();

View File

@@ -328,11 +328,6 @@ class CefRenderWidgetHostViewOSR
// opaqueness changes.
void UpdateBackgroundColorFromRenderer(SkColor color);
#if defined(USE_AURA)
CefCursorHandle GetPlatformCursor(ui::mojom::CursorType type);
CefCursorHandle ToCursorHandle(ui::PlatformCursor cursor);
#endif
// The background color of the web content.
SkColor background_color_;

View File

@@ -130,7 +130,9 @@ CefWebContentsViewOSR::CreateViewForChildWidget(
void CefWebContentsViewOSR::SetPageTitle(const base::string16& title) {}
void CefWebContentsViewOSR::RenderViewReady() {}
void CefWebContentsViewOSR::RenderViewReady() {
RenderViewCreated();
}
void CefWebContentsViewOSR::RenderViewHostChanged(
content::RenderViewHost* old_host,

View File

@@ -132,6 +132,14 @@ void CefBrowserViewImpl::SetPreferAccelerators(bool prefer_accelerators) {
root_view()->set_allow_accelerators(prefer_accelerators);
}
void CefBrowserViewImpl::RequestFocus() {
CEF_REQUIRE_VALID_RETURN_VOID();
// Always execute asynchronously to work around issue #3040.
CEF_POST_TASK(CEF_UIT,
base::BindOnce(&CefBrowserViewImpl::RequestFocusInternal,
weak_ptr_factory_.GetWeakPtr()));
}
void CefBrowserViewImpl::SetBackgroundColor(cef_color_t color) {
CEF_REQUIRE_VALID_RETURN_VOID();
ParentClass::SetBackgroundColor(color);
@@ -182,7 +190,7 @@ void CefBrowserViewImpl::OnBoundsChanged() {
CefBrowserViewImpl::CefBrowserViewImpl(
CefRefPtr<CefBrowserViewDelegate> delegate)
: ParentClass(delegate) {}
: ParentClass(delegate), weak_ptr_factory_(this) {}
void CefBrowserViewImpl::SetPendingBrowserCreateParams(
CefRefPtr<CefClient> client,
@@ -248,3 +256,7 @@ bool CefBrowserViewImpl::HandleAccelerator(
return false;
}
void CefBrowserViewImpl::RequestFocusInternal() {
ParentClass::RequestFocus();
}

View File

@@ -14,6 +14,7 @@
#include "libcef/browser/views/view_impl.h"
#include "base/callback_forward.h"
#include "base/memory/weak_ptr.h"
#include "ui/views/controls/webview/unhandled_keyboard_event_handler.h"
class CefBrowserHostBase;
@@ -59,6 +60,7 @@ class CefBrowserViewImpl : public CefViewImpl<CefBrowserViewView,
// CefView methods:
CefRefPtr<CefBrowserView> AsBrowserView() override { return this; }
void RequestFocus() override;
void SetBackgroundColor(cef_color_t color) override;
// CefViewAdapter methods:
@@ -96,6 +98,8 @@ class CefBrowserViewImpl : public CefViewImpl<CefBrowserViewView,
bool HandleAccelerator(const content::NativeWebKeyboardEvent& event,
views::FocusManager* focus_manager);
void RequestFocusInternal();
std::unique_ptr<CefBrowserCreateParams> pending_browser_create_params_;
CefRefPtr<CefBrowserHostBase> browser_;
@@ -105,6 +109,8 @@ class CefBrowserViewImpl : public CefViewImpl<CefBrowserViewView,
base::RepeatingClosure on_bounds_changed_;
base::WeakPtrFactory<CefBrowserViewImpl> weak_ptr_factory_;
IMPLEMENT_REFCOUNTING_DELETE_ON_UIT(CefBrowserViewImpl);
DISALLOW_COPY_AND_ASSIGN(CefBrowserViewImpl);
};

View File

@@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=516b55b7ea53e2de2b096e85ba0eb83f2a2693f3$
// $hash=fa230168d79d0644b518d042bf3f9370e6eccf8c$
//
#include "libcef_dll/cpptoc/browser_host_cpptoc.h"
@@ -621,39 +621,6 @@ browser_host_get_navigation_entries(struct _cef_browser_host_t* self,
current_only ? true : false);
}
void CEF_CALLBACK
browser_host_set_mouse_cursor_change_disabled(struct _cef_browser_host_t* self,
int disabled) {
shutdown_checker::AssertNotShutdown();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Execute
CefBrowserHostCppToC::Get(self)->SetMouseCursorChangeDisabled(
disabled ? true : false);
}
int CEF_CALLBACK
browser_host_is_mouse_cursor_change_disabled(struct _cef_browser_host_t* self) {
shutdown_checker::AssertNotShutdown();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
bool _retval = CefBrowserHostCppToC::Get(self)->IsMouseCursorChangeDisabled();
// Return type: bool
return _retval;
}
void CEF_CALLBACK
browser_host_replace_misspelling(struct _cef_browser_host_t* self,
const cef_string_t* word) {
@@ -1367,10 +1334,6 @@ CefBrowserHostCppToC::CefBrowserHostCppToC() {
GetStruct()->add_dev_tools_message_observer =
browser_host_add_dev_tools_message_observer;
GetStruct()->get_navigation_entries = browser_host_get_navigation_entries;
GetStruct()->set_mouse_cursor_change_disabled =
browser_host_set_mouse_cursor_change_disabled;
GetStruct()->is_mouse_cursor_change_disabled =
browser_host_is_mouse_cursor_change_disabled;
GetStruct()->replace_misspelling = browser_host_replace_misspelling;
GetStruct()->add_word_to_dictionary = browser_host_add_word_to_dictionary;
GetStruct()->is_window_rendering_disabled =

View File

@@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=1e329026cfad131337e794e5501367604f62fdb6$
// $hash=a6a81143ea8792ba5643643389f4dc2a8815174a$
//
#include "libcef_dll/cpptoc/display_handler_cpptoc.h"
@@ -252,6 +252,41 @@ display_handler_on_loading_progress_change(struct _cef_display_handler_t* self,
CefBrowserCToCpp::Wrap(browser), progress);
}
int CEF_CALLBACK display_handler_on_cursor_change(
struct _cef_display_handler_t* self,
cef_browser_t* browser,
cef_cursor_handle_t cursor,
cef_cursor_type_t type,
const struct _cef_cursor_info_t* custom_cursor_info) {
shutdown_checker::AssertNotShutdown();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Verify param: browser; type: refptr_diff
DCHECK(browser);
if (!browser)
return 0;
// Verify param: custom_cursor_info; type: struct_byref_const
DCHECK(custom_cursor_info);
if (!custom_cursor_info)
return 0;
// Translate param: custom_cursor_info; type: struct_byref_const
CefCursorInfo custom_cursor_infoObj;
if (custom_cursor_info)
custom_cursor_infoObj.Set(*custom_cursor_info, false);
// Execute
bool _retval = CefDisplayHandlerCppToC::Get(self)->OnCursorChange(
CefBrowserCToCpp::Wrap(browser), cursor, type, custom_cursor_infoObj);
// Return type: bool
return _retval;
}
} // namespace
// CONSTRUCTOR - Do not edit by hand.
@@ -268,6 +303,7 @@ CefDisplayHandlerCppToC::CefDisplayHandlerCppToC() {
GetStruct()->on_auto_resize = display_handler_on_auto_resize;
GetStruct()->on_loading_progress_change =
display_handler_on_loading_progress_change;
GetStruct()->on_cursor_change = display_handler_on_cursor_change;
}
// DESTRUCTOR - Do not edit by hand.

View File

@@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=2e22f210ff06337ac41e71a00b9dc6edce08e6d8$
// $hash=22da80871c4a9dfc9989f577456b7e3d987e805d$
//
#include "libcef_dll/cpptoc/render_handler_cpptoc.h"
@@ -324,38 +324,6 @@ render_handler_on_accelerated_paint(struct _cef_render_handler_t* self,
CefBrowserCToCpp::Wrap(browser), type, dirtyRectsList, shared_handle);
}
void CEF_CALLBACK render_handler_on_cursor_change(
struct _cef_render_handler_t* self,
cef_browser_t* browser,
cef_cursor_handle_t cursor,
cef_cursor_type_t type,
const struct _cef_cursor_info_t* custom_cursor_info) {
shutdown_checker::AssertNotShutdown();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: browser; type: refptr_diff
DCHECK(browser);
if (!browser)
return;
// Verify param: custom_cursor_info; type: struct_byref_const
DCHECK(custom_cursor_info);
if (!custom_cursor_info)
return;
// Translate param: custom_cursor_info; type: struct_byref_const
CefCursorInfo custom_cursor_infoObj;
if (custom_cursor_info)
custom_cursor_infoObj.Set(*custom_cursor_info, false);
// Execute
CefRenderHandlerCppToC::Get(self)->OnCursorChange(
CefBrowserCToCpp::Wrap(browser), cursor, type, custom_cursor_infoObj);
}
int CEF_CALLBACK
render_handler_start_dragging(struct _cef_render_handler_t* self,
cef_browser_t* browser,
@@ -536,7 +504,6 @@ CefRenderHandlerCppToC::CefRenderHandlerCppToC() {
GetStruct()->on_popup_size = render_handler_on_popup_size;
GetStruct()->on_paint = render_handler_on_paint;
GetStruct()->on_accelerated_paint = render_handler_on_accelerated_paint;
GetStruct()->on_cursor_change = render_handler_on_cursor_change;
GetStruct()->start_dragging = render_handler_start_dragging;
GetStruct()->update_drag_cursor = render_handler_update_drag_cursor;
GetStruct()->on_scroll_offset_changed =

View File

@@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=a362e11e85ce68488bbb0f5232b01f53cffeec1d$
// $hash=9751b66edccb575f54c07bf14da39516f52b7402$
//
#include "libcef_dll/ctocpp/browser_host_ctocpp.h"
@@ -567,37 +567,6 @@ void CefBrowserHostCToCpp::GetNavigationEntries(
_struct, CefNavigationEntryVisitorCppToC::Wrap(visitor), current_only);
}
NO_SANITIZE("cfi-icall")
void CefBrowserHostCToCpp::SetMouseCursorChangeDisabled(bool disabled) {
shutdown_checker::AssertNotShutdown();
cef_browser_host_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, set_mouse_cursor_change_disabled))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_mouse_cursor_change_disabled(_struct, disabled);
}
NO_SANITIZE("cfi-icall")
bool CefBrowserHostCToCpp::IsMouseCursorChangeDisabled() {
shutdown_checker::AssertNotShutdown();
cef_browser_host_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, is_mouse_cursor_change_disabled))
return false;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = _struct->is_mouse_cursor_change_disabled(_struct);
// Return type: bool
return _retval ? true : false;
}
NO_SANITIZE("cfi-icall")
void CefBrowserHostCToCpp::ReplaceMisspelling(const CefString& word) {
shutdown_checker::AssertNotShutdown();

View File

@@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=c9abd1293472afbac964aac4cd7dd4cac9dd8e58$
// $hash=07e94d03d7ceb97115adedb4cc641318cd77975b$
//
#ifndef CEF_LIBCEF_DLL_CTOCPP_BROWSER_HOST_CTOCPP_H_
@@ -84,8 +84,6 @@ class CefBrowserHostCToCpp : public CefCToCppRefCounted<CefBrowserHostCToCpp,
CefRefPtr<CefDevToolsMessageObserver> observer) OVERRIDE;
void GetNavigationEntries(CefRefPtr<CefNavigationEntryVisitor> visitor,
bool current_only) OVERRIDE;
void SetMouseCursorChangeDisabled(bool disabled) OVERRIDE;
bool IsMouseCursorChangeDisabled() OVERRIDE;
void ReplaceMisspelling(const CefString& word) OVERRIDE;
void AddWordToDictionary(const CefString& word) OVERRIDE;
bool IsWindowRenderingDisabled() OVERRIDE;

View File

@@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=11c971f10c02ae341f62e70dca05528f78c8d1a2$
// $hash=16db2529b69497fdccf21d56531906127e473044$
//
#include "libcef_dll/ctocpp/display_handler_ctocpp.h"
@@ -249,6 +249,34 @@ void CefDisplayHandlerCToCpp::OnLoadingProgressChange(
progress);
}
NO_SANITIZE("cfi-icall")
bool CefDisplayHandlerCToCpp::OnCursorChange(
CefRefPtr<CefBrowser> browser,
CefCursorHandle cursor,
cef_cursor_type_t type,
const CefCursorInfo& custom_cursor_info) {
shutdown_checker::AssertNotShutdown();
cef_display_handler_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, on_cursor_change))
return false;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Verify param: browser; type: refptr_diff
DCHECK(browser.get());
if (!browser.get())
return false;
// Execute
int _retval =
_struct->on_cursor_change(_struct, CefBrowserCppToC::Wrap(browser),
cursor, type, &custom_cursor_info);
// Return type: bool
return _retval ? true : false;
}
// CONSTRUCTOR - Do not edit by hand.
CefDisplayHandlerCToCpp::CefDisplayHandlerCToCpp() {}

View File

@@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=2a5e7a2afb4d183e4688ef7aec8d12d2bc1d5212$
// $hash=4874f1f7e3c35cb0b079b65c03aed01f9cc30e47$
//
#ifndef CEF_LIBCEF_DLL_CTOCPP_DISPLAY_HANDLER_CTOCPP_H_
@@ -57,6 +57,10 @@ class CefDisplayHandlerCToCpp
const CefSize& new_size) override;
void OnLoadingProgressChange(CefRefPtr<CefBrowser> browser,
double progress) override;
bool OnCursorChange(CefRefPtr<CefBrowser> browser,
CefCursorHandle cursor,
cef_cursor_type_t type,
const CefCursorInfo& custom_cursor_info) override;
};
#endif // CEF_LIBCEF_DLL_CTOCPP_DISPLAY_HANDLER_CTOCPP_H_

View File

@@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=f592f3806c9f87ee6c691b9f072cee4d6bb4650e$
// $hash=b9bf8bf4ccc5ef6a43f86ef697617fc6fe8470a5$
//
#include "libcef_dll/ctocpp/render_handler_ctocpp.h"
@@ -265,30 +265,6 @@ void CefRenderHandlerCToCpp::OnAcceleratedPaint(CefRefPtr<CefBrowser> browser,
delete[] dirtyRectsList;
}
NO_SANITIZE("cfi-icall")
void CefRenderHandlerCToCpp::OnCursorChange(
CefRefPtr<CefBrowser> browser,
CefCursorHandle cursor,
CursorType type,
const CefCursorInfo& custom_cursor_info) {
shutdown_checker::AssertNotShutdown();
cef_render_handler_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, on_cursor_change))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Verify param: browser; type: refptr_diff
DCHECK(browser.get());
if (!browser.get())
return;
// Execute
_struct->on_cursor_change(_struct, CefBrowserCppToC::Wrap(browser), cursor,
type, &custom_cursor_info);
}
NO_SANITIZE("cfi-icall")
bool CefRenderHandlerCToCpp::StartDragging(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefDragData> drag_data,

View File

@@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=ed8882abe62f08d4746a646307ef74d4987780c4$
// $hash=be7b5b4b7b8782c7bd3a4c52ed75bc3c9c044265$
//
#ifndef CEF_LIBCEF_DLL_CTOCPP_RENDER_HANDLER_CTOCPP_H_
@@ -57,10 +57,6 @@ class CefRenderHandlerCToCpp
PaintElementType type,
const RectList& dirtyRects,
void* shared_handle) override;
void OnCursorChange(CefRefPtr<CefBrowser> browser,
CefCursorHandle cursor,
CursorType type,
const CefCursorInfo& custom_cursor_info) override;
bool StartDragging(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefDragData> drag_data,
DragOperationsMask allowed_ops,

View File

@@ -103,7 +103,10 @@ patches = [
#
# Support configuration of RWHVGuest device scale factor.
# https://bitbucket.org/chromiumembedded/cef/issues/2078
'name': 'views_widget_180_1481_1565_1677_1749',
#
# Windows: Fix focus assignment when clicking WebView with external parent.
# https://bitbucket.org/chromiumembedded/cef/issues/3031
'name': 'views_widget',
},
{
# Allow specification of a custom WebContentsView.
@@ -518,8 +521,8 @@ patches = [
'name': 'chrome_browser_sharesheet_1123388',
},
{
# Windows/Linux: Fix scrolling in popup lists with high-dpi.
# https://crrev.com/97514ca869
'name': 'webkit_widget_base_2444320',
# Linux: Fix ATK assertion error when generating ARM build config.
# https://bugs.chromium.org/p/chromium/issues/detail?id=1123214
'name': 'linux_atk_1123214',
}
]

View File

@@ -1,5 +1,5 @@
diff --git base/BUILD.gn base/BUILD.gn
index 1d449b35bf40..0b859084ba1c 100644
index 1d97f72804f2..5267c89c96e5 100644
--- base/BUILD.gn
+++ base/BUILD.gn
@@ -33,6 +33,7 @@ import("//build/config/ui.gni")
@@ -10,7 +10,7 @@ index 1d449b35bf40..0b859084ba1c 100644
import("//testing/libfuzzer/fuzzer_test.gni")
import("//testing/test.gni")
import("//third_party/icu/config.gni")
@@ -1646,7 +1647,11 @@ component("base") {
@@ -1652,7 +1653,11 @@ component("base") {
"hash/md5_constexpr_internal.h",
"hash/sha1.h",
]
@@ -23,7 +23,7 @@ index 1d449b35bf40..0b859084ba1c 100644
sources += [
"hash/md5_nacl.cc",
"hash/md5_nacl.h",
@@ -1841,6 +1846,12 @@ component("base") {
@@ -1847,6 +1852,12 @@ component("base") {
defines += [ "COM_INIT_CHECK_HOOK_DISABLED" ]
}

View File

@@ -1,5 +1,5 @@
diff --git chrome/browser/BUILD.gn chrome/browser/BUILD.gn
index e462f7d8bef1..6c1c686f161c 100644
index 62ddc2d8548b..371fbad54312 100644
--- chrome/browser/BUILD.gn
+++ chrome/browser/BUILD.gn
@@ -12,6 +12,7 @@ import("//build/config/crypto.gni")
@@ -10,7 +10,7 @@ index e462f7d8bef1..6c1c686f161c 100644
import("//chrome/browser/buildflags.gni")
import("//chrome/browser/downgrade/buildflags.gni")
import("//chrome/common/features.gni")
@@ -1876,6 +1877,7 @@ static_library("browser") {
@@ -1883,6 +1884,7 @@ static_library("browser") {
"//build:branding_buildflags",
"//build:chromeos_buildflags",
"//cc",
@@ -18,7 +18,7 @@ index e462f7d8bef1..6c1c686f161c 100644
"//chrome:extra_resources",
"//chrome:resources",
"//chrome:strings",
@@ -2354,6 +2356,10 @@ static_library("browser") {
@@ -2361,6 +2363,10 @@ static_library("browser") {
]
}
@@ -29,7 +29,7 @@ index e462f7d8bef1..6c1c686f161c 100644
if (is_android) {
sources += [
"after_startup_task_utils_android.cc",
@@ -4821,7 +4827,7 @@ static_library("browser") {
@@ -4837,7 +4843,7 @@ static_library("browser") {
]
}

View File

@@ -35,10 +35,10 @@ index ce66d73e0fa4..cc62e05ba3ba 100644
return dockMenu;
}
diff --git chrome/browser/browser_process.h chrome/browser/browser_process.h
index b6fe1fee2cbb..84a75c6070d6 100644
index a453e1acb6db..45ef09287f7b 100644
--- chrome/browser/browser_process.h
+++ chrome/browser/browser_process.h
@@ -202,10 +202,12 @@ class BrowserProcess {
@@ -207,10 +207,12 @@ class BrowserProcess {
virtual DownloadStatusUpdater* download_status_updater() = 0;
virtual DownloadRequestLimiter* download_request_limiter() = 0;
@@ -52,10 +52,10 @@ index b6fe1fee2cbb..84a75c6070d6 100644
// Returns the StatusTray, which provides an API for displaying status icons
// in the system status tray. Returns NULL if status icons are not supported
diff --git chrome/browser/browser_process_impl.cc chrome/browser/browser_process_impl.cc
index 443348c2de00..7486628a9912 100644
index b56d49bdb10b..422ed84c6e45 100644
--- chrome/browser/browser_process_impl.cc
+++ chrome/browser/browser_process_impl.cc
@@ -951,24 +951,19 @@ DownloadRequestLimiter* BrowserProcessImpl::download_request_limiter() {
@@ -954,24 +954,19 @@ DownloadRequestLimiter* BrowserProcessImpl::download_request_limiter() {
return download_request_limiter_.get();
}
@@ -83,10 +83,10 @@ index 443348c2de00..7486628a9912 100644
StatusTray* BrowserProcessImpl::status_tray() {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
diff --git chrome/browser/browser_process_impl.h chrome/browser/browser_process_impl.h
index 8a8d8a820690..c06d97c65ec2 100644
index 7cc470fe599d..b7dd5c71ce88 100644
--- chrome/browser/browser_process_impl.h
+++ chrome/browser/browser_process_impl.h
@@ -163,9 +163,11 @@ class BrowserProcessImpl : public BrowserProcess,
@@ -165,9 +165,11 @@ class BrowserProcessImpl : public BrowserProcess,
void SetApplicationLocale(const std::string& actual_locale) override;
DownloadStatusUpdater* download_status_updater() override;
DownloadRequestLimiter* download_request_limiter() override;

View File

@@ -1,5 +1,5 @@
diff --git chrome/browser/ui/BUILD.gn chrome/browser/ui/BUILD.gn
index bf4ca6cdccc4..1b9607765313 100644
index ff8643975565..7fdb9a3ab7f7 100644
--- chrome/browser/ui/BUILD.gn
+++ chrome/browser/ui/BUILD.gn
@@ -10,6 +10,7 @@ import("//build/config/crypto.gni")
@@ -29,15 +29,15 @@ index bf4ca6cdccc4..1b9607765313 100644
"//chrome:extra_resources",
"//chrome:resources",
"//chrome:strings",
@@ -1525,6 +1531,7 @@ static_library("ui") {
@@ -1527,6 +1533,7 @@ static_library("ui") {
"//components/page_load_metrics/browser",
"//components/performance_manager:site_data_proto",
"//components/printing/browser",
+ "//components/printing/common:mojo_interfaces",
"//components/profile_metrics",
"//components/safe_browsing/core/common:safe_browsing_policy_handler",
"//components/safety_check",
"//components/search_provider_logos",
@@ -3243,7 +3250,9 @@ static_library("ui") {
@@ -3249,7 +3256,9 @@ static_library("ui") {
"views/frame/browser_desktop_window_tree_host_platform.h",
]
}

View File

@@ -1,8 +1,8 @@
diff --git chrome/browser/chrome_content_browser_client.cc chrome/browser/chrome_content_browser_client.cc
index c5c7a662232d..c1d9e8c5434d 100644
index 06c040ecd7ca..6b33c5d25d2a 100644
--- chrome/browser/chrome_content_browser_client.cc
+++ chrome/browser/chrome_content_browser_client.cc
@@ -1035,10 +1035,6 @@ void LaunchURL(const GURL& url,
@@ -1036,10 +1036,6 @@ void LaunchURL(const GURL& url,
}
}
@@ -13,7 +13,7 @@ index c5c7a662232d..c1d9e8c5434d 100644
void MaybeAppendSecureOriginsAllowlistSwitch(base::CommandLine* cmdline) {
// |allowlist| combines pref/policy + cmdline switch in the browser process.
// For renderer and utility (e.g. NetworkService) processes the switch is the
@@ -1217,6 +1213,14 @@ const blink::UserAgentBrandList& GetBrandVersionList() {
@@ -1228,6 +1224,14 @@ const blink::UserAgentBrandList& GetBrandVersionList() {
return *greased_brand_version_list;
}
@@ -29,7 +29,7 @@ index c5c7a662232d..c1d9e8c5434d 100644
base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
if (command_line->HasSwitch(switches::kUserAgent)) {
diff --git chrome/browser/chrome_content_browser_client.h chrome/browser/chrome_content_browser_client.h
index ef7da4343581..93ad5e8b1d9b 100644
index 457d9eee22f0..e45059eb1d42 100644
--- chrome/browser/chrome_content_browser_client.h
+++ chrome/browser/chrome_content_browser_client.h
@@ -98,7 +98,8 @@ class ChromeXrIntegrationClient;

View File

@@ -1,5 +1,5 @@
diff --git chrome/browser/profiles/profile_manager.cc chrome/browser/profiles/profile_manager.cc
index 670a33244287..9c13775f385d 100644
index 99b167f0aba8..c62cf17090c0 100644
--- chrome/browser/profiles/profile_manager.cc
+++ chrome/browser/profiles/profile_manager.cc
@@ -373,7 +373,7 @@ ProfileManager::ProfileManager(const base::FilePath& user_data_dir)

View File

@@ -1,5 +1,5 @@
diff --git chrome/browser/plugins/plugin_info_host_impl.cc chrome/browser/plugins/plugin_info_host_impl.cc
index d789ee040ac5..19e5a5daa343 100644
index 19de17320066..1dfba315226f 100644
--- chrome/browser/plugins/plugin_info_host_impl.cc
+++ chrome/browser/plugins/plugin_info_host_impl.cc
@@ -18,6 +18,7 @@
@@ -82,7 +82,7 @@ index d789ee040ac5..19e5a5daa343 100644
if (security_status == PluginMetadata::SECURITY_STATUS_FULLY_TRUSTED) {
*status = chrome::mojom::PluginStatus::kAllowed;
return;
@@ -337,17 +360,41 @@ bool PluginInfoHostImpl::Context::FindEnabledPlugin(
@@ -346,17 +369,41 @@ bool PluginInfoHostImpl::Context::FindEnabledPlugin(
return false;
}
@@ -197,7 +197,7 @@ index c1870b0f56ef..d32b8d54fb3f 100644
GURL webstore_url(extension_urls::GetWebstoreLaunchURL());
if (response_url.SchemeIsHTTPOrHTTPS() &&
diff --git chrome/renderer/chrome_content_renderer_client.cc chrome/renderer/chrome_content_renderer_client.cc
index c9852764a59c..ffe26ef879b9 100644
index ce09634902a5..de9cc70a61e2 100644
--- chrome/renderer/chrome_content_renderer_client.cc
+++ chrome/renderer/chrome_content_renderer_client.cc
@@ -825,6 +825,7 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
@@ -208,7 +208,7 @@ index c9852764a59c..ffe26ef879b9 100644
content_settings_agent_delegate->IsPluginTemporarilyAllowed(
identifier)) {
status = chrome::mojom::PluginStatus::kAllowed;
@@ -1028,7 +1029,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
@@ -1041,7 +1042,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
render_frame->GetRemoteAssociatedInterfaces()->GetInterface(
plugin_auth_host.BindNewEndpointAndPassReceiver());
plugin_auth_host->BlockedUnauthorizedPlugin(group_name, identifier);
@@ -218,7 +218,7 @@ index c9852764a59c..ffe26ef879b9 100644
break;
}
case chrome::mojom::PluginStatus::kBlocked: {
@@ -1037,7 +1039,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
@@ -1050,7 +1052,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
l10n_util::GetStringFUTF16(IDS_PLUGIN_BLOCKED, group_name));
placeholder->AllowLoading();
RenderThread::Get()->RecordAction(UserMetricsAction("Plugin_Blocked"));
@@ -228,7 +228,7 @@ index c9852764a59c..ffe26ef879b9 100644
break;
}
case chrome::mojom::PluginStatus::kBlockedByPolicy: {
@@ -1047,7 +1050,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
@@ -1060,7 +1063,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
group_name));
RenderThread::Get()->RecordAction(
UserMetricsAction("Plugin_BlockedByPolicy"));
@@ -238,7 +238,7 @@ index c9852764a59c..ffe26ef879b9 100644
break;
}
case chrome::mojom::PluginStatus::kBlockedNoLoading: {
@@ -1055,7 +1059,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
@@ -1068,7 +1072,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
IDR_BLOCKED_PLUGIN_HTML,
l10n_util::GetStringFUTF16(IDS_PLUGIN_BLOCKED_NO_LOADING,
group_name));

View File

@@ -78,7 +78,7 @@ index 8b7b6f492b3e..1085e4b1e23d 100644
#endif // defined(OS_LINUX) || defined(OS_CHROMEOS)
diff --git chrome/browser/chrome_browser_main.cc chrome/browser/chrome_browser_main.cc
index c9bf19474a2a..3c1d5eec82fa 100644
index 19746df8b0a5..2a78bdb895d7 100644
--- chrome/browser/chrome_browser_main.cc
+++ chrome/browser/chrome_browser_main.cc
@@ -49,6 +49,7 @@
@@ -101,7 +101,7 @@ index c9bf19474a2a..3c1d5eec82fa 100644
// These members must be initialized before returning from this function.
// Android doesn't use StartupBrowserCreator.
@@ -1613,11 +1616,13 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
@@ -1615,11 +1618,13 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
// This step is costly and is already measured in
// Startup.StartupBrowserCreator_Start.
// See the comment above for an explanation of |process_command_line|.

View File

@@ -253,7 +253,7 @@ index da3aceed75b1..e88601502e28 100644
#include <utility>
diff --git content/public/browser/content_browser_client.h content/public/browser/content_browser_client.h
index 27b7e117b531..80c92eed565d 100644
index 811bc7be6b17..57128cf9c9a5 100644
--- content/public/browser/content_browser_client.h
+++ content/public/browser/content_browser_client.h
@@ -31,6 +31,7 @@
@@ -264,7 +264,7 @@ index 27b7e117b531..80c92eed565d 100644
#include "content/public/common/page_visibility_state.h"
#include "content/public/common/window_container_type.mojom-forward.h"
#include "device/vr/buildflags/buildflags.h"
@@ -1685,6 +1686,14 @@ class CONTENT_EXPORT ContentBrowserClient {
@@ -1693,6 +1694,14 @@ class CONTENT_EXPORT ContentBrowserClient {
const base::Optional<url::Origin>& initiating_origin,
mojo::PendingRemote<network::mojom::URLLoaderFactory>* out_factory);
@@ -279,7 +279,7 @@ index 27b7e117b531..80c92eed565d 100644
// Creates an OverlayWindow to be used for Picture-in-Picture. This window
// will house the content shown when in Picture-in-Picture mode. This will
// return a new OverlayWindow.
@@ -1756,6 +1765,10 @@ class CONTENT_EXPORT ContentBrowserClient {
@@ -1764,6 +1773,10 @@ class CONTENT_EXPORT ContentBrowserClient {
// Used as part of the user agent string.
virtual std::string GetProduct();
@@ -340,10 +340,10 @@ index 12e091c7c13d..513db858b8fa 100644
// started.
virtual void SetRuntimeFeaturesDefaultsBeforeBlinkInitialization() {}
diff --git content/renderer/render_frame_impl.cc content/renderer/render_frame_impl.cc
index 3b2626c3ef9d..c0acde278d5a 100644
index 72a3bd4837f3..4d6d026675be 100644
--- content/renderer/render_frame_impl.cc
+++ content/renderer/render_frame_impl.cc
@@ -3896,7 +3896,8 @@ blink::WebPlugin* RenderFrameImpl::CreatePlugin(
@@ -3900,7 +3900,8 @@ blink::WebPlugin* RenderFrameImpl::CreatePlugin(
std::string mime_type;
bool found = false;
Send(new FrameHostMsg_GetPluginInfo(
@@ -354,10 +354,10 @@ index 3b2626c3ef9d..c0acde278d5a 100644
if (!found)
return nullptr;
diff --git content/renderer/render_thread_impl.cc content/renderer/render_thread_impl.cc
index 91daa69bf55a..40f79ddf47b9 100644
index 6fae8670bf01..70ddb11f0f93 100644
--- content/renderer/render_thread_impl.cc
+++ content/renderer/render_thread_impl.cc
@@ -636,6 +636,8 @@ void RenderThreadImpl::Init() {
@@ -632,6 +632,8 @@ void RenderThreadImpl::Init() {
GetContentClient()->renderer()->CreateURLLoaderThrottleProvider(
URLLoaderThrottleProviderType::kFrame);

View File

@@ -363,7 +363,7 @@ index e1c66df6cecf..681dd496292e 100644
->set_system_crash_reporter_forwarding(crashpad::TriState::kDisabled);
}
diff --git components/crash/core/app/crashpad_mac.mm components/crash/core/app/crashpad_mac.mm
index aa7c3302f2e3..c471132afe3f 100644
index eb675321436a..4e74af742ed5 100644
--- components/crash/core/app/crashpad_mac.mm
+++ components/crash/core/app/crashpad_mac.mm
@@ -16,12 +16,15 @@
@@ -412,8 +412,8 @@ index aa7c3302f2e3..c471132afe3f 100644
#if BUILDFLAG(GOOGLE_CHROME_BRANDING)
// Empty means stable.
@@ -62,12 +75,16 @@ std::map<std::string, std::string> GetProcessSimpleAnnotations() {
process_annotations["channel"] = "";
@@ -68,12 +81,16 @@ std::map<std::string, std::string> GetProcessSimpleAnnotations() {
process_annotations["channel"] = base::SysNSStringToUTF8(channel);
}
- NSString* version =
@@ -434,7 +434,7 @@ index aa7c3302f2e3..c471132afe3f 100644
} // @autoreleasepool
return process_annotations;
}();
@@ -127,10 +144,10 @@ base::FilePath PlatformCrashpadInitialization(
@@ -133,10 +150,10 @@ base::FilePath PlatformCrashpadInitialization(
if (initial_client) {
@autoreleasepool {
@@ -449,7 +449,7 @@ index aa7c3302f2e3..c471132afe3f 100644
// Is there a way to recover if this fails?
CrashReporterClient* crash_reporter_client = GetCrashReporterClient();
@@ -159,6 +176,12 @@ base::FilePath PlatformCrashpadInitialization(
@@ -165,6 +182,12 @@ base::FilePath PlatformCrashpadInitialization(
"--reset-own-crash-exception-port-to-system-default");
}

View File

@@ -159,10 +159,10 @@ index 1832f5e9acd6..059cb2a43578 100644
// once each time the extensions system is loaded per browser_context. The
// implementation may wish to use the BrowserContext to record the current
diff --git extensions/browser/process_manager.cc extensions/browser/process_manager.cc
index 5c593b03d84e..c9588c09f23f 100644
index f41d44299518..41e892cdf240 100644
--- extensions/browser/process_manager.cc
+++ extensions/browser/process_manager.cc
@@ -385,9 +385,16 @@ bool ProcessManager::CreateBackgroundHost(const Extension* extension,
@@ -411,9 +411,16 @@ bool ProcessManager::CreateBackgroundHost(const Extension* extension,
return true; // TODO(kalman): return false here? It might break things...
DVLOG(1) << "CreateBackgroundHost " << extension->id();

View File

@@ -95,7 +95,7 @@ index 9323a774a565..913b5cdc6be4 100644
public_deps += [ ":${target_name}_200_percent" ]
}
diff --git chrome/installer/mini_installer/BUILD.gn chrome/installer/mini_installer/BUILD.gn
index 7c7af8c0d948..c7869c760b12 100644
index df39ea145cc6..93401d47e437 100644
--- chrome/installer/mini_installer/BUILD.gn
+++ chrome/installer/mini_installer/BUILD.gn
@@ -5,6 +5,7 @@

View File

@@ -0,0 +1,13 @@
diff --git build/config/linux/atk/BUILD.gn build/config/linux/atk/BUILD.gn
index aad2efa60d6c..fe9f30b82c22 100644
--- build/config/linux/atk/BUILD.gn
+++ build/config/linux/atk/BUILD.gn
@@ -10,7 +10,7 @@ import("//build/config/ui.gni")
assert(!is_chromeos)
# These packages should _only_ be expected when building for a target.
-assert(current_toolchain == default_toolchain)
+# assert(current_toolchain == default_toolchain)
if (use_atk) {
assert(use_glib, "use_atk=true requires that use_glib=true")

View File

@@ -1,5 +1,5 @@
diff --git base/files/file_path_watcher_linux.cc base/files/file_path_watcher_linux.cc
index 4e231b615e8f..a5100c0bf1c8 100644
index 4e231b615e8f..ffb027ebb0a3 100644
--- base/files/file_path_watcher_linux.cc
+++ base/files/file_path_watcher_linux.cc
@@ -5,6 +5,7 @@
@@ -18,7 +18,7 @@ index 4e231b615e8f..a5100c0bf1c8 100644
#include <fstream>
#include <map>
#include <memory>
@@ -263,8 +265,10 @@ void InotifyReaderThreadDelegate::ThreadMain() {
@@ -263,19 +265,16 @@ void InotifyReaderThreadDelegate::ThreadMain() {
PlatformThread::SetName("inotify_reader");
// Make sure the file descriptors are good for use with select().
@@ -30,10 +30,10 @@ index 4e231b615e8f..a5100c0bf1c8 100644
+ } };
while (true) {
fd_set rfds;
@@ -272,10 +276,9 @@ void InotifyReaderThreadDelegate::ThreadMain() {
FD_SET(inotify_fd_, &rfds);
- fd_set rfds;
- FD_ZERO(&rfds);
- FD_SET(inotify_fd_, &rfds);
-
// Wait until some inotify events are available.
- int select_result =
- HANDLE_EINTR(select(inotify_fd_ + 1, &rfds, nullptr, nullptr, nullptr));

View File

@@ -41,10 +41,10 @@ index cc4b13a7b9c6..84f3b9ed7cf4 100644
} // namespace content
diff --git content/browser/renderer_host/render_widget_host_impl.cc content/browser/renderer_host/render_widget_host_impl.cc
index 529a5b71b998..dcc5eeda89d3 100644
index 1ff402be7362..8d0f0b34e0c9 100644
--- content/browser/renderer_host/render_widget_host_impl.cc
+++ content/browser/renderer_host/render_widget_host_impl.cc
@@ -2831,6 +2831,11 @@ void RenderWidgetHostImpl::OnInvalidInputEventSource() {
@@ -2842,6 +2842,11 @@ void RenderWidgetHostImpl::OnInvalidInputEventSource() {
GetProcess(), bad_message::INPUT_ROUTER_INVALID_EVENT_SOURCE);
}
@@ -57,7 +57,7 @@ index 529a5b71b998..dcc5eeda89d3 100644
const WebInputEvent& event) {
if ((base::FeatureList::IsEnabled(
diff --git content/browser/renderer_host/render_widget_host_impl.h content/browser/renderer_host/render_widget_host_impl.h
index 9d7d10136a68..eb989750dd5f 100644
index 9f02961f7ef6..9fcd0acfb569 100644
--- content/browser/renderer_host/render_widget_host_impl.h
+++ content/browser/renderer_host/render_widget_host_impl.h
@@ -730,6 +730,7 @@ class CONTENT_EXPORT RenderWidgetHostImpl

View File

@@ -1,5 +1,5 @@
diff --git chrome/browser/download/download_prefs.cc chrome/browser/download/download_prefs.cc
index 1837e4c98e56..e6348c0e6dce 100644
index af2a64d11c36..1c3d56174706 100644
--- chrome/browser/download/download_prefs.cc
+++ chrome/browser/download/download_prefs.cc
@@ -23,6 +23,7 @@

View File

@@ -1,5 +1,5 @@
diff --git chrome/browser/net/profile_network_context_service.cc chrome/browser/net/profile_network_context_service.cc
index 082cff368d80..7d7c2fe02646 100644
index 60bb552448bd..4939ee6932c7 100644
--- chrome/browser/net/profile_network_context_service.cc
+++ chrome/browser/net/profile_network_context_service.cc
@@ -19,6 +19,7 @@
@@ -10,7 +10,7 @@ index 082cff368d80..7d7c2fe02646 100644
#include "chrome/browser/browser_process.h"
#include "chrome/browser/content_settings/cookie_settings_factory.h"
#include "chrome/browser/content_settings/host_content_settings_map_factory.h"
@@ -666,7 +667,19 @@ void ProfileNetworkContextService::ConfigureNetworkContextParamsInternal(
@@ -667,7 +668,19 @@ void ProfileNetworkContextService::ConfigureNetworkContextParamsInternal(
// Configure on-disk storage for non-OTR profiles. OTR profiles just use
// default behavior (in memory storage, default sizes).
@@ -31,7 +31,7 @@ index 082cff368d80..7d7c2fe02646 100644
PrefService* local_state = g_browser_process->local_state();
// Configure the HTTP cache path and size.
base::FilePath base_cache_path;
@@ -679,7 +692,9 @@ void ProfileNetworkContextService::ConfigureNetworkContextParamsInternal(
@@ -680,7 +693,9 @@ void ProfileNetworkContextService::ConfigureNetworkContextParamsInternal(
base_cache_path.Append(chrome::kCacheDirname);
network_context_params->http_cache_max_size =
local_state->GetInteger(prefs::kDiskCacheSize);
@@ -123,7 +123,7 @@ index 1d988375b00a..e71cbc3b612f 100644
void CookieManager::SetForceKeepSessionState() {
diff --git services/network/network_context.cc services/network/network_context.cc
index 4de2f631d4d6..e9c066b50a07 100644
index 1e9e1d93cb78..e91092ce4cc5 100644
--- services/network/network_context.cc
+++ services/network/network_context.cc
@@ -1906,6 +1906,7 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(

View File

@@ -43,7 +43,7 @@ index c746b37d6278..b6cebc24b73e 100644
virtual void MenuWillShow() {}
diff --git ui/gfx/render_text.cc ui/gfx/render_text.cc
index 3dc9e4daf46d..f5b2eb00f36f 100644
index af1d3fa49ca0..a8f1cbac8690 100644
--- ui/gfx/render_text.cc
+++ ui/gfx/render_text.cc
@@ -615,6 +615,14 @@ void RenderText::SetWhitespaceElision(base::Optional<bool> whitespace_elision) {
@@ -61,7 +61,7 @@ index 3dc9e4daf46d..f5b2eb00f36f 100644
void RenderText::SetDisplayRect(const Rect& r) {
if (r != display_rect_) {
display_rect_ = r;
@@ -1966,6 +1974,19 @@ void RenderText::OnTextAttributeChanged() {
@@ -1990,6 +1998,19 @@ void RenderText::OnTextAttributeChanged() {
layout_text_up_to_date_ = false;
@@ -82,7 +82,7 @@ index 3dc9e4daf46d..f5b2eb00f36f 100644
}
diff --git ui/gfx/render_text.h ui/gfx/render_text.h
index 4b39abb9d16c..c3b5debf995b 100644
index be9c3457df7f..ce14b5613454 100644
--- ui/gfx/render_text.h
+++ ui/gfx/render_text.h
@@ -346,6 +346,10 @@ class GFX_EXPORT RenderText {
@@ -96,7 +96,7 @@ index 4b39abb9d16c..c3b5debf995b 100644
const Rect& display_rect() const { return display_rect_; }
void SetDisplayRect(const Rect& r);
@@ -1049,6 +1053,8 @@ class GFX_EXPORT RenderText {
@@ -1053,6 +1057,8 @@ class GFX_EXPORT RenderText {
// Tell whether or not the |layout_text_| needs an update or is up to date.
mutable bool layout_text_up_to_date_ = false;
@@ -119,7 +119,7 @@ index 7a6dda99623b..7476e8966285 100644
// Size used for the default SquareInkDropRipple.
static constexpr gfx::Size kDefaultInkDropSize = gfx::Size(24, 24);
diff --git ui/views/controls/button/label_button.cc ui/views/controls/button/label_button.cc
index b8dada677222..87d790657722 100644
index f330d677e93f..595dfcc619d4 100644
--- ui/views/controls/button/label_button.cc
+++ ui/views/controls/button/label_button.cc
@@ -513,6 +513,12 @@ void LabelButton::OnThemeChanged() {
@@ -136,7 +136,7 @@ index b8dada677222..87d790657722 100644
Button::StateChanged(old_state);
ResetLabelEnabledColor();
diff --git ui/views/controls/button/label_button.h ui/views/controls/button/label_button.h
index 4990f7e6ee48..c111e11f5100 100644
index 9be9035f7b5d..c4d7b86d78f9 100644
--- ui/views/controls/button/label_button.h
+++ ui/views/controls/button/label_button.h
@@ -134,6 +134,9 @@ class VIEWS_EXPORT LabelButton : public Button, public NativeThemeDelegate {

View File

@@ -73,7 +73,7 @@ index 5b2aa87a53fa..302626b947c6 100644
FRIEND_TEST_ALL_PREFIXES(
BrowserSideFlingBrowserTest,
diff --git content/browser/renderer_host/render_widget_host_view_event_handler.cc content/browser/renderer_host/render_widget_host_view_event_handler.cc
index b49d2f96efec..080a49940263 100644
index b49d2f96efec..d6308880de1b 100644
--- content/browser/renderer_host/render_widget_host_view_event_handler.cc
+++ content/browser/renderer_host/render_widget_host_view_event_handler.cc
@@ -37,6 +37,10 @@
@@ -102,6 +102,24 @@ index b49d2f96efec..080a49940263 100644
#endif
synthetic_move_position_ = center_in_screen;
}
@@ -985,6 +997,17 @@ bool RenderWidgetHostViewEventHandler::MatchesSynthesizedMovePosition(
}
void RenderWidgetHostViewEventHandler::SetKeyboardFocus() {
+#if defined(OS_WIN)
+ if (host_view_->HasExternalParent() &&
+ window_ && window_->delegate()->CanFocus()) {
+ aura::WindowTreeHost* host = window_->GetHost();
+ if (host) {
+ gfx::AcceleratedWidget hwnd = host->GetAcceleratedWidget();
+ if (!(::GetWindowLong(hwnd, GWL_EXSTYLE) & WS_EX_NOACTIVATE))
+ ::SetFocus(hwnd);
+ }
+ }
+#endif
// TODO(wjmaclean): can host_ ever be null?
if (host_ && set_focus_on_mouse_down_or_key_event_) {
set_focus_on_mouse_down_or_key_event_ = false;
diff --git content/public/browser/render_widget_host_view.h content/public/browser/render_widget_host_view.h
index beba7a3a40b8..941acdfbff8b 100644
--- content/public/browser/render_widget_host_view.h
@@ -156,7 +174,7 @@ index af282d4190dd..147a2cd9ac4c 100644
XWindow();
diff --git ui/platform_window/x11/x11_window.cc ui/platform_window/x11/x11_window.cc
index 7941edf6d3cb..520af3c90e97 100644
index 881bece18a41..c041ac648478 100644
--- ui/platform_window/x11/x11_window.cc
+++ ui/platform_window/x11/x11_window.cc
@@ -93,6 +93,7 @@ ui::XWindow::Configuration ConvertInitPropertiesToXWindowConfig(
@@ -296,11 +314,11 @@ index 0229c1c41502..992f89126f7f 100644
// a reference.
corewm::TooltipWin* tooltip_;
diff --git ui/views/widget/widget.cc ui/views/widget/widget.cc
index 710d52bcc34f..25608ba3d188 100644
index d784b8eae003..eeb87fbe5f0c 100644
--- ui/views/widget/widget.cc
+++ ui/views/widget/widget.cc
@@ -283,7 +283,8 @@ void Widget::Init(InitParams params) {
params.name = params.delegate->GetContentsView()->GetClassName();
@@ -291,7 +291,8 @@ void Widget::Init(InitParams params) {
parent_ = params.parent ? GetWidgetForNativeView(params.parent) : nullptr;
params.child |= (params.type == InitParams::TYPE_CONTROL);
- is_top_level_ = !params.child;
@@ -309,7 +327,7 @@ index 710d52bcc34f..25608ba3d188 100644
if (params.opacity == views::Widget::InitParams::WindowOpacity::kInferred &&
params.type != views::Widget::InitParams::TYPE_WINDOW) {
@@ -365,7 +366,12 @@ void Widget::Init(InitParams params) {
@@ -373,7 +374,12 @@ void Widget::Init(InitParams params) {
}
} else if (delegate) {
SetContentsView(delegate->TransferOwnershipOfContentsView());
@@ -323,7 +341,7 @@ index 710d52bcc34f..25608ba3d188 100644
}
observer_manager_.Add(GetNativeTheme());
@@ -1149,10 +1155,16 @@ void Widget::OnNativeWidgetDestroyed() {
@@ -1157,10 +1163,16 @@ void Widget::OnNativeWidgetDestroyed() {
}
gfx::Size Widget::GetMinimumSize() const {
@@ -341,7 +359,7 @@ index 710d52bcc34f..25608ba3d188 100644
}
diff --git ui/views/widget/widget.h ui/views/widget/widget.h
index bb19a2cceb28..d62b6dbbecc9 100644
index e1e380513db3..884be29aa487 100644
--- ui/views/widget/widget.h
+++ ui/views/widget/widget.h
@@ -317,6 +317,8 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate,

View File

@@ -1,8 +1,8 @@
diff --git content/browser/web_contents/web_contents_impl.cc content/browser/web_contents/web_contents_impl.cc
index c3a2e5c241e3..4f746c94f316 100644
index 26bd3968521c..6688bc574f8f 100644
--- content/browser/web_contents/web_contents_impl.cc
+++ content/browser/web_contents/web_contents_impl.cc
@@ -2763,7 +2763,13 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
@@ -2770,7 +2770,13 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
// main frame - let's do the same thing here.
std::string unique_name;
frame_tree_.root()->SetFrameName(params.main_frame_name, unique_name);
@@ -16,7 +16,7 @@ index c3a2e5c241e3..4f746c94f316 100644
WebContentsViewDelegate* delegate =
GetContentClient()->browser()->GetWebContentsViewDelegate(this);
@@ -2774,6 +2780,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
@@ -2781,6 +2787,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
view_.reset(CreateWebContentsView(this, delegate,
&render_view_host_delegate_view_));
}
@@ -24,7 +24,7 @@ index c3a2e5c241e3..4f746c94f316 100644
CHECK(render_view_host_delegate_view_);
CHECK(view_.get());
@@ -3645,6 +3652,15 @@ RenderFrameHostDelegate* WebContentsImpl::CreateNewWindow(
@@ -3660,6 +3667,15 @@ RenderFrameHostDelegate* WebContentsImpl::CreateNewWindow(
// objects.
create_params.renderer_initiated_creation = !is_new_browsing_instance;
@@ -40,7 +40,7 @@ index c3a2e5c241e3..4f746c94f316 100644
std::unique_ptr<WebContentsImpl> new_contents;
if (!is_guest) {
create_params.context = view_->GetNativeView();
@@ -7586,6 +7602,10 @@ void WebContentsImpl::SetFocusedFrame(FrameTreeNode* node,
@@ -7601,6 +7617,10 @@ void WebContentsImpl::SetFocusedFrame(FrameTreeNode* node,
// This is an outermost WebContents.
SetAsFocusedWebContentsIfNecessary();
}

View File

@@ -44,10 +44,10 @@ index d49dc7cb85d5..dc4af48a458d 100644
DocumentInit& DocumentInit::WithTypeFrom(const String& mime_type) {
diff --git third_party/blink/renderer/core/frame/local_frame.cc third_party/blink/renderer/core/frame/local_frame.cc
index c00d6f81db12..17c54cd0ca08 100644
index f532469a54a4..864ef01ab4c1 100644
--- third_party/blink/renderer/core/frame/local_frame.cc
+++ third_party/blink/renderer/core/frame/local_frame.cc
@@ -1698,7 +1698,7 @@ WebContentSettingsClient* LocalFrame::GetContentSettingsClient() {
@@ -1703,7 +1703,7 @@ WebContentSettingsClient* LocalFrame::GetContentSettingsClient() {
PluginData* LocalFrame::GetPluginData() const {
if (!Loader().AllowPlugins(kNotAboutToInstantiatePlugin))
return nullptr;
@@ -85,7 +85,7 @@ index 0608c4defc6d..54eaa2197957 100644
void DevToolsSession::DispatchProtocolCommand(
diff --git third_party/blink/renderer/core/page/page.cc third_party/blink/renderer/core/page/page.cc
index c87fcbaaa194..2baae5c3bc64 100644
index 8ad0fb93a8eb..c0dc1f3bc63a 100644
--- third_party/blink/renderer/core/page/page.cc
+++ third_party/blink/renderer/core/page/page.cc
@@ -211,7 +211,8 @@ Page::Page(PageClients& page_clients)
@@ -149,7 +149,7 @@ index c87fcbaaa194..2baae5c3bc64 100644
page->NotifyPluginsChanged();
}
}
@@ -911,7 +932,8 @@ void Page::Trace(Visitor* visitor) const {
@@ -916,7 +937,8 @@ void Page::Trace(Visitor* visitor) const {
visitor->Trace(link_highlight_);
visitor->Trace(spatial_navigation_controller_);
visitor->Trace(main_frame_);
@@ -160,7 +160,7 @@ index c87fcbaaa194..2baae5c3bc64 100644
visitor->Trace(agent_metrics_collector_);
visitor->Trace(plugins_changed_observers_);
diff --git third_party/blink/renderer/core/page/page.h third_party/blink/renderer/core/page/page.h
index 4e4e496eb088..ed2ded8a397b 100644
index c184b1fd46db..fb33e5a74c83 100644
--- third_party/blink/renderer/core/page/page.h
+++ third_party/blink/renderer/core/page/page.h
@@ -149,7 +149,8 @@ class CORE_EXPORT Page final : public GarbageCollected<Page>,
@@ -173,7 +173,7 @@ index 4e4e496eb088..ed2ded8a397b 100644
// Resets the plugin data for all pages in the renderer process and notifies
// PluginsChangedObservers.
@@ -426,7 +427,8 @@ class CORE_EXPORT Page final : public GarbageCollected<Page>,
@@ -430,7 +431,8 @@ class CORE_EXPORT Page final : public GarbageCollected<Page>,
const Member<LinkHighlight> link_highlight_;
Member<SpatialNavigationController> spatial_navigation_controller_;

View File

@@ -1,15 +0,0 @@
diff --git third_party/blink/renderer/platform/widget/widget_base.cc third_party/blink/renderer/platform/widget/widget_base.cc
index 048460f4dd81..59a70580ded0 100644
--- third_party/blink/renderer/platform/widget/widget_base.cc
+++ third_party/blink/renderer/platform/widget/widget_base.cc
@@ -1281,8 +1281,8 @@ gfx::Point WidgetBase::BlinkSpaceToFlooredDIPs(const gfx::Point& point) {
return point;
// TODO(danakj): Should this be GetScreenInfo() so it changes under emulation?
// TODO(dtapuska): Determine if this should be a floor vs rounded.
- return gfx::ScaleToFlooredPoint(
- point, client_->GetOriginalScreenInfo().device_scale_factor);
+ float reverse = 1 / client_->GetOriginalScreenInfo().device_scale_factor;
+ return gfx::ScaleToFlooredPoint(point, reverse);
}
gfx::Size WidgetBase::DIPsToCeiledBlinkSpace(const gfx::Size& size) {

View File

@@ -1,5 +1,5 @@
diff --git chrome/app/generated_resources.grd chrome/app/generated_resources.grd
index 54ad1ca860fa..f0981120284b 100644
index eca8e4047814..63aad0c35d01 100644
--- chrome/app/generated_resources.grd
+++ chrome/app/generated_resources.grd
@@ -5081,7 +5081,7 @@ Keep your key file in a safe place. You will need it to create new versions of y

View File

@@ -1285,7 +1285,7 @@ void BrowserWindowOsrGtk::OnPaint(CefRefPtr<CefBrowser> browser,
void BrowserWindowOsrGtk::OnCursorChange(
CefRefPtr<CefBrowser> browser,
CefCursorHandle cursor,
CefRenderHandler::CursorType type,
cef_cursor_type_t type,
const CefCursorInfo& custom_cursor_info) {
CEF_REQUIRE_UI_THREAD();

View File

@@ -76,7 +76,7 @@ class BrowserWindowOsrGtk : public BrowserWindow,
int height) OVERRIDE;
void OnCursorChange(CefRefPtr<CefBrowser> browser,
CefCursorHandle cursor,
CefRenderHandler::CursorType type,
cef_cursor_type_t type,
const CefCursorInfo& custom_cursor_info) OVERRIDE;
bool StartDragging(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefDragData> drag_data,

View File

@@ -73,7 +73,7 @@ class BrowserWindowOsrMac : public BrowserWindow,
int height) OVERRIDE;
void OnCursorChange(CefRefPtr<CefBrowser> browser,
CefCursorHandle cursor,
CefRenderHandler::CursorType type,
cef_cursor_type_t type,
const CefCursorInfo& custom_cursor_info) OVERRIDE;
bool StartDragging(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefDragData> drag_data,

View File

@@ -1323,7 +1323,7 @@ class BrowserWindowOsrMacImpl {
int height);
void OnCursorChange(CefRefPtr<CefBrowser> browser,
CefCursorHandle cursor,
CefRenderHandler::CursorType type,
cef_cursor_type_t type,
const CefCursorInfo& custom_cursor_info);
bool StartDragging(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefDragData> drag_data,
@@ -1655,7 +1655,7 @@ void BrowserWindowOsrMacImpl::OnPaint(
void BrowserWindowOsrMacImpl::OnCursorChange(
CefRefPtr<CefBrowser> browser,
CefCursorHandle cursor,
CefRenderHandler::CursorType type,
cef_cursor_type_t type,
const CefCursorInfo& custom_cursor_info) {
CEF_REQUIRE_UI_THREAD();
REQUIRE_MAIN_THREAD();
@@ -1877,7 +1877,7 @@ void BrowserWindowOsrMac::OnPaint(CefRefPtr<CefBrowser> browser,
void BrowserWindowOsrMac::OnCursorChange(
CefRefPtr<CefBrowser> browser,
CefCursorHandle cursor,
CefRenderHandler::CursorType type,
cef_cursor_type_t type,
const CefCursorInfo& custom_cursor_info) {
impl_->OnCursorChange(browser, cursor, type, custom_cursor_info);
}

View File

@@ -333,7 +333,7 @@ void ClientHandler::OnBeforeContextMenu(CefRefPtr<CefBrowser> browser,
model->AddSeparator();
model->AddItem(CLIENT_ID_CURSOR_CHANGE_DISABLED, "Cursor change disabled");
if (browser->GetHost()->IsMouseCursorChangeDisabled())
if (mouse_cursor_change_disabled_)
model->SetChecked(CLIENT_ID_CURSOR_CHANGE_DISABLED, true);
model->AddSeparator();
@@ -370,8 +370,7 @@ bool ClientHandler::OnContextMenuCommand(CefRefPtr<CefBrowser> browser,
ShowSSLInformation(browser);
return true;
case CLIENT_ID_CURSOR_CHANGE_DISABLED:
browser->GetHost()->SetMouseCursorChangeDisabled(
!browser->GetHost()->IsMouseCursorChangeDisabled());
mouse_cursor_change_disabled_ = !mouse_cursor_change_disabled_;
return true;
case CLIENT_ID_OFFLINE:
offline_ = !offline_;
@@ -469,6 +468,16 @@ bool ClientHandler::OnAutoResize(CefRefPtr<CefBrowser> browser,
return true;
}
bool ClientHandler::OnCursorChange(CefRefPtr<CefBrowser> browser,
CefCursorHandle cursor,
cef_cursor_type_t type,
const CefCursorInfo& custom_cursor_info) {
CEF_REQUIRE_UI_THREAD();
// Return true to disable default handling of cursor changes.
return mouse_cursor_change_disabled_;
}
void ClientHandler::OnBeforeDownload(
CefRefPtr<CefBrowser> browser,
CefRefPtr<CefDownloadItem> download_item,
@@ -595,10 +604,6 @@ void ClientHandler::OnAfterCreated(CefRefPtr<CefBrowser> browser) {
message_router_->AddHandler(*(it), false);
}
// Disable mouse cursor change if requested via the command-line flag.
if (mouse_cursor_change_disabled_)
browser->GetHost()->SetMouseCursorChangeDisabled(true);
// Set offline mode if requested via the command-line flag.
if (offline_)
SetOfflineState(browser, true);

View File

@@ -152,6 +152,10 @@ class ClientHandler : public CefClient,
int line) OVERRIDE;
bool OnAutoResize(CefRefPtr<CefBrowser> browser,
const CefSize& new_size) OVERRIDE;
bool OnCursorChange(CefRefPtr<CefBrowser> browser,
CefCursorHandle cursor,
cef_cursor_type_t type,
const CefCursorInfo& custom_cursor_info) OVERRIDE;
// CefDownloadHandler methods
void OnBeforeDownload(CefRefPtr<CefBrowser> browser,

View File

@@ -118,16 +118,6 @@ void ClientHandlerOsr::OnAcceleratedPaint(
osr_delegate_->OnAcceleratedPaint(browser, type, dirtyRects, share_handle);
}
void ClientHandlerOsr::OnCursorChange(CefRefPtr<CefBrowser> browser,
CefCursorHandle cursor,
CursorType type,
const CefCursorInfo& custom_cursor_info) {
CEF_REQUIRE_UI_THREAD();
if (!osr_delegate_)
return;
osr_delegate_->OnCursorChange(browser, cursor, type, custom_cursor_info);
}
bool ClientHandlerOsr::StartDragging(
CefRefPtr<CefBrowser> browser,
CefRefPtr<CefDragData> drag_data,
@@ -167,6 +157,21 @@ void ClientHandlerOsr::OnAccessibilityTreeChange(CefRefPtr<CefValue> value) {
osr_delegate_->UpdateAccessibilityTree(value);
}
bool ClientHandlerOsr::OnCursorChange(CefRefPtr<CefBrowser> browser,
CefCursorHandle cursor,
cef_cursor_type_t type,
const CefCursorInfo& custom_cursor_info) {
CEF_REQUIRE_UI_THREAD();
if (ClientHandler::OnCursorChange(browser, cursor, type,
custom_cursor_info)) {
return true;
}
if (osr_delegate_) {
osr_delegate_->OnCursorChange(browser, cursor, type, custom_cursor_info);
}
return true;
}
void ClientHandlerOsr::OnAccessibilityLocationChange(
CefRefPtr<CefValue> value) {
CEF_REQUIRE_UI_THREAD();

View File

@@ -49,10 +49,6 @@ class ClientHandlerOsr : public ClientHandler,
CefRenderHandler::PaintElementType type,
const CefRenderHandler::RectList& dirtyRects,
void* share_handle) {}
virtual void OnCursorChange(CefRefPtr<CefBrowser> browser,
CefCursorHandle cursor,
CefRenderHandler::CursorType type,
const CefCursorInfo& custom_cursor_info) = 0;
virtual bool StartDragging(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefDragData> drag_data,
CefRenderHandler::DragOperationsMask allowed_ops,
@@ -66,8 +62,13 @@ class ClientHandlerOsr : public ClientHandler,
const CefRange& selection_range,
const CefRenderHandler::RectList& character_bounds) = 0;
virtual void UpdateAccessibilityTree(CefRefPtr<CefValue> value) = 0;
// These methods match the CefDisplayHandler interface.
virtual void OnCursorChange(CefRefPtr<CefBrowser> browser,
CefCursorHandle cursor,
cef_cursor_type_t type,
const CefCursorInfo& custom_cursor_info) = 0;
virtual void UpdateAccessibilityTree(CefRefPtr<CefValue> value) = 0;
virtual void UpdateAccessibilityLocation(CefRefPtr<CefValue> value) = 0;
protected:
@@ -114,10 +115,6 @@ class ClientHandlerOsr : public ClientHandler,
CefRenderHandler::PaintElementType type,
const CefRenderHandler::RectList& dirtyRects,
void* share_handle) OVERRIDE;
void OnCursorChange(CefRefPtr<CefBrowser> browser,
CefCursorHandle cursor,
CursorType type,
const CefCursorInfo& custom_cursor_info) OVERRIDE;
bool StartDragging(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefDragData> drag_data,
CefRenderHandler::DragOperationsMask allowed_ops,
@@ -130,6 +127,12 @@ class ClientHandlerOsr : public ClientHandler,
const CefRange& selection_range,
const CefRenderHandler::RectList& character_bounds) OVERRIDE;
// CefDisplayHandler methods.
bool OnCursorChange(CefRefPtr<CefBrowser> browser,
CefCursorHandle cursor,
cef_cursor_type_t type,
const CefCursorInfo& custom_cursor_info) OVERRIDE;
// CefAccessibilityHandler methods.
void OnAccessibilityTreeChange(CefRefPtr<CefValue> value) OVERRIDE;
void OnAccessibilityLocationChange(CefRefPtr<CefValue> value) OVERRIDE;

View File

@@ -1027,7 +1027,7 @@ void OsrWindowWin::OnAcceleratedPaint(
void OsrWindowWin::OnCursorChange(CefRefPtr<CefBrowser> browser,
CefCursorHandle cursor,
CefRenderHandler::CursorType type,
cef_cursor_type_t type,
const CefCursorInfo& custom_cursor_info) {
CEF_REQUIRE_UI_THREAD();

View File

@@ -133,7 +133,7 @@ class OsrWindowWin
void* share_handle) OVERRIDE;
void OnCursorChange(CefRefPtr<CefBrowser> browser,
CefCursorHandle cursor,
CefRenderHandler::CursorType type,
cef_cursor_type_t type,
const CefCursorInfo& custom_cursor_info) OVERRIDE;
bool StartDragging(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefDragData> drag_data,

View File

@@ -1149,15 +1149,16 @@ class OSRTestHandler : public RoutingTestHandler,
}
}
void OnCursorChange(CefRefPtr<CefBrowser> browser,
bool OnCursorChange(CefRefPtr<CefBrowser> browser,
CefCursorHandle cursor,
CursorType type,
cef_cursor_type_t type,
const CefCursorInfo& custom_cursor_info) override {
if (test_type_ == OSR_TEST_CURSOR && started()) {
EXPECT_EQ(CT_HAND, type);
EXPECT_EQ(nullptr, custom_cursor_info.buffer);
DestroySucceededTestSoon();
}
return true;
}
void OnImeCompositionRangeChanged(

View File

@@ -3187,7 +3187,7 @@ class RequestTestHandler : public TestHandler {
CefPostDelayedTask(
TID_FILE_USER_VISIBLE,
base::Bind(&RequestTestHandler::PostTestCompleteFileTasks, this),
100);
200);
} else {
TestComplete();
}

View File

@@ -921,7 +921,8 @@ parser.add_option(
'--distrib-subdir-suffix',
dest='distribsubdirsuffix',
default='',
help='CEF distrib dir name suffix, child of chromium/src/cef/binary_distrib')
help='CEF distrib dir name suffix, child of chromium/src/cef/binary_distrib'
)
(options, args) = parser.parse_args()
@@ -1032,16 +1033,11 @@ if options.armbuild:
print('The ARM build option is only supported on Linux.')
sys.exit()
if options.arm64build:
if platform != 'linux' and platform != 'windows':
print('The ARM64 build option is only supported on Linux and Windows.')
sys.exit()
deps_file = 'DEPS'
if platform == 'mac' and not options.x64build:
if platform == 'mac' and not (options.x64build or options.arm64build):
print('32-bit MacOS builds are not supported. ' +
'Add --x64-build flag to generate a 64-bit build.')
'Add --x64-build or --arm64-build flag to generate a 64-bit build.')
sys.exit()
# Platforms that build a cef_sandbox library.

View File

@@ -26,7 +26,7 @@ cefclient.app/
cef_extensions.pak <=====^
devtools_resources.pak <=^
icudtl.dat <= unicode support
snapshot_blob.bin, v8_context_snapshot.bin <= V8 initial snapshot
snapshot_blob.bin, v8_context_snapshot.[x86_64|arm64].bin <= V8 initial snapshot
en.lproj/, ... <= locale-specific resources and strings
Info.plist
cefclient Helper.app/

View File

@@ -327,11 +327,11 @@ def ValidateArgs(args):
windows_sdk_path = GetArgValue(args, 'windows_sdk_path')
# Target CPU architecture.
# - Windows supports "x86" and "x64".
# - Mac supports only "x64".
# - Windows supports "x86", "x64" and "arm64".
# - Mac supports "x64" and "arm64".
# - Linux supports only "x64" unless using a sysroot environment.
if platform == 'mac':
assert target_cpu == 'x64', 'target_cpu must be "x64"'
assert target_cpu in ('x64', 'arm64'), 'target_cpu must be "x64" or "arm64"'
elif platform == 'windows':
assert target_cpu in ('x86', 'x64',
'arm64'), 'target_cpu must be "x86", "x64" or "arm64"'
@@ -548,6 +548,8 @@ def GetAllPlatformConfigs(build_args):
supported_cpus.append('arm64')
elif platform == 'mac':
supported_cpus = ['x64']
if os.environ.get('CEF_ENABLE_ARM64', '') == '1':
supported_cpus.append('arm64')
else:
raise Exception('Unsupported platform')

View File

@@ -381,7 +381,8 @@ def combine_libs(platform, build_dir, libs, dest_lib):
# Create an intermediate object file that combines all other object files.
# Symbols not identified above will be made private (local).
intermediate_obj = os.path.splitext(dest_lib)[0] + '.o'
cmdline = 'ld -arch x86_64 -r -o "%s"' % intermediate_obj
arch = 'arm64' if options.arm64build else 'x86_64'
cmdline = 'ld -arch %s -r -o "%s"' % (arch, intermediate_obj)
for symbol in symbols:
cmdline += ' -exported_symbol %s' % symbol
@@ -410,6 +411,10 @@ def combine_libs(platform, build_dir, libs, dest_lib):
# Verify that no C++ symbols are imported by the archive file. If the
# archive imports C++ symbols and the client app links an incompatible C++
# library, the result will be undefined behavior.
# For example, to avoid importing libc++ symbols the cef_sandbox target
# should have a dependency on libc++abi. This dependency can be verified
# with the following command:
# gn path out/[config] //cef:cef_sandbox //buildtools/third_party/libc++abi
print('Verifying imported (undefined) symbols...')
undefined_symbols = get_undefined_symbols(dest_lib)
cpp_symbols = list(
@@ -565,10 +570,6 @@ if options.armbuild and platform != 'linux':
print_error('--arm-build is only supported on Linux.')
sys.exit()
if options.arm64build and not platform in ('linux', 'windows'):
print_error('--arm64-build is only supported on Linux and Windows.')
sys.exit()
if options.sandbox and not platform in ('mac', 'windows'):
print_error('--sandbox is only supported on macOS and Windows.')
sys.exit()
@@ -632,8 +633,11 @@ else:
output_dir_base = 'cef_binary_' + cef_ver
if options.distribsubdir == '':
# For backwards compatibility keep the old default directory name on mac.
platform_name = 'macosx' if platform == 'mac' else platform
if platform == 'mac':
# For backwards compatibility keep the old default directory name on mac.
platform_name = 'macos' + ('x' if platform_arch == '64' else '')
else:
platform_name = platform
output_dir_name = output_dir_base + '_' + platform_name + platform_arch
if options.distribsubdirsuffix != '':