Bug 809401 - Allow scrolling subframes in webapps. r=kats a=akeybl
authorWes Johnston <wjohnston@mozilla.com>
Tue, 11 Dec 2012 09:52:55 -0800
changeset 118951 7c1c3d33b3201430675f57c5809c0296610628ae
parent 118950 638ba4108a3be401ce9fdb7f4125bd0e7bce3f1d
child 118952 1f02f40898ef0d42a7e563cf5d49b8f67003a931
push id3000
push userwjohnston@mozilla.com
push dateTue, 18 Dec 2012 22:02:20 +0000
treeherdermozilla-aurora@7c1c3d33b320 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskats, akeybl
bugs809401
milestone19.0a2
Bug 809401 - Allow scrolling subframes in webapps. r=kats a=akeybl
mobile/android/base/ui/Axis.java
--- a/mobile/android/base/ui/Axis.java
+++ b/mobile/android/base/ui/Axis.java
@@ -338,18 +338,19 @@ public abstract class Axis {
 
         if (mFlingState == FlingStates.PANNING)
             mDisplacement += (mLastTouchPos - mTouchPos) * getEdgeResistance(false);
         else
             mDisplacement += mVelocity;
 
         // if overscroll is disabled and we're trying to overscroll, reset the displacement
         // to remove any excess. Using getExcess alone isn't enough here since it relies on
-        // getOverscroll which doesn't take into account any new displacment being applied
-        if (getOverScrollMode() == View.OVER_SCROLL_NEVER) {
+        // getOverscroll which doesn't take into account any new displacment being applied.
+        // If we using a subscroller, we don't want to alter the scrolling being done
+        if (getOverScrollMode() == View.OVER_SCROLL_NEVER && !mSubscroller.scrolling()) {
             if (mDisplacement + getOrigin() < getPageStart()) {
                 mDisplacement = getPageStart() - getOrigin();
                 stopFling();
             } else if (mDisplacement + getViewportEnd() > getPageEnd()) {
                 mDisplacement = getPageEnd() - getViewportEnd();
                 stopFling();
             }
         }