Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(896)

Unified Diff: content/browser/renderer_host/render_widget_host_view_mac.mm

Issue 95113004: [Mac] Don't ignore mouse events outside of the view while dragging. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Improved comments and TEST= Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_widget_host_view_mac.mm
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm
index acfd3b6aee1a3624723e57268037363734285d9a..b23b5d01043cf9d528076ed57dc7edd916c01858 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
@@ -2098,10 +2098,16 @@ void RenderWidgetHostViewMac::FrameSwapped() {
// The cursor is over a nonWebContentView - ignore this mouse event.
return YES;
}
- if ([view isKindOfClass:[self class]] && ![view isEqual:self]) {
+ if ([view isKindOfClass:[self class]] && ![view isEqual:self] &&
+ !hasOpenMouseDown_) {
// The cursor is over an overlapping render widget. This check is done by
// both views so the one that's returned by -hitTest: will end up
// processing the event.
+ // Note that while dragging, we only get events for the render view where
+ // drag started, even if mouse is actually over another view or outside
+ // the window. Cocoa does this for us. We should handle these events and
+ // not ignore (since there is no other render view to handle them). Thus
+ // the |!hasOpenMouseDown_| check above.
return YES;
}
view = [view superview];
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698