mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 15:23:51 +00:00
Bug 1407700 Part1: Revise CoalescedInputData interfaces. r=smaug.
MozReview-Commit-ID: 75AsFBM4qr
This commit is contained in:
parent
b94945fed2
commit
69ed33396c
@ -29,11 +29,6 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
void Reset()
|
||||
{
|
||||
mCoalescedInputEvent = nullptr;
|
||||
}
|
||||
|
||||
bool IsEmpty()
|
||||
{
|
||||
return !mCoalescedInputEvent;
|
||||
@ -43,9 +38,9 @@ public:
|
||||
const ScrollableLayerGuid& aGuid,
|
||||
const uint64_t& aInputBlockId);
|
||||
|
||||
const InputEventType* GetCoalescedEvent()
|
||||
UniquePtr<InputEventType> TakeCoalescedEvent()
|
||||
{
|
||||
return mCoalescedInputEvent.get();
|
||||
return Move(mCoalescedInputEvent);
|
||||
}
|
||||
|
||||
ScrollableLayerGuid GetScrollableLayerGuid()
|
||||
|
@ -1601,14 +1601,13 @@ TabChild::MaybeDispatchCoalescedMouseMoveEvents()
|
||||
if (!data || data->IsEmpty()) {
|
||||
continue;
|
||||
}
|
||||
const WidgetMouseEvent* event = data->GetCoalescedEvent();
|
||||
UniquePtr<WidgetMouseEvent> event = data->TakeCoalescedEvent();
|
||||
MOZ_ASSERT(event);
|
||||
// Dispatch the coalesced mousemove event. Using RecvRealMouseButtonEvent to
|
||||
// bypass the coalesce handling in RecvRealMouseMoveEvent.
|
||||
RecvRealMouseButtonEvent(*event,
|
||||
data->GetScrollableLayerGuid(),
|
||||
data->GetInputBlockId());
|
||||
data->Reset();
|
||||
}
|
||||
if (mCoalescedMouseEventFlusher) {
|
||||
mCoalescedMouseEventFlusher->RemoveObserver();
|
||||
@ -1779,13 +1778,12 @@ TabChild::MaybeDispatchCoalescedWheelEvent()
|
||||
if (mCoalescedWheelData.IsEmpty()) {
|
||||
return;
|
||||
}
|
||||
const WidgetWheelEvent* wheelEvent =
|
||||
mCoalescedWheelData.GetCoalescedEvent();
|
||||
UniquePtr<WidgetWheelEvent> wheelEvent =
|
||||
mCoalescedWheelData.TakeCoalescedEvent();
|
||||
MOZ_ASSERT(wheelEvent);
|
||||
DispatchWheelEvent(*wheelEvent,
|
||||
mCoalescedWheelData.GetScrollableLayerGuid(),
|
||||
mCoalescedWheelData.GetInputBlockId());
|
||||
mCoalescedWheelData.Reset();
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
Reference in New Issue
Block a user