diff --git a/libcef/browser/views/browser_view_view.h b/libcef/browser/views/browser_view_view.h index 955bd709e..bd47b9e0a 100644 --- a/libcef/browser/views/browser_view_view.h +++ b/libcef/browser/views/browser_view_view.h @@ -16,7 +16,13 @@ // CefViewView template. class WebViewEx : public views::WebView { public: - WebViewEx() : views::WebView(nullptr) {} + WebViewEx() : views::WebView(nullptr) { + // Mouse events on draggable regions will not be handled by the WebView. + // Avoid the resulting DCHECK in NativeViewHost::OnMousePressed by + // configuring the NativeViewHost not to process events via the view + // hierarchy. + holder()->SetCanProcessEventsWithinSubtree(false); + } }; class CefBrowserViewView diff --git a/patch/patches/chrome_runtime_views.patch b/patch/patches/chrome_runtime_views.patch index dab984bb7..c69cd0ddf 100644 --- a/patch/patches/chrome_runtime_views.patch +++ b/patch/patches/chrome_runtime_views.patch @@ -356,6 +356,22 @@ index 5f8af5f46bf46..54aba6eb904d6 100644 int browser_view_width = vertical_layout_rect_.width(); bool toolbar_visible = delegate_->IsToolbarVisible(); int height = toolbar_visible ? toolbar_->GetPreferredSize().height() : 0; +diff --git chrome/browser/ui/views/frame/contents_web_view.cc chrome/browser/ui/views/frame/contents_web_view.cc +index 5f985efa03120..cd38b49974ecb 100644 +--- chrome/browser/ui/views/frame/contents_web_view.cc ++++ chrome/browser/ui/views/frame/contents_web_view.cc +@@ -24,6 +24,11 @@ + ContentsWebView::ContentsWebView(content::BrowserContext* browser_context) + : views::WebView(browser_context), + status_bubble_(nullptr) { ++ // Mouse events on draggable regions will not be handled by the WebView. ++ // Avoid the resulting DCHECK in NativeViewHost::OnMousePressed by ++ // configuring the NativeViewHost not to process events via the view ++ // hierarchy. ++ holder()->SetCanProcessEventsWithinSubtree(false); + } + + ContentsWebView::~ContentsWebView() { diff --git chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc index 9a42c3bd2207b..4de0fb1b33bce 100644 --- chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc