Closed Bug 606612 Opened 14 years ago Closed 14 years ago

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

Categories

(Core :: SVG, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 407495

People

(Reporter: dholbert, Unassigned)

References

()

Details

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.
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
Closed: 14 years ago
Resolution: --- → DUPLICATE
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.