summaryrefslogtreecommitdiffstats
path: root/layout
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@wolfbeast.com>2019-07-18 19:09:05 +0200
committerwolfbeast <mcwerewolf@wolfbeast.com>2019-07-22 12:18:54 +0200
commit0c9570d81efd16be2cc50daef5b404cd05221fda (patch)
tree8dcb57ea9af124b835bc087c57f8269a5a32df09 /layout
parentd9d452c04e934f09a47d978317e08d2a502b4abd (diff)
downloadUXP-0c9570d81efd16be2cc50daef5b404cd05221fda.tar
UXP-0c9570d81efd16be2cc50daef5b404cd05221fda.tar.gz
UXP-0c9570d81efd16be2cc50daef5b404cd05221fda.tar.lz
UXP-0c9570d81efd16be2cc50daef5b404cd05221fda.tar.xz
UXP-0c9570d81efd16be2cc50daef5b404cd05221fda.zip
Revert "Capture delayed events and cancel as necessary."
Tag #1052 (backout). Backed out for creating issues like #1191 and other issue-less problems with e.g. losing the caret from text boxes. Of note: this was also backed out from m-c for similar reasons in Bug 1332433. This fixes #1191. This reverts commit 3424afccaebc71c4acd4fa9eadf519c408c5965b.
Diffstat (limited to 'layout')
-rw-r--r--layout/base/nsPresShell.cpp12
-rw-r--r--layout/base/nsPresShell.h4
2 files changed, 0 insertions, 16 deletions
diff --git a/layout/base/nsPresShell.cpp b/layout/base/nsPresShell.cpp
index d4fbebbf2..5dfbb8dba 100644
--- a/layout/base/nsPresShell.cpp
+++ b/layout/base/nsPresShell.cpp
@@ -8192,9 +8192,6 @@ PresShell::HandleEventInternal(WidgetEvent* aEvent,
}
}
}
- if (aEvent->mMessage == eKeyDown) {
- mIsLastKeyDownCanceled = aEvent->mFlags.mDefaultPrevented;
- }
break;
}
case eMouseUp:
@@ -8984,9 +8981,6 @@ PresShell::FireOrClearDelayedEvents(bool aFireEvents)
!doc->EventHandlingSuppressed()) {
nsAutoPtr<DelayedEvent> ev(mDelayedEvents[0].forget());
mDelayedEvents.RemoveElementAt(0);
- if (ev->IsKeyPressEvent() && mIsLastKeyDownCanceled) {
- continue;
- }
ev->Dispatch();
}
if (!doc->EventHandlingSuppressed()) {
@@ -9781,12 +9775,6 @@ PresShell::DelayedKeyEvent::DelayedKeyEvent(WidgetKeyboardEvent* aEvent) :
mEvent = keyEvent;
}
-bool
-PresShell::DelayedKeyEvent::IsKeyPressEvent()
-{
- return mEvent->mMessage == eKeyPress;
-}
-
// Start of DEBUG only code
#ifdef DEBUG
diff --git a/layout/base/nsPresShell.h b/layout/base/nsPresShell.h
index 1a8dd3fef..7a9056a38 100644
--- a/layout/base/nsPresShell.h
+++ b/layout/base/nsPresShell.h
@@ -617,7 +617,6 @@ protected:
public:
virtual ~DelayedEvent() { }
virtual void Dispatch() { }
- virtual bool IsKeyPressEvent() { return false; }
};
class DelayedInputEvent : public DelayedEvent
@@ -642,7 +641,6 @@ protected:
{
public:
explicit DelayedKeyEvent(mozilla::WidgetKeyboardEvent* aEvent);
- virtual bool IsKeyPressEvent() override;
};
// Check if aEvent is a mouse event and record the mouse location for later
@@ -953,8 +951,6 @@ protected:
// Whether the widget has received a paint message yet.
bool mHasReceivedPaintMessage : 1;
- bool mIsLastKeyDownCanceled : 1;
-
static bool sDisableNonTestMouseEvents;
};