Fix APZ using incorrect scroll wheel deltas. (bug 1141728, r=kats)

This commit is contained in:
David Anderson 2015-03-11 13:56:56 -07:00
Родитель f5d543e29c
Коммит b0d8ea6da4
2 изменённых файлов: 8 добавлений и 3 удалений

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

@ -843,8 +843,8 @@ APZCTreeManager::ProcessWheelEvent(WidgetWheelEvent& aEvent,
scrollMode,
ScrollWheelInput::SCROLLDELTA_LINE,
origin,
aEvent.lineOrPageDeltaX,
aEvent.lineOrPageDeltaY);
aEvent.deltaX,
aEvent.deltaY);
nsEventStatus status = ReceiveInputEvent(input, aOutTargetGuid, aOutInputBlockId);
aEvent.refPoint.x = input.mOrigin.x;
@ -856,7 +856,8 @@ bool
APZCTreeManager::WillHandleWheelEvent(WidgetWheelEvent* aEvent)
{
return EventStateManager::WheelEventIsScrollAction(aEvent) &&
aEvent->deltaMode == nsIDOMWheelEvent::DOM_DELTA_LINE;
aEvent->deltaMode == nsIDOMWheelEvent::DOM_DELTA_LINE &&
!gfxPrefs::MouseWheelHasScrollDeltaOverride();
}
nsEventStatus

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

@ -342,6 +342,10 @@ private:
// This and code dependent on it should be removed once containerless scrolling looks stable.
DECL_GFX_PREF(Once, "layout.scroll.root-frame-containers", LayoutUseContainersForRootFrames, bool, true);
// This affects whether events will be routed through APZ or not.
DECL_GFX_PREF(Once, "mousewheel.system_scroll_override_on_root_content.enabled",
MouseWheelHasScrollDeltaOverride, bool, false);
public:
// Manage the singleton:
static gfxPrefs& GetSingleton()