If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

Consider scaling viewport by full page zoom factor, for any SVG document that has a viewBox.

RESOLVED DUPLICATE of bug 407495

Status

()

Core
SVG
RESOLVED DUPLICATE of bug 407495
7 years ago
7 years ago

People

(Reporter: dholbert, Unassigned)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

7 years ago
STEPS TO REPRODUCE:
 1. Load a SVG file that has a viewBox -- e.g. http://svgvspng.com/en.svg
 2. Zoom in with Ctrl +/-, or Ctrl-mousehweel

CURRENT BEHAVIOR:
 No change in appearance -- SVG's viewBox continues to map to our browser's viewport, per the spec.  (see  longsonr's description in bug 606360 comment 10 for more detail)

CHROME'S BEHAVIOR:
 Chrome effectively scales up the browser's viewport to be *larger (or smaller) than the window* (adding scrollbars if necessary).  So conceptually, the viewBox still maps to a viewport -- it's just that only part of the viewport is in view. :)
  e.g. at 2x zoom, the SVG content is twice as wide and twice as tall as our window. (and only ~1/4 of it is visible at a time)
  NOTE: If you change Chrome's window-size while zoomed, the SVG content resizes to remain twice as wide as the window.

As roc points out in bug 606360 comment 11, we might want to change to match Chrome's behavior here.  Our current behavior makes some sense, per bug 606360 comment 10, but it's kinda bad from a UX perspective because it might appear that full-page-zoom isn't working.

Comment 1

7 years ago
We've already got a bug about how to improve zooming with things that are always a fixed proportion of the page size. It discusses width="100%" but a viewBox is pretty much the same thing.
Status: NEW → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 407495

Comment 2

7 years ago
Even if bug 407495 isn't a duplicate currently, we should just have one bug which is "figure out if we should make zoom do something in cases like percentages and viewBoxes where it doesn't"
You need to log in before you can comment on or make changes to this bug.