Bug 775511 - Disable panning and showing of scrollbars when in full-screen mode. r=Cwiiis
authorKartikaya Gupta <kgupta@mozilla.com>
Sat, 24 Nov 2012 17:32:09 -0500
changeset 114100 3c67034ba39c687b8da87d6ca26c86e3b0c3f3ac
parent 114099 0208584908beb9397c1a13fe8addcc7ce11c8619
child 114101 e390f459239ef1f2309ca414665739faf83ccacd
child 114200 fb697dfb5920af1e18db2f026d27801a7c029925
child 127100 5a6d67b3cbcfd5a9def82534024e45ef97653db6
push id23903
push userryanvm@gmail.com
push dateSun, 25 Nov 2012 01:32:28 +0000
treeherdermozilla-central@3c67034ba39c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersCwiiis
bugs775511
milestone20.0a1
first release with
nightly linux32
3c67034ba39c / 20.0a1 / 20121125030729 / files
nightly linux64
3c67034ba39c / 20.0a1 / 20121125030729 / files
nightly mac
3c67034ba39c / 20.0a1 / 20121125030729 / files
nightly win32
3c67034ba39c / 20.0a1 / 20121125030729 / files
nightly win64
3c67034ba39c / 20.0a1 / 20121125030729 / files
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 775511 - Disable panning and showing of scrollbars when in full-screen mode. r=Cwiiis
mobile/android/base/gfx/LayerRenderer.java
mobile/android/base/ui/PanZoomController.java
--- a/mobile/android/base/gfx/LayerRenderer.java
+++ b/mobile/android/base/gfx/LayerRenderer.java
@@ -449,19 +449,19 @@ public class LayerRenderer implements Ta
 
             TextureReaper.get().reap();
             TextureGenerator.get().fill();
 
             mUpdated = true;
 
             Layer rootLayer = mView.getLayerClient().getRoot();
 
-            if (!mPageContext.fuzzyEquals(mLastPageContext)) {
-                // the viewport or page changed, so show the scrollbars again
-                // as per UX decision
+            if (!mPageContext.fuzzyEquals(mLastPageContext) && !mView.isFullScreen()) {
+                // The viewport or page changed, so show the scrollbars again
+                // as per UX decision. Don't do this if we're in full-screen mode though.
                 mVertScrollLayer.unfade();
                 mHorizScrollLayer.unfade();
                 mFadeRunnable.scheduleStartFade(ScrollbarLayer.FADE_DELAY);
             } else if (mFadeRunnable.timeToFade()) {
                 boolean stillFading = mVertScrollLayer.fade() | mHorizScrollLayer.fade();
                 if (stillFading) {
                     mFadeRunnable.scheduleNextFadeFrame();
                 }
--- a/mobile/android/base/ui/PanZoomController.java
+++ b/mobile/android/base/ui/PanZoomController.java
@@ -310,17 +310,18 @@ public class PanZoomController
             // fall through
         case ANIMATED_ZOOM:
         case NOTHING:
             // may happen if user double-taps and drags without lifting after the
             // second tap. ignore the move if this happens.
             return false;
 
         case TOUCHING:
-            if (panDistance(event) < PAN_THRESHOLD) {
+            // Don't allow panning if there is an element in full-screen mode. See bug 775511.
+            if (mTarget.isFullScreen() || panDistance(event) < PAN_THRESHOLD) {
                 return false;
             }
             cancelTouch();
             startPanning(event.getX(0), event.getY(0), event.getEventTime());
             track(event);
             return true;
 
         case PANNING_HOLD_LOCKED: