mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 809565: Skip onScale and onScaleEnd events if onScaleBegin returned false to make reflow-on-zoom assumptions on order of these events remain valid. [r=kats]
This commit is contained in:
parent
bb1d6972af
commit
fb58fcba20
@ -40,6 +40,7 @@ public class SimpleScaleGestureDetector {
|
||||
|
||||
private SimpleScaleGestureListener mListener;
|
||||
private long mLastEventTime;
|
||||
private boolean mScaleResult;
|
||||
|
||||
/* Information about all pointers that are down. */
|
||||
private LinkedList<PointerInfo> mPointerInfo;
|
||||
@ -206,9 +207,19 @@ public class SimpleScaleGestureDetector {
|
||||
/* Sends the requested scale gesture notification to the listener. */
|
||||
private void sendScaleGesture(EventType eventType) {
|
||||
switch (eventType) {
|
||||
case BEGIN: mListener.onScaleBegin(this); break;
|
||||
case CONTINUE: mListener.onScale(this); break;
|
||||
case END: mListener.onScaleEnd(this); break;
|
||||
case BEGIN:
|
||||
mScaleResult = mListener.onScaleBegin(this);
|
||||
break;
|
||||
case CONTINUE:
|
||||
if (mScaleResult) {
|
||||
mListener.onScale(this);
|
||||
}
|
||||
break;
|
||||
case END:
|
||||
if (mScaleResult) {
|
||||
mListener.onScaleEnd(this);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user