summaryrefslogtreecommitdiffstats
path: root/editor/libeditor/HTMLEditorEventListener.cpp
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-06-26 13:53:12 +0200
committerwolfbeast <mcwerewolf@gmail.com>2018-06-26 13:53:12 +0200
commita7bc62dcfe5495c8b53532c1b585af07171b4403 (patch)
tree40856bf1ba28f0c304d86769519ec52821605c39 /editor/libeditor/HTMLEditorEventListener.cpp
parent783f57d74b0caf84cec01a0ae43a2a8cb8697673 (diff)
downloadUXP-a7bc62dcfe5495c8b53532c1b585af07171b4403.tar
UXP-a7bc62dcfe5495c8b53532c1b585af07171b4403.tar.gz
UXP-a7bc62dcfe5495c8b53532c1b585af07171b4403.tar.lz
UXP-a7bc62dcfe5495c8b53532c1b585af07171b4403.tar.xz
UXP-a7bc62dcfe5495c8b53532c1b585af07171b4403.zip
Issue #12 Part 2: Stop using nsIDOMEvent in IsAcceptableInputEvent.
Diffstat (limited to 'editor/libeditor/HTMLEditorEventListener.cpp')
-rw-r--r--editor/libeditor/HTMLEditorEventListener.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/editor/libeditor/HTMLEditorEventListener.cpp b/editor/libeditor/HTMLEditorEventListener.cpp
index 8fb9459c2..c4d857908 100644
--- a/editor/libeditor/HTMLEditorEventListener.cpp
+++ b/editor/libeditor/HTMLEditorEventListener.cpp
@@ -7,6 +7,7 @@
#include "HTMLEditUtils.h"
#include "mozilla/HTMLEditor.h"
+#include "mozilla/MouseEvents.h"
#include "mozilla/dom/Event.h"
#include "mozilla/dom/Selection.h"
#include "nsCOMPtr.h"
@@ -71,10 +72,13 @@ HTMLEditorEventListener::MouseUp(nsIDOMMouseEvent* aMouseEvent)
nsresult
HTMLEditorEventListener::MouseDown(nsIDOMMouseEvent* aMouseEvent)
{
+ WidgetMouseEvent* mousedownEvent =
+ aMouseEvent->AsEvent()->WidgetEventPtr()->AsMouseEvent();
+
HTMLEditor* htmlEditor = GetHTMLEditor();
// Contenteditable should disregard mousedowns outside it.
// IsAcceptableInputEvent() checks it for a mouse event.
- if (!htmlEditor->IsAcceptableInputEvent(aMouseEvent->AsEvent())) {
+ if (!htmlEditor->IsAcceptableInputEvent(mousedownEvent)) {
// If it's not acceptable mousedown event (including when mousedown event
// is fired outside of the active editing host), we need to commit
// composition because it will be change the selection to the clicked