зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1638458 - Do not use ignoreRootScrollFrame when dispatching a contextmenu event in APZEventState. r=tnikkel
The patch also removes the ignoreRootScrollFrame option from APZCCallbackHelper::DispatchMouseEvent() altogether as it is no longer used. Depends on D75735 Differential Revision: https://phabricator.services.mozilla.com/D75736
This commit is contained in:
Родитель
ba458447b3
Коммит
9193635dca
|
@ -1465,10 +1465,10 @@ mozilla::ipc::IPCResult BrowserChild::RecvMouseEvent(
|
|||
// event loop, which may release this, so we hold a strong reference here.
|
||||
RefPtr<BrowserChild> kungFuDeathGrip(this);
|
||||
RefPtr<PresShell> presShell = GetTopLevelPresShell();
|
||||
APZCCallbackHelper::DispatchMouseEvent(
|
||||
presShell, aType, CSSPoint(aX, aY), aButton, aClickCount, aModifiers,
|
||||
false, MouseEvent_Binding::MOZ_SOURCE_UNKNOWN,
|
||||
0 /* Use the default value here. */);
|
||||
APZCCallbackHelper::DispatchMouseEvent(presShell, aType, CSSPoint(aX, aY),
|
||||
aButton, aClickCount, aModifiers,
|
||||
MouseEvent_Binding::MOZ_SOURCE_UNKNOWN,
|
||||
0 /* Use the default value here. */);
|
||||
return IPC_OK();
|
||||
}
|
||||
|
||||
|
|
|
@ -489,16 +489,15 @@ nsEventStatus APZCCallbackHelper::DispatchSynthesizedMouseEvent(
|
|||
bool APZCCallbackHelper::DispatchMouseEvent(
|
||||
PresShell* aPresShell, const nsString& aType, const CSSPoint& aPoint,
|
||||
int32_t aButton, int32_t aClickCount, int32_t aModifiers,
|
||||
bool aIgnoreRootScrollFrame, unsigned short aInputSourceArg,
|
||||
uint32_t aPointerId) {
|
||||
unsigned short aInputSourceArg, uint32_t aPointerId) {
|
||||
NS_ENSURE_TRUE(aPresShell, true);
|
||||
|
||||
bool defaultPrevented = false;
|
||||
nsContentUtils::SendMouseEvent(
|
||||
aPresShell, aType, aPoint.x, aPoint.y, aButton,
|
||||
nsIDOMWindowUtils::MOUSE_BUTTONS_NOT_SPECIFIED, aClickCount, aModifiers,
|
||||
aIgnoreRootScrollFrame, 0, aInputSourceArg, aPointerId, false,
|
||||
&defaultPrevented, false, /* aIsWidgetEventSynthesized = */ false);
|
||||
/* aIgnoreRootScrollFrame = */ false, 0, aInputSourceArg, aPointerId,
|
||||
false, &defaultPrevented, false, /* aIsWidgetEventSynthesized = */ false);
|
||||
return defaultPrevented;
|
||||
}
|
||||
|
||||
|
|
|
@ -118,7 +118,6 @@ class APZCCallbackHelper {
|
|||
static bool DispatchMouseEvent(PresShell* aPresShell, const nsString& aType,
|
||||
const CSSPoint& aPoint, int32_t aButton,
|
||||
int32_t aClickCount, int32_t aModifiers,
|
||||
bool aIgnoreRootScrollFrame,
|
||||
unsigned short aInputSourceArg,
|
||||
uint32_t aPointerId);
|
||||
|
||||
|
|
|
@ -223,7 +223,7 @@ bool APZEventState::FireContextmenuEvents(PresShell* aPresShell,
|
|||
ViewportUtils::VisualToLayout(CSSPoint::ToAppUnits(aPoint), aPresShell));
|
||||
bool eventHandled = APZCCallbackHelper::DispatchMouseEvent(
|
||||
aPresShell, NS_LITERAL_STRING("contextmenu"), point, 2, 1,
|
||||
WidgetModifiersToDOMModifiers(aModifiers), true,
|
||||
WidgetModifiersToDOMModifiers(aModifiers),
|
||||
dom::MouseEvent_Binding::MOZ_SOURCE_TOUCH,
|
||||
0 /* Use the default value here. */);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче