bugzilla.mozilla.org has resumed normal operation. Attachments prior to 2014 will be unavailable for a few days. This is tracked in Bug 1475801.
Please report any other irregularities here.

Viewing full-sized image will not allow the user to zoom out so that image will fit to screen.

NEW
Unassigned

Status

()

Core
DOM: Core & HTML
3 years ago
3 years ago

People

(Reporter: Johnt, Unassigned)

Tracking

unspecified
ARM
Gonk (Firefox OS)
Points:
---

Firefox Tracking Flags

(b2g-v2.2 affected, b2g-v2.5 affected, b2g-master affected)

Details

(Whiteboard: [2.6-Daily-Testing][Spark][Systemsfe], URL)

Attachments

(1 attachment)

(Reporter)

Description

3 years ago
Created attachment 8711806 [details]
logcat_20160125_1116.txt

Description: While viewing the image as full-sized the user will not be able to zoom out so that the image will be fitted to the device's screen. Selecting the back button arrow will be the only way in doing so. This may be by design, but I was unable to verify if so.

Repro Steps:
1) Update a Aries to 20160125140104
2) Select a medimum-large image size image using a Google search through browser.
3) Tap Image > Select Full-sized

Actual:
Image can not be zoomed out of to fit into device's screen. 

Expected:
It is expected that the user will be able to zoom out far enough so that the image is fitted to the device's screen.

Environmental Variables:
Device: Aries KK 2.6
BuildID: 20160125140104
Gaia: 4023297b16fdc46de3ddb04be4f3c575313d1cde
Gecko: 3f41d7d0f544ebd98273e39bd945c28878a47427
Gonk: a19052e4389c3ae2d8fc3e7a74a475401baacc56
Version: 46.0a1 (2.6) 
Firmware Version: D5803_23.1.A.1.28_NCB.ftf
User Agent: Mozilla/5.0 (Mobile; rv:46.0) Gecko/46.0 Firefox/46.0

Repro frequency: 4/4
See attached: Logcat & Video 

Video: https://youtu.be/fiktqMDryTk
(Reporter)

Comment 1

3 years ago
This issue DOES occur on Flame 2.6 and Flame 2.5
Result: Image cannot not be zoomed out of so that it will fit into the device's screen.

Environmental Variables:
Device: Flame KK 2.6 [Full Flash] (512mb)
BuildID: 20160125030234
Gaia: 4023297b16fdc46de3ddb04be4f3c575313d1cde
Gecko: 67c66c2878aed17ae3096d7db483ddbb2293c503
Gonk: 205ac4204bbbb2098a8046444acba551ba5dc75a
Version: 46.0a1 (2.6) 
Firmware Version: v18D
User Agent: Mozilla/5.0 (Mobile; rv:46.0) Gecko/46.0 Firefox/46.0

