Closed
Bug 710126
Opened 13 years ago
Closed 12 years ago
images wider than they are long can't be fully viewed
Categories
(Firefox for Android Graveyard :: General, defect, P3)
Tracking
(blocking-fennec1.0 -, fennec11+)
VERIFIED
FIXED
People
(Reporter: akeybl, Assigned: kats)
References
Details
(Whiteboard: [MTD])
Attachments
(3 files, 1 obsolete file)
Web pages that are wider than they are long can't be viewed in full. This is especially an issue with images and presumably video.
Reporter | ||
Comment 1•13 years ago
|
||
See https://bug706667.bugzilla.mozilla.org/attachment.cgi?id=580811 on a phone in portrait mode. This may be specific to images, haven't tested elsewhere.
Reporter | ||
Updated•13 years ago
|
Whiteboard: [MTD]
Reporter | ||
Comment 2•13 years ago
|
||
Reporter | ||
Comment 3•13 years ago
|
||
Updated•13 years ago
|
Attachment #581531 -
Attachment mime type: text/plain → image/png
Updated•13 years ago
|
Attachment #581530 -
Attachment mime type: text/plain → image/png
Comment 4•13 years ago
|
||
recommend a P2 fix. this is a lousy user experience
Updated•13 years ago
|
OS: Linux → Android
Hardware: Other → ARM
Updated•13 years ago
|
Priority: -- → P3
Updated•13 years ago
|
tracking-fennec: --- → 11+
Comment 5•12 years ago
|
||
Is this still an issue in current builds?
Reporter | ||
Comment 6•12 years ago
|
||
(In reply to Martijn Wargers [:mw22] (QA - IRC nick: mw22) from comment #5) > Is this still an issue in current builds? Yes, as of 3 days ago this was still a problem with all images wider than they are long. Are you unable to reproduce or something?
Can you please try again with the latest build and if this occurs, can you place in the device you used? This does not reproduce for us with the latest build.
Reporter | ||
Comment 8•12 years ago
|
||
(In reply to Naoki Hirata :nhirata from comment #7) > Can you please try again with the latest build and if this occurs, can you > place in the device you used? This does not reproduce for us with the > latest build. Today's build (3/5). 1) Go to http://1.bp.blogspot.com/-j14W8K8Yvug/TbnWYj9gUQI/AAAAAAAADZM/sNgtfe4-c3M/s1600/beautiful-blue-bird-wallpaper+1+%25281%2529.jpg 2) Cannot zoom out to view full image because it is wider than it is long
Updated•12 years ago
|
blocking-fennec1.0: --- → ?
Summary: pages wider than they are long can't be fully viewed → images wider than they are long can't be fully viewed
Updated•12 years ago
|
blocking-fennec1.0: ? → -
Reporter | ||
Comment 9•12 years ago
|
||
Not fixing this for our 1.0 means we're OK with direct image viewing being functionally broken for presumably half of the images on the internet at release.
Assignee | ||
Comment 11•12 years ago
|
||
Assignee: nobody → bugmail.mozilla
Status: NEW → ASSIGNED
Attachment #608477 -
Flags: review?(chrislord.net)
Comment 12•12 years ago
|
||
Comment on attachment 608477 [details] [diff] [review] Scale images to fit on load Review of attachment 608477 [details] [diff] [review]: ----------------------------------------------------------------- r+ with the comment below addressed. ::: mobile/android/chrome/content/browser.js @@ +2220,5 @@ > // and then use the metadata to figure out how it needs to be updated > ViewportHandler.updateMetadata(this); > > + // for images, scale to fit width > + if (contentDocument instanceof ImageDocument) { Might be nice to stick the above this.setResolution into an else clause here, so that they don't ever accidentally get re-ordered... Also, the tab's viewport meta-data will be out of date after this call (as ViewportHandler.updateMetadata(this) is called above), is this intentional?
Attachment #608477 -
Flags: review?(chrislord.net) → review+
Assignee | ||
Comment 13•12 years ago
|
||
(In reply to Chris Lord [:cwiiis] from comment #12) > Might be nice to stick the above this.setResolution into an else clause > here, so that they don't ever accidentally get re-ordered... Also, the tab's > viewport meta-data will be out of date after this call (as > ViewportHandler.updateMetadata(this) is called above), is this intentional? Are you referring to the setResolution that's above the updateMetadata call? The order of calls here is important, yes, and I think needs to be done in exactly the way I wrote it. First we reset the zoom to "default". Then we run updateMetadata, which figures out the right CSS viewport and *scales* the zoom to match. Note that it doesn't clobber the default zoom, but uses it as a factor in the calculation of the new zoom, so setting the "default" zoom must be done beforehand. (Note that updateMetadata gets called from other places as well so we have to do that scaling relative to the existing zoom instead of just coming up with some absolute zoom). Finally, after setting the CSS viewport (which affects page size), we can figure out what zoom we need to make image-pages fit based on the new page size. Does that make sense? I think the only real bit of redundancy with my patch as written is that the updateMetadata call (at the end of updateViewportSize) sets a resolution and sends a viewport update that is immediately clobbered by the new code I added. However this is only the case for image documents. (Actually, now that I'm looking at the whole code path, the sendViewportUpdate() I had you leave in this before-first-paint handler is not needed because the updateMetadata will do that anyway. I can move it into the image document if-condition if you prefer).
Comment 14•12 years ago
|
||
(In reply to Kartikaya Gupta (:kats) from comment #13) > (In reply to Chris Lord [:cwiiis] from comment #12) > > Might be nice to stick the above this.setResolution into an else clause > > here, so that they don't ever accidentally get re-ordered... Also, the tab's > > viewport meta-data will be out of date after this call (as > > ViewportHandler.updateMetadata(this) is called above), is this intentional? > > Are you referring to the setResolution that's above the updateMetadata call? > The order of calls here is important, yes, and I think needs to be done in > exactly the way I wrote it. First we reset the zoom to "default". Then we > run updateMetadata, which figures out the right CSS viewport and *scales* > the zoom to match. Note that it doesn't clobber the default zoom, but uses > it as a factor in the calculation of the new zoom, so setting the "default" > zoom must be done beforehand. (Note that updateMetadata gets called from > other places as well so we have to do that scaling relative to the existing > zoom instead of just coming up with some absolute zoom). > > Finally, after setting the CSS viewport (which affects page size), we can > figure out what zoom we need to make image-pages fit based on the new page > size. Does that make sense? > > I think the only real bit of redundancy with my patch as written is that the > updateMetadata call (at the end of updateViewportSize) sets a resolution and > sends a viewport update that is immediately clobbered by the new code I > added. However this is only the case for image documents. (Actually, now > that I'm looking at the whole code path, the sendViewportUpdate() I had you > leave in this before-first-paint handler is not needed because the > updateMetadata will do that anyway. I can move it into the image document > if-condition if you prefer). I think moving it to the if-condition and adding a comment in said block explaining this would be good.
Assignee | ||
Comment 15•12 years ago
|
||
Updated comments and moved the sendViewportUpdate into the if block. Re-requesting review (please be as harsh as you like, I want to make sure this code is understandable and correct...)
Attachment #608477 -
Attachment is obsolete: true
Attachment #608703 -
Flags: review?(chrislord.net)
Comment 16•12 years ago
|
||
Comment on attachment 608703 [details] [diff] [review] Scale images to fit on load (v2) Review of attachment 608703 [details] [diff] [review]: ----------------------------------------------------------------- Comments read well to me, r+, but comment below may be something to consider. ::: mobile/android/chrome/content/browser.js @@ +2232,5 @@ > + // the MozScrolledAreaChanged event. If that didn't happen, the updateMetadata > + // call above does so at the end of the updateViewportSize function. As long > + // as that is happening, we don't need to do it again here. > + > + if (contentDocument instanceof ImageDocument) { Out of interest, do we want to do something similar for SVGDocument too? And videos? Maybe it'd be better to do a !(contentDocument instanceof HTMLDocument) instead?
Attachment #608703 -
Flags: review?(chrislord.net) → review+
Assignee | ||
Comment 17•12 years ago
|
||
(In reply to Chris Lord [:cwiiis] from comment #16) > Out of interest, do we want to do something similar for SVGDocument too? And > videos? Maybe it'd be better to do a !(contentDocument instanceof > HTMLDocument) instead? Unfortunately we can't just do !(contentDocument instanceof HTMLDocument) because all ImageDocuments are also HTMLDocuments. But yeah, it makes sense to do this for SVGDocument as well. I don't know what video ends up as, will try to find out.
Assignee | ||
Comment 18•12 years ago
|
||
So it appears that the VideoDocument and MediaDocument interfaces are not exposed to JS, so we can't really do the same for those types. SVGs are already fit to width because gecko rescales SVG images to fit in the CSS viewport if needed, and bug 712065 took care of making sure it shows up ok (I verified that it still works in latest code). So while it is kind of annoying that we can't do this consistently across all non-HTML document types, I think is the best we can do for now. https://hg.mozilla.org/integration/mozilla-inbound/rev/aa32e30bab34
Target Milestone: --- → Firefox 14
Assignee | ||
Updated•12 years ago
|
status-firefox13:
--- → affected
status-firefox14:
--- → fixed
Comment 20•12 years ago
|
||
(In reply to Kartikaya Gupta (:kats) from comment #18) > So it appears that the VideoDocument and MediaDocument interfaces are not > exposed to JS, so we can't really do the same for those types. You can use "if (contentDocument.mozSyntheticDocument)" to check for all of those types (see bug 719271 for example).
Comment 21•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/aa32e30bab34
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Comment 22•12 years ago
|
||
Verified fixed in today's build on the Samsung Galaxy Nexus.
Status: RESOLVED → VERIFIED
status-firefox13:
affected → ---
status-firefox14:
fixed → ---
Target Milestone: Firefox 14 → ---
Updated•3 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•