moebius#195: DOM - PointerEvent - improvements

https://github.com/MoonchildProductions/moebius/pull/195
This commit is contained in:
janekptacijarabaci 2018-04-23 11:54:06 +02:00 • committed by Roy Tam
commit a968f1d6c2
10 changed files with 228 additions and 20 deletions

View file

@ -855,6 +855,25 @@ Event::GetEventPopupControlState(WidgetEvent* aEvent, nsIDOMEvent* aDOMEvent)
}
}
break;
case ePointerEventClass:
if (aEvent->IsTrusted() &&
aEvent->AsPointerEvent()->button == WidgetMouseEvent::eLeftButton) {
switch(aEvent->mMessage) {
case ePointerUp:
if (PopupAllowedForEvent("pointerup")) {
abuse = openControlled;
}
break;
case ePointerDown:
if (PopupAllowedForEvent("pointerdown")) {
abuse = openControlled;
}
break;
default:
break;
}
}
break;
case eFormEventClass:
// For these following events only allow popups if they're
// triggered while handling user input. See