Closed Bug 712065 Opened 13 years ago Closed 13 years ago

SVG image is only partially visible

Categories

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

All
Android
defect

Tracking

(firefox11 verified, firefox12 verified, fennec11+)

VERIFIED FIXED
Firefox 12
Tracking Status
firefox11 --- verified
firefox12 --- verified
fennec 11+ ---

People

(Reporter: mpk, Assigned: kats)

Details

(Whiteboard: [MTD])

Attachments

(2 files)

Attached image simple testcase (deleted) —
When loading an SVG image, Fennec at first sizes the initial viewport correctly. But it then zooms in so the image is only partially visible. You can zoom further in, but you can't zoom out. Aurora, Beta and the releases seem to work okay.
Whiteboard: [MTD]
Assignee: nobody → bugmail.mozilla
Priority: -- → P3
This might be related to the way we get the document size. SVG documents might need to use a different method. In the old days we used this code: http://hg.mozilla.org/releases/mobile-1.1/file/b28b396278b1/chrome/content/BrowserView.js#l170 if (cdoc instanceof SVGDocument) { let rect = cdoc.rootElement.getBoundingClientRect(); return [Math.ceil(rect.width), Math.ceil(rect.height)]; } In the current code, we might need to add a check like this here: http://mxr.mozilla.org/mozilla-central/source/mobile/android/chrome/content/browser.js#1310
tracking-fennec: --- → 11+
OS: All → Android
Attached patch Patch (deleted) — Splinter Review
Did the thing from comment #1 but slightly modified so that the page is large enough to display the SVG centered.
Attachment #590869 - Flags: review?(mark.finkle)
Comment on attachment 590869 [details] [diff] [review] Patch A little strange but OK. Have you tried loading a few different SVG images using this patch? Wikipedia usually has a bunch.
Attachment #590869 - Flags: review?(mark.finkle) → review+
I tried loading a bunch of sample SVGs I found using google. I'll try some Wikipedia ones too before landing. Try push: https://tbpl.mozilla.org/?tree=Try&rev=088b95dce8e0
Target Milestone: --- → Firefox 12
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Comment on attachment 590869 [details] [diff] [review] Patch [Approval Request Comment] Regression caused by (bug #): none User impact if declined: loading SVG documents sometimes shows them cropped and generally acts weird Testing completed (on m-c, etc.): on m-c Risk to taking this patch (and alternatives if risky): mobile only
Attachment #590869 - Flags: approval-mozilla-aurora?
Comment on attachment 590869 [details] [diff] [review] Patch [Triage Comment] Mobile only - approved for Aurora.
Attachment #590869 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Verified fixed on Nightly 13.0a1 (2012-02-02) Aurora 12.0a2 (2012-02-02) Device: Samsung Galaxy S2 (Android 2.3.4)
Status: RESOLVED → VERIFIED
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: