Bug 1338086 - Remove useless else blocks in order to reduce complexity widget/ r?mstange
MozReview-Commit-ID: AjL8H7aHLkm
--- a/widget/nsBaseWidget.cpp
+++ b/widget/nsBaseWidget.cpp
@@ -1210,30 +1210,31 @@ nsEventStatus
nsBaseWidget::DispatchInputEvent(WidgetInputEvent* aEvent)
{
MOZ_ASSERT(NS_IsMainThread());
if (mAPZC) {
if (APZThreadUtils::IsControllerThread()) {
uint64_t inputBlockId = 0;
ScrollableLayerGuid guid;
- nsEventStatus result = mAPZC->ReceiveInputEvent(*aEvent, &guid, &inputBlockId);
+ nsEventStatus result =
+ mAPZC->ReceiveInputEvent(*aEvent, &guid, &inputBlockId);
if (result == nsEventStatus_eConsumeNoDefault) {
- return result;
+ return result;
}
return ProcessUntransformedAPZEvent(aEvent, guid, inputBlockId, result);
- } else {
- WidgetWheelEvent* wheelEvent = aEvent->AsWheelEvent();
- if (wheelEvent) {
- RefPtr<Runnable> r = new DispatchWheelInputOnControllerThread(*wheelEvent, mAPZC, this);
- APZThreadUtils::RunOnControllerThread(r.forget());
- return nsEventStatus_eConsumeDoDefault;
- }
- MOZ_CRASH();
}
+ WidgetWheelEvent* wheelEvent = aEvent->AsWheelEvent();
+ if (wheelEvent) {
+ RefPtr<Runnable> r =
+ new DispatchWheelInputOnControllerThread(*wheelEvent, mAPZC, this);
+ APZThreadUtils::RunOnControllerThread(r.forget());
+ return nsEventStatus_eConsumeDoDefault;
+ }
+ MOZ_CRASH();
}
nsEventStatus status;
DispatchEvent(aEvent, status);
return status;
}
void