Dispatch scroll wheel events through APZ on Gtk. (bug 1119743, r=nical)

--HG--
extra : rebase_source : c90e3ff64555bb8e121c1605628e2854ea10c823
This commit is contained in:
David Anderson 2015-01-12 19:45:10 -08:00
Родитель 20706f09c9
Коммит 5364eafbb8
1 изменённых файлов: 15 добавлений и 2 удалений

Просмотреть файл

@ -123,6 +123,8 @@ extern "C" {
#include "NativeKeyBindings.h"
#include "nsWindow.h"
#include "mozilla/layers/APZCTreeManager.h"
using namespace mozilla;
using namespace mozilla::gfx;
using namespace mozilla::widget;
@ -3156,8 +3158,19 @@ nsWindow::OnScrollEvent(GdkEventScroll *aEvent)
wheelEvent.time = aEvent->time;
nsEventStatus status;
DispatchEvent(&wheelEvent, status);
if (mAPZC) {
uint64_t inputBlockId = 0;
ScrollableLayerGuid guid;
nsEventStatus result = mAPZC->ReceiveInputEvent(*wheelEvent.AsWheelEvent(), &guid, &inputBlockId);
if (result == nsEventStatus_eConsumeNoDefault) {
return;
}
DispatchEventForAPZ(&wheelEvent, guid, inputBlockId);
} else {
nsEventStatus status;
DispatchEvent(&wheelEvent, status);
}
}
void