Commit d7337731 authored by jongkwon.lee's avatar jongkwon.lee Committed by Commit Bot

Correct drag location

The |draggingLocation| of NSDraggingInfo is a point based on the
NSWindow coordinate and it should be converted to gfx::Point
using |contentRectForFrameRect:| instead of |frame| because the
NSWindow may have title bar.

Bug: 954019
Change-Id: I92e45aa5fb8aab07c2540cc97b5bd76e29e43a5b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1573358Reviewed-by: default avatarElly Fong-Jones <ellyjones@chromium.org>
Reviewed-by: default avatarTrent Apted <tapted@chromium.org>
Commit-Queue: Trent Apted <tapted@chromium.org>
Cr-Commit-Position: refs/heads/master@{#654804}
parent 31a96fcf
......@@ -125,7 +125,9 @@ void DragDropClientMac::DragExit() {
}
gfx::Point DragDropClientMac::LocationInView(NSPoint point) const {
return gfx::Point(point.x, NSHeight([bridge_->ns_window() frame]) - point.y);
NSRect content_rect = [bridge_->ns_window()
contentRectForFrameRect:[bridge_->ns_window() frame]];
return gfx::Point(point.x, NSHeight(content_rect) - point.y);
}
} // namespace views
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment