Closed Bug 717085 Opened 13 years ago Closed 13 years ago

Bad viewport appears after restart from forcequit

Categories

(Firefox for Android Graveyard :: General, defect, P4)

12 Branch
ARM
Android
defect

Tracking

(firefox11 fixed, firefox12 fixed, fennec11+)

RESOLVED FIXED
Firefox 12
Tracking Status
firefox11 --- fixed
firefox12 --- fixed
fennec 11+ ---

People

(Reporter: nhirata, Assigned: kats)

References

()

Details

Attachments

(1 file)

1. go to http://people.mozilla.com/~nhirata/html_tp/big_buck_bunny_480p.webm 2. set the video to play 3. open a new tab and go to about:home 4. force quit fennec so that these tabs open up at launch 5. wait for the about:home page to launch 6. go to the webm playing in the background Expected: no errors in logcat in regards to viewport Actual: 01-10 15:30:45.183: E/GeckoSoftwareLayerClient(1242): Bad viewport description: {"x":null,"y":null,"width":1,"height":1,"offsetX":0,"offsetY":0,"pageWidth":null,"pageHeight":null,"zoom":null} 01-10 15:30:45.191: W/System.err(1242): java.lang.RuntimeException: org.json.JSONException: Value null at x of type org.json.JSONObject$1 cannot be converted to double 01-10 15:30:45.195: W/System.err(1242): at org.mozilla.gecko.gfx.GeckoSoftwareLayerClient.updateViewport(GeckoSoftwareLayerClient.java:212) 01-10 15:30:45.195: W/System.err(1242): at org.mozilla.gecko.gfx.GeckoSoftwareLayerClient.endDrawing(GeckoSoftwareLayerClient.java:223) 01-10 15:30:45.195: W/System.err(1242): at org.mozilla.gecko.GeckoAppShell.nativeRun(Native Method) 01-10 15:30:45.195: W/System.err(1242): at org.mozilla.gecko.GeckoAppShell.nativeRun(Native Method) 01-10 15:30:45.195: W/System.err(1242): at org.mozilla.gecko.GeckoAppShell.runGecko(GeckoAppShell.java:453) 01-10 15:30:45.195: W/System.err(1242): at org.mozilla.gecko.GeckoThread.run(GeckoThread.java:107) 01-10 15:30:45.195: W/System.err(1242): Caused by: org.json.JSONException: Value null at x of type org.json.JSONObject$1 cannot be converted to double 01-10 15:30:45.195: W/System.err(1242): at org.json.JSON.typeMismatch(JSON.java:96) 01-10 15:30:45.199: W/System.err(1242): at org.json.JSONObject.getDouble(JSONObject.java:412) 01-10 15:30:45.199: W/System.err(1242): at org.mozilla.gecko.gfx.ViewportMetrics.<init>(ViewportMetrics.java:95) 01-10 15:30:45.199: W/System.err(1242): at org.mozilla.gecko.gfx.GeckoSoftwareLayerClient.updateViewport(GeckoSoftwareLayerClient.java:191) 01-10 15:30:45.199: W/System.err(1242): ... 5 more Note : fennec 20120110, Nexus S, 2.3.1
Assignee: nobody → bugmail.mozilla
tracking-fennec: --- → 11+
Priority: -- → P4
I don't really like having to touch BrowserCLH.js, but this seemed like the best option to get gScreenWidth and gScreenHeight set to reasonable values before the session restore code created new tabs with 1x1 size, which causes the problem in the bug (although it manifested a little differently for me).
Attachment #589888 - Flags: review?(pwalton)
Attachment #589888 - Flags: feedback?(mark.finkle)
Comment on attachment 589888 [details] [diff] [review] Ensure reasonable screen size is used for session-restoring tabs Review of attachment 589888 [details] [diff] [review]: ----------------------------------------------------------------- Works for me. Less 1x1 = more happiness.
Attachment #589888 - Flags: review?(pwalton) → review+
Summary: Bad viewport appears temporarily when webm video becomes in focus after restart from forcequit → Bad viewport appears after restart from forcequit
Attachment #589888 - Flags: feedback?(mark.finkle)
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Comment on attachment 589888 [details] [diff] [review] Ensure reasonable screen size is used for session-restoring tabs [Approval Request Comment] Regression caused by (bug #): none User impact if declined: when opening fennec after it has been killed, the restored tabs may not paint or may be painted at odd zoom levels (see also bug 708934 and bug 719745) Testing completed (on m-c, etc.): on m-c for a day so far, may need to bake another couple of days to make sure Risk to taking this patch (and alternatives if risky): fennec overestimates the visible area (because the display size is larger than the visible viewport size) and pages that shouldn't be scrollable are temporarily scrollable when first rendered.
Attachment #589888 - Flags: approval-mozilla-aurora?
Comment on attachment 589888 [details] [diff] [review] Ensure reasonable screen size is used for session-restoring tabs >+ DisplayMetrics metrics = new DisplayMetrics(); >+ GeckoApp.mAppContext.getWindowManager().getDefaultDisplay().getMetrics(metrics); >+ combinedArgs += " -width " + metrics.widthPixels + " -height " + metrics.heightPixels; We probably talked about this before but, why is this different than screen.width/screen.height in JS? If it's the same, could we just init gScreenXxx using screen.xxx ?
(In reply to Mark Finkle (:mfinkle) from comment #6) > We probably talked about this before but, why is this different than > screen.width/screen.height in JS? If it's the same, could we just init > gScreenXxx using screen.xxx ? screen.xxx isn't initialized at that point; it only gets set up after the first screen-size-changed event is sent, which is after the session-restored tabs get created.
Comment on attachment 589888 [details] [diff] [review] Ensure reasonable screen size is used for session-restoring tabs [Triage Comment] Mobile only - approved for Aurora.
Attachment #589888 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: