Closed Bug 895904 Opened 11 years ago Closed 11 years ago

NativePanZoomController.abortAnimation() needs to be hooked up

Categories

(Core :: Graphics: Layers, defect)

All
Android
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla25

People

(Reporter: botond, Assigned: botond)

References

Details

Attachments

(1 file)

When content does a scrollTo(), if a pan/zoom animation is in progress it should be cancelled. On Fennec+APZC, this means hooking up NativePanZoomController.abortAnimation() to call AsyncPanZoomController::CancelAnimation.
Attached patch bug895904.patchSplinter Review
The attached patch hooks up NativePanZoomController.cancelAnimation(). It also fixes a bug in AsyncPanZoomController::CancelAnimation() where it was modiying the mState field which is supposed to be protected by the monitor, but neither it nor its caller was grabbing the monitor.
Attachment #779354 - Flags: review?(bugmail.mozilla)
Comment on attachment 779354 [details] [diff] [review] bug895904.patch Review of attachment 779354 [details] [diff] [review]: ----------------------------------------------------------------- ::: mobile/android/base/gfx/NativePanZoomController.java @@ +68,5 @@ > public void abortPanning() { > // no-op in APZC, I think > } > > + public native void abortAnimation(); Move this down so that it's in the same block as the other public native void functions. ::: widget/android/AndroidJNI.cpp @@ +833,5 @@ > > NS_EXPORT void JNICALL > +Java_org_mozilla_gecko_gfx_NativePanZoomController_abortAnimation(JNIEnv* env, jobject instance) > +{ > + AsyncPanZoomController* controller = nsWindow::GetPanZoomController(); Use a four-space indent throughout this function. That seems to be what the majority of code in this file uses.
Attachment #779354 - Flags: review?(bugmail.mozilla) → review+
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla25
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: