mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1062307 - Ensure the contextmenu event triggered by a long-press action targets things outside the root scroll frame. r=capella,smaug
This commit is contained in:
parent
4009829935
commit
24c1971914
@ -6915,7 +6915,8 @@ PresShell::HandleEvent(nsIFrame* aFrame,
|
||||
// document that is being captured.
|
||||
retargetEventDoc = capturingContent->GetCrossShadowCurrentDoc();
|
||||
#ifdef ANDROID
|
||||
} else if (aEvent->mClass == eTouchEventClass) {
|
||||
} else if (aEvent->mClass == eTouchEventClass ||
|
||||
(aEvent->AsMouseEvent() && aEvent->AsMouseEvent()->inputSource == nsIDOMMouseEvent::MOZ_SOURCE_TOUCH)) {
|
||||
retargetEventDoc = GetTouchEventTargetDocument();
|
||||
#endif
|
||||
}
|
||||
|
@ -1042,7 +1042,10 @@ nsWindow::OnContextmenuEvent(AndroidGeckoEvent *ae)
|
||||
WidgetMouseEvent contextMenuEvent(true, NS_CONTEXTMENU, this,
|
||||
WidgetMouseEvent::eReal, WidgetMouseEvent::eNormal);
|
||||
contextMenuEvent.refPoint =
|
||||
LayoutDeviceIntPoint(RoundedToInt(pt * GetDefaultScale()));
|
||||
LayoutDeviceIntPoint(RoundedToInt(pt * GetDefaultScale())) -
|
||||
LayoutDeviceIntPoint::FromUntyped(WidgetToScreenOffset());
|
||||
contextMenuEvent.ignoreRootScrollFrame = true;
|
||||
contextMenuEvent.inputSource = nsIDOMMouseEvent::MOZ_SOURCE_TOUCH;
|
||||
|
||||
nsEventStatus contextMenuStatus;
|
||||
DispatchEvent(&contextMenuEvent, contextMenuStatus);
|
||||
|
Loading…
Reference in New Issue
Block a user