summaryrefslogtreecommitdiffstats
path: root/dom/events/Event.cpp
diff options
context:
space:
mode:
authorMoonchild <mcwerewolf@gmail.com>2018-04-23 12:17:34 +0200
committerGitHub <noreply@github.com>2018-04-23 12:17:34 +0200
commitbccb9c1708f007ada1ea8c4879db88a587f0a450 (patch)
tree835dacc8cb3df7b05d4b62f4c551d8ad9f791371 /dom/events/Event.cpp
parent1ea8529cfb0a246d09daf1ec742d063c08cf1899 (diff)
parentd9d3b687b7c892b400e781dd5c57897efd7173aa (diff)
downloadUXP-bccb9c1708f007ada1ea8c4879db88a587f0a450.tar
UXP-bccb9c1708f007ada1ea8c4879db88a587f0a450.tar.gz
UXP-bccb9c1708f007ada1ea8c4879db88a587f0a450.tar.lz
UXP-bccb9c1708f007ada1ea8c4879db88a587f0a450.tar.xz
UXP-bccb9c1708f007ada1ea8c4879db88a587f0a450.zip
Merge pull request #238 from janekptacijarabaci/js_dom_pointer_events_2
moebius#195: DOM - PointerEvents - improvements (implement pointerup and pointerdown)
Diffstat (limited to 'dom/events/Event.cpp')
-rwxr-xr-xdom/events/Event.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/dom/events/Event.cpp b/dom/events/Event.cpp
index 2546a81ad..7e19cd74d 100755
--- a/dom/events/Event.cpp
+++ b/dom/events/Event.cpp
@@ -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