Environmental Variables:
Device: Flame KK 2.5 [Full Flash] (512mb
BuildID: 20160122182929
Gaia: 53ba710af4baa6ea89f07f5d4bca36dc05476136
Gecko: a93cb087427579663dc1e72b835a35cbcf9baaba
Gonk: 205ac4204bbbb2098a8046444acba551ba5dc75a
Version: 44.0 (2.5) 
Firmware Version: v18D
User Agent: Mozilla/5.0 (Mobile; rv:44.0) Gecko/44.0 Firefox/44.0
QA Whiteboard: [QAnalyst-Triage?]
status-b2g-v2.5: --- → affected
status-b2g-master: --- → affected
Flags: needinfo?(ktucker)
Whiteboard: [2.6-Daily-Testing][Spark][Systemsfe]
Is this a regression from 2.2 or just specific images that cannot be zoomed out?
QA Whiteboard: [QAnalyst-Triage?]
Flags: needinfo?(ktucker)
Keywords: qawanted
(Reporter)

Comment 3

3 years ago
This is NOT a regression from Flame 2.2
Result: The image still appears unformatted to fit the device's screen.

Environmental Variables:
Device: Flame 2.2
BuildID: 20160112032503
Gaia: 885647d92208fb67574ced44004ab2f29d23cb45
Gecko: d8847129d134
Gonk: bd9cb3af2a0354577a6903917bc826489050b40d
Version: 37.0 (2.2) 
Firmware Version: v18D
User Agent: Mozilla/5.0 (Mobile; rv:37.0) Gecko/37.0 Firefox/37.0
QA Whiteboard: [QAnalyst-Triage?]
status-b2g-v2.2: --- → affected
Flags: needinfo?(ktucker)
Keywords: qawanted
Johan, I tried this on iOS and Android but there is not a full screen option like FxOS. Can you take a look at this?
QA Whiteboard: [QAnalyst-Triage?] → [QAnalyst-Triage+]
Flags: needinfo?(ktucker) → needinfo?(jlorenzo)
I managed to achieve with an Android phone with Firefox for Android[1]. I took the same velociraptor image. After I tapped "Full screen" in Google's image website, I got the image scaled and I was able to zoom in. 

I looked at the DOM in both Fennec and FxOS and here, what I got:

Fennec
> <html>
> <head>
>   <meta content="width=device-width; height=device-height;" name="viewport">
>   <link href="resource://gre/res/ImageDocument.css" rel="stylesheet">
>   <link href="resource://gre/res/TopLevelImageDocument.css" rel="stylesheet">
>   <link href="chrome://global/skin/media/TopLevelImageDocument.css" rel="stylesheet">
>   <title>Velociraptor-detail-header.png (PNG Image, 1043&nbsp;×&nbsp;463 pixels) - Scaled (39%)</title>
> </head>
> 
> <body><img class="transparent shrinkToFit" alt="http://vignette2.wikia.nocookie.net/jurassicpark/images/1/12/Velociraptor-detail-header.png/revision/latest?cb=20150420213742" src="http://vignette2.wikia.nocookie.net/jurassicpark/images/1/12/Velociraptor-detail-header.png/revision/latest?cb=20150420213742"
>   height="181" width="408"></body>
> </html>

Firefox OS
> <html>
> <head>
>   <meta content="width=device-width; height=device-height;" name="viewport">
>   <link href="resource://gre/res/ImageDocument.css" rel="stylesheet">
>   <link href="resource://gre/res/TopLevelImageDocument.css" rel="stylesheet">
>   <link href="chrome://global/skin/media/TopLevelImageDocument.css" rel="stylesheet">
>   <title>Velociraptor-detail-header.png (PNG Image, 1043&nbsp;×&nbsp;463 pixels)</title>
> </head>
> 
> <body><img class="overflowing transparent" alt="http://vignette2.wikia.nocookie.net/jurassicpark/images/1/12/Velociraptor-detail-header.png/revision/latest?cb=20150420213742" src="http://vignette2.wikia.nocookie.net/jurassicpark/images/1/12/Velociraptor-detail-header.png/revision/latest?cb=20150420213742"></body>
> 
> </html>

Thanks to the help of :vingtetun, I leaned that this DOM is generated by Gecko in [2]. He noticed bug 1233762, where a similar case was handled for Fennec. Based on this patch, you can call document.shrinkToFit(). I tried in Firefox OS (with WebIDE), and the image got resized and I was able to pinch to zoom. 

With Vivien's advice, one solution could be to add a similar call to shrinkToFix() if the document is an ImageDocument.


[1] Firefox for Android version: Nightly 20160127030236
[2] https://dxr.mozilla.org/mozilla-central/rev/aa90f482e16db77cdb7dea84564ea1cbd8f7f6b3/dom/html/ImageDocument.cpp
[3] https://dxr.mozilla.org/mozilla-central/rev/aa90f482e16db77cdb7dea84564ea1cbd8f7f6b3/dom/browser-element/BrowserElementChildPreload.js#1877
Component: Gaia::Browser → DOM: Core & HTML
Flags: needinfo?(jlorenzo)
Product: Firefox OS → Core
See Also: → bug 1233762
You need to log in before you can comment on or make changes to this bug.