refactor: move draggable regions to WebContents (#36230)

This commit is contained in:
Jeremy Rose 2022-11-07 10:15:57 -08:00 committed by GitHub
parent 2008c9a5d0
commit 184ac2b382
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 96 additions and 202 deletions

View file

@ -1594,17 +1594,7 @@ bool NativeWindowViews::ShouldDescendIntoChildForEventHandling(
const gfx::Point& location) {
// App window should claim mouse events that fall within any BrowserViews'
// draggable region.
for (auto* view : inspectable_views()) {
auto* inspectable_view =
static_cast<InspectableWebContentsViewViews*>(view);
if (inspectable_view->IsContainedInDraggableRegion(content_view(),
location))
return false;
}
// App window should claim mouse events that fall within the draggable region.
if (draggable_region() &&
draggable_region()->contains(location.x(), location.y()))
if (NonClientHitTest(location) != HTNOWHERE)
return false;
// And the events on border for dragging resizable frameless window.