Bug 1259296 - Scroll snap in the compositor in response to wheel events. r=kats
MozReview-Commit-ID: 9fOlssstgvR
This commit is contained in:
@@ -6,8 +6,9 @@
|
||||
#ifndef InputData_h__
|
||||
#define InputData_h__
|
||||
|
||||
#include "nsIDOMWheelEvent.h"
|
||||
#include "nsDebug.h"
|
||||
#include "nsIDOMWheelEvent.h"
|
||||
#include "nsIScrollableFrame.h"
|
||||
#include "nsPoint.h"
|
||||
#include "nsTArray.h"
|
||||
#include "Units.h"
|
||||
@@ -577,6 +578,22 @@ public:
|
||||
return SCROLLDELTA_LINE;
|
||||
}
|
||||
|
||||
static nsIScrollableFrame::ScrollUnit
|
||||
ScrollUnitForDeltaType(ScrollDeltaType aDeltaType)
|
||||
{
|
||||
switch (aDeltaType) {
|
||||
case SCROLLDELTA_LINE:
|
||||
return nsIScrollableFrame::LINES;
|
||||
case SCROLLDELTA_PAGE:
|
||||
return nsIScrollableFrame::PAGES;
|
||||
case SCROLLDELTA_PIXEL:
|
||||
return nsIScrollableFrame::DEVICE_PIXELS;
|
||||
default:
|
||||
MOZ_CRASH();
|
||||
}
|
||||
return nsIScrollableFrame::LINES;
|
||||
}
|
||||
|
||||
enum ScrollMode
|
||||
{
|
||||
SCROLLMODE_INSTANT,
|
||||
|
||||
Reference in New Issue
Block a user