[Webkit-unassigned] [Bug 157567] outermost SVG currentScale should only scale SVG Element

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri May 13 12:21:02 PDT 2016


https://bugs.webkit.org/show_bug.cgi?id=157567

--- Comment #12 from Mathias Menzel <self at mathiasmenzel.de> ---
Please correct if I am wrong or if that does not make sense.

I didn't want to start of with the discussion, if currentScale and currentTranslate do the same thing, but my intent was to say, that, even so they are specified to operate on the same object, they don't.

I read the specs so, that it starts with the zoomAndPan attribute on an outermost SVG Element (http://www.w3.org/TR/SVG/single-page.html#interact-ZoomAndPanAttribute). If that is set to "disable", currentScale and currentTranslate are unchangeable (i.e. set to 1 and (0,0)).
For user interactable environments (browsers), this attribute defaults to "magnify", so the user agent should enable panning and zooming on the SVG document fragment (acc. to specs - Mozilla explicitly states that they did not implement that).

So zooming is changing the currentScale of the SVG object fragment (not the whole embedding page) and panning changes the currentTranslate implicitly (that's why currentTranslate is marked readonly in the specs, currentTranslate shouldn't be settable by the user directly, but is now).
Lastly the overflow comes in and does what overflow does in CSS2+ (that's why there should be scrollbars I assume, just like on fixed width DIVs with "overflow:scroll", that's what has to be wrapped round SVG to be scrollable, but shouldn't be necessary). This all only applies to outermost SVG Elements.

In regards to a zoomed-in page (cmd+) the zoom-in on SVG Objects should still be possible. So the page zoom enlargens the whole page alright, but if I mouseover an SVG document fragment I would expect only the SVG to zoom (e.g. by strg+mousscroll) and pan (e.g. by dragging the SVG), similar to DIVs with overflow content, when scrolled.
On SVG document fragments, the scroll would set the currentScale, the pan would set the currentTranslate. And the whole page scale would not touch the descriptive SVG Object, but most likely would do the scale by other means (I checked other browsers, e.g. IE keeps currentScale to 1 when whole page is scaled), which probably should not be part of this thread.

The said behaviour would allow multiple SVG document fragments with complex content in parallel on one page, each being pan- and zommable and still keeping image like SVGs not being zoomable by defining zoomAndPan="disable" explicitly on the embedded SVG.

Makes sense?

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20160513/c6444235/attachment.html>


More information about the webkit-unassigned mailing list