зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1445131 - When testing the event's position against the window's draggable region, read the position when it's still in the correct coordinate space. r=spohl
MozReview-Commit-ID: HqnXgIjDWrW --HG-- extra : rebase_source : 9baf99dd7fc3715b7e7bedeea72fbe2b3728766d
This commit is contained in:
Родитель
64686b0cbf
Коммит
e890cbae46
|
@ -4593,12 +4593,15 @@ NSEvent* gLastDragMouseDownEvent = nil;
|
|||
else
|
||||
geckoEvent.button = WidgetMouseEvent::eLeftButton;
|
||||
|
||||
// Remember the event's position before calling DispatchInputEvent, because
|
||||
// that call can mutate it and convert it into a different coordinate space.
|
||||
LayoutDeviceIntPoint pos = geckoEvent.mRefPoint;
|
||||
|
||||
// This might destroy our widget (and null out mGeckoChild).
|
||||
bool defaultPrevented =
|
||||
(mGeckoChild->DispatchInputEvent(&geckoEvent) == nsEventStatus_eConsumeNoDefault);
|
||||
|
||||
// Check to see if we are double-clicking in draggable parts of the window.
|
||||
LayoutDeviceIntPoint pos = geckoEvent.mRefPoint;
|
||||
if (!defaultPrevented && [theEvent clickCount] == 2 &&
|
||||
!mGeckoChild->GetNonDraggableRegion().Contains(pos.x, pos.y)) {
|
||||
if ([self shouldZoomOnDoubleClick]) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче