mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 517658 - When adding MozOrientation listener, the listener is called only after there is orientation change, r=dougt
This commit is contained in:
parent
dc3936158f
commit
af4c497fa8
@ -197,8 +197,18 @@ NS_IMETHODIMP nsAccelerometer::RemoveWindowListener(nsIDOMWindow *aWindow)
|
||||
void
|
||||
nsAccelerometer::AccelerationChanged(double x, double y, double z)
|
||||
{
|
||||
if (x > 1 || y > 1 || z > 1 || x < -1 || y < -1 || z < -1)
|
||||
return;
|
||||
if (x > 1)
|
||||
x = 1;
|
||||
if (y > 1)
|
||||
y = 1;
|
||||
if (z > 1)
|
||||
z = 1;
|
||||
if (x < -1)
|
||||
x = -1;
|
||||
if (y < -1)
|
||||
y = -1;
|
||||
if (z < -1)
|
||||
z = -1;
|
||||
|
||||
if (!mNewListener) {
|
||||
if (PR_ABS(mLastX - x) < .01 &&
|
||||
|
Loading…
Reference in New Issue
Block a user