Bug 1230674 - part 2, Add overscroll API to Android nsWindow r=snorp

This commit is contained in:
Randall Barker 2016-01-25 17:30:55 -08:00
parent f53a9a850a
commit 74d6df1aaf
2 changed files with 29 additions and 0 deletions

View File

@ -638,6 +638,16 @@ public:
});
return true;
}
void UpdateOverscrollVelocity(const float x, const float y)
{
mNPZC->UpdateOverscrollVelocity(x, y);
}
void UpdateOverscrollOffset(const float x, const float y)
{
mNPZC->UpdateOverscrollOffset(x, y);
}
};
/**
@ -1738,6 +1748,22 @@ nsWindow::InitEvent(WidgetGUIEvent& event, LayoutDeviceIntPoint* aPoint)
event.time = PR_Now() / 1000;
}
void
nsWindow::UpdateOverscrollVelocity(const float aX, const float aY)
{
if (mNPZCSupport) {
mNPZCSupport->UpdateOverscrollVelocity(aX, aY);
}
}
void
nsWindow::UpdateOverscrollOffset(const float aX, const float aY)
{
if (mNPZCSupport) {
mNPZCSupport->UpdateOverscrollOffset(aX, aY);
}
}
gfx::IntSize
nsWindow::GetAndroidScreenBounds()
{

View File

@ -78,6 +78,9 @@ public:
void InitEvent(mozilla::WidgetGUIEvent& event,
LayoutDeviceIntPoint* aPoint = 0);
void UpdateOverscrollVelocity(const float aX, const float aY);
void UpdateOverscrollOffset(const float aX, const float aY);
//
// nsIWidget
//