New issue
Advanced search Search tips

Issue 753521 link

Starred by 6 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 2
Type: Bug


Participants' hotlists:
Indispensable-for-Project-V


Sign in to add a comment

Referenced SVG all wibbly-wobby when nothing is supposed to change

Reported by philipp....@gmail.com, Aug 8 2017

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.31 Safari/537.36

Steps to reproduce the problem:
See http://bl.ocks.org/Herst/da06ec62b68939d9b4a67e9feed6ccf3 for a testcase. Zoom in for a more massive effect.

What is the expected behavior?
When preserveAspectRatio is set to a certain value so that the aspect ratio is kept and the position of the image unchanged as the length of a certain side is increased (e.g. as in the test case increasing the width above a certain point while the size is limited by the height and preserveAspectRatio set so that the image stays on the left side) then there should be no visible change in the image.

What went wrong?
Parts of the image are moving erratically or being stretched/squeezed (wibbly-wobbly), which looks like something which is the effect of rounding/quantization errors. Worse of all, the effect increases with increased zooming.

Did this work before? No 

Does this work in other browsers? No
 In Mozilla Firefox the wibbly-wobbliness also occurs but does not intensify when the zoom level is increased.
In Microsoft Internet Explorer and Microsoft Edge the issue does not occur.

Chrome version: 61.0.3163.31  Channel: beta
OS Version: 10.0
Flash Version: 

(This is a real problem I am seeing in a d3.js-heavy project.)
 
Components: Blink>SVG
Labels: Needs-Triage-M61

Comment 2 by f...@opera.com, Aug 9 2017

Labels: -Pri-2 OS-Linux OS-Mac Pri-3
Status: Available (was: Unconfirmed)
Cc: pdr@chromium.org rbasuvula@chromium.org
Labels: -Pri-3 M-62 Pri-2
Status: Untriaged (was: Available)
Tested the issue on chrome Beta #61.0.3163.31 and Canary #62.0.3180.0 in Windows 7 and was able to reproduce the issue.

This is a Non-Regression issue since seeing this from M45 #45.0.2404.0, Making the status to Untriaged so that the issue would get addressed.

Note : Able to reproduce the issue in MAC 10.12.6 and Linux Ubuntu 14.04.

Thank you.
Labels: -Needs-Triage-M61 BugSource-User PaintTeamTriaged-20170809
Owner: schenney@chromium.org
Status: Assigned (was: Untriaged)
We seem to be computing something off the width then using it for the height, when the height is the thing that is stable. My guess is that we are using round when we should be flooring, but I also suspect that other stuff will break if we change it.
I simplified the test case a little bit and added a red <rect> below the embedded SVG which when visible also points towards a problem.

(On a side note, the font behaves better now, maybe it played a role that in the old version the font size was 5px but transformed up.)
Forget what I previously said about fonts, it might be dependent on platform/font.

Attached is a video showing the original issue (and while at it also showing also the font issue on a Linux desktop platform, the distro is OpenSUSE Tumbleweed and the font is Liberation Serif.)
wobbly.ogv
6.3 MB View Download
Standalone link for testing (taken from iFrame in original link)
http://bl.ocks.org/Herst/raw/da06ec62b68939d9b4a67e9feed6ccf3/8ccae8ad6b3f37c297684fd326308df436cce148/
The fundamental problem is that platform/Image only handles integer sizes, which forces rounding of SVG and other generated image content. We then use the rounded values in computing the aspect ratio which generates floating point values for painting. If the underlying image size was not rounded, the aspect ratio calculations would probably be close to an integer in this case.

I think it might be time to finally change blink::Image to report floating point sizes.
Files for posterity.
cr753521.html
832 bytes View Download
cr753521-referenced.svg
1.0 KB Download
Firefox (Gecko) bug report for similar (but less pronounced) issue: https://bugzil.la/1394148

Sign in to add a comment