Page/content does not resize on device rotation/orientation change

VERIFIED FIXED

Status

()

Firefox for Android
General
P1
normal
VERIFIED FIXED
6 years ago
9 months ago

People

(Reporter: lmandel, Assigned: kats)

Tracking

unspecified
ARM
Android
Points:
---

Firefox Tracking Flags

(firefox11 fixed, fennec11+)

Details

Attachments

(2 attachments, 2 obsolete attachments)

Created attachment 576396 [details]
Screenshot of portrait mode with grey area

Open a web page in landscape mode and scroll all the way to the bottom. (I was on http://www.mikealrogers.com/posts/apache-considered-harmful.html when I found this bug.) Change to portrait mode. The page does not grab the bottom but instead shows a grey area on the bottom half of the screen.
Assignee: nobody → kgupta
Duplicate of this bug: 707705
Duplicate of this bug: 705094
Summary: When switching from landscape to portrait page doesn't grab the bottom of the screen → Page/content does not resize on device rotation/orientation change
Created attachment 579113 [details] [diff] [review]
Snap edge on rotate

This fixes the snapping-to-edge on rotation. For making the page resize so we don't get grey areas, bug 701594 will need to be fixed first.
Attachment #579113 - Flags: review?(chrislord.net)
Depends on: 701594

Comment 4

6 years ago
Comment on attachment 579113 [details] [diff] [review]
Snap edge on rotate

Review of attachment 579113 [details] [diff] [review]:
-----------------------------------------------------------------

Looks fine to me.
Attachment #579113 - Flags: review?(chrislord.net) → review+
https://hg.mozilla.org/projects/birch/rev/bea2748292cc

Leaving this bug open until bug 701594 is resolved.
Created attachment 579146 [details] [diff] [review]
Re-zoom on rotate/viewport change
Attachment #579146 - Flags: review?(wjohnston)
Attachment #579146 - Flags: feedback?(chrislord.net)
Getting rid of the dependency on bug 701594 because https://hg.mozilla.org/projects/birch/rev/f8c174b95c40 (bug 697701) also provides the necessary zoom code. Use that to re-zoom the page on rotate if needed. This also handles the case where the device is rotated or the page calls scrollTo while in the middle of an animated zoom.
No longer depends on: 701594

Comment 8

6 years ago
Comment on attachment 579146 [details] [diff] [review]
Re-zoom on rotate/viewport change

Review of attachment 579146 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good, feedback+ from me.

::: mobile/android/base/ui/PanZoomController.java
@@ +185,5 @@
>          default:                        return false;
>          }
>      }
>  
>      public void geometryChanged(boolean aAbortFling) {

Maybe this should be renamed aAbortAnimation now?
Attachment #579146 - Flags: feedback?(chrislord.net) → feedback+
Comment on attachment 579146 [details] [diff] [review]
Re-zoom on rotate/viewport change

Review of attachment 579146 [details] [diff] [review]:
-----------------------------------------------------------------

::: mobile/android/base/ui/PanZoomController.java
@@ +205,5 @@
>                  mX.velocity = mY.velocity = 0.0f;
>                  mState = PanZoomState.NOTHING;
>                  // fall through
>              case NOTHING:
> +                tryZoomToFitPage();

This will zoom us out right? I guess that's better than showing gray areas.
Attachment #579146 - Flags: review?(wjohnston) → review+
Renamed aAbortFling to abortAnimation. And yes, it zooms us out only if there would be gray areas otherwise.

https://hg.mozilla.org/projects/birch/rev/884b705c99fb
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED

Updated

6 years ago
Duplicate of this bug: 707934

Updated

6 years ago
Depends on: 707956

Updated

6 years ago
No longer depends on: 707956

Updated

6 years ago
Depends on: 707996
Backed out in https://hg.mozilla.org/projects/birch/rev/62a0c96c6ef7 since it broke some behaviour relating to opening new tabs.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Priority: -- → P1
Technically this works now because of the patches from bug 701594 but it could use a little tweaking. I'll put together a patch for it.
Well, one issue still remaining is that if you open a page in landscape, and then rotate to portrait triggering a zoom, rotating back does not zoom back.

This might be desired behavior, but seem counter intuitive to me.
(In reply to Bill Gianopoulos from comment #14)
> Well, one issue still remaining is that if you open a page in landscape, and
> then rotate to portrait triggering a zoom, rotating back does not zoom back.
> 
> This might be desired behavior, but seem counter intuitive to me.

I agree that this is annoying. It's being tracked in bug 707956.
Attachment #579113 - Attachment is obsolete: true
Attachment #579146 - Attachment is obsolete: true
Created attachment 580909 [details] [diff] [review]
Patch

Just renaming variables and ensuring rotations interact well with double-tap.
Attachment #580909 - Flags: review?(chrislord.net)
Comment on attachment 580909 [details] [diff] [review]
Patch

Review of attachment 580909 [details] [diff] [review]:
-----------------------------------------------------------------

Looks fine to me.
Attachment #580909 - Flags: review?(chrislord.net) → review+
https://hg.mozilla.org/mozilla-central/rev/6992abaa6854
Status: REOPENED → RESOLVED
Last Resolved: 6 years ago6 years ago
Resolution: --- → FIXED
HTC Nexus One (Android 2.3.6)
20111213061518
http://hg.mozilla.org/mozilla-central/rev/e79b3396889c
Status: RESOLVED → VERIFIED
tracking-fennec: --- → 11+
status-firefox11: --- → fixed
You need to log in before you can comment on or make changes to this bug.