mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 11:25:00 +00:00
Bug 1280805 - Don't assert in the valid case where the child process gets an event with an input block id but no mHandledByAPZ. r=rbarker
MozReview-Commit-ID: 9L4xdnoSJ0p --HG-- extra : rebase_source : 464157cefc0d46a2fc0ad77ae893baf00fe594f7
This commit is contained in:
parent
25a5c940b8
commit
1359297bec
@ -1921,8 +1921,13 @@ TabChild::RecvRealMouseButtonEvent(const WidgetMouseEvent& aEvent,
|
||||
const ScrollableLayerGuid& aGuid,
|
||||
const uint64_t& aInputBlockId)
|
||||
{
|
||||
if (aInputBlockId) {
|
||||
MOZ_ASSERT(aEvent.mFlags.mHandledByAPZ);
|
||||
// Mouse events like eMouseEnterIntoWidget, that are created in the parent
|
||||
// process EventStateManager code, have an input block id which they get from
|
||||
// the InputAPZContext in the parent process stack. However, they did not
|
||||
// actually go through the APZ code and so their mHandledByAPZ flag is false.
|
||||
// Since thos events didn't go through APZ, we don't need to send notifications
|
||||
// for them.
|
||||
if (aInputBlockId && aEvent.mFlags.mHandledByAPZ) {
|
||||
nsCOMPtr<nsIDocument> document(GetDocument());
|
||||
APZCCallbackHelper::SendSetTargetAPZCNotification(
|
||||
mPuppetWidget, document, aEvent, aGuid, aInputBlockId);
|
||||
@ -1937,8 +1942,7 @@ TabChild::RecvRealMouseButtonEvent(const WidgetMouseEvent& aEvent,
|
||||
mPuppetWidget->GetDefaultScale());
|
||||
APZCCallbackHelper::DispatchWidgetEvent(localEvent);
|
||||
|
||||
if (aInputBlockId) {
|
||||
MOZ_ASSERT(aEvent.mFlags.mHandledByAPZ);
|
||||
if (aInputBlockId && aEvent.mFlags.mHandledByAPZ) {
|
||||
mAPZEventState->ProcessMouseEvent(aEvent, aGuid, aInputBlockId);
|
||||
}
|
||||
return true;
|
||||
@ -1949,8 +1953,7 @@ TabChild::RecvMouseWheelEvent(const WidgetWheelEvent& aEvent,
|
||||
const ScrollableLayerGuid& aGuid,
|
||||
const uint64_t& aInputBlockId)
|
||||
{
|
||||
if (aInputBlockId) {
|
||||
MOZ_ASSERT(aEvent.mFlags.mHandledByAPZ);
|
||||
if (aInputBlockId && aEvent.mFlags.mHandledByAPZ) {
|
||||
nsCOMPtr<nsIDocument> document(GetDocument());
|
||||
APZCCallbackHelper::SendSetTargetAPZCNotification(
|
||||
mPuppetWidget, document, aEvent, aGuid, aInputBlockId);
|
||||
@ -1966,8 +1969,7 @@ TabChild::RecvMouseWheelEvent(const WidgetWheelEvent& aEvent,
|
||||
SendRespondStartSwipeEvent(aInputBlockId, localEvent.TriggersSwipe());
|
||||
}
|
||||
|
||||
if (aInputBlockId) {
|
||||
MOZ_ASSERT(aEvent.mFlags.mHandledByAPZ);
|
||||
if (aInputBlockId && aEvent.mFlags.mHandledByAPZ) {
|
||||
mAPZEventState->ProcessWheelEvent(localEvent, aGuid, aInputBlockId);
|
||||
}
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user