New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 613972 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner: ----
Closed: Nov 2016
Cc:
Components:
EstimatedDays: ----
NextAction: 2016-11-21
OS: Windows
Pri: 2
Type: Bug



Sign in to add a comment

SVG sprite icons show misplaced

Reported by sedue...@gmail.com, May 23 2016

Issue description

UserAgent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2746.0 Safari/537.36

Example URL:

Steps to reproduce the problem:
1. Create a CSS style with a SVG Sprite background 
2. Set a background position and background size for some of icons from the sprite
3. Check the results

What is the expected behavior?
The icons should be aligned as they are on Stable version of Chrome

What went wrong?
Icons are cropped from the container.

Does it occur on multiple sites: Yes

Is it a problem with a plugin? No 

Did this work before? Yes In version 50 is working right

Does this work in other browsers? Yes 

Chrome version: 53.0.2746.0  Channel: canary
OS Version: 6.1 (Windows 7, Windows Server 2008 R2)
Flash Version: Shockwave Flash 22.0 r0

We are developing a new website (that's the reason I can't provide a public URL) and we have figured out that the icons that are working fine on every browser (Stable chrome on every OS too) do not work only on Chrome Canary version. (Stable version 50 vs Canary 52 and Canary 53)
 

Comment 1 by f...@opera.com, May 23 2016

Components: -Blink Blink>SVG
If you are able to provide a very simple example (a fiddle say) that would be really helpful for the triage process.

Also, is this with HiDPI or not?

Comment 2 by sedue...@gmail.com, May 23 2016

I'm going to upload an example as fast as I can. Its without HiDPI. Sorry if I miss something, this is my first bug report

Comment 3 by f...@opera.com, May 23 2016

That sounds great!

Comment 4 by sedue...@gmail.com, May 24 2016

Hi again, I've asked for permission to my boss and finally I could upload this piece of code http://www.seduerey.com/_/issue-613972/

If you watch it with Chrome 50, logo and "face" are shown in place but in Chrome 52 they're cropped.

Comment 5 by davve@opera.com, May 24 2016

Cc: davve@opera.com
Interestingly enough, I see the cropping you mention of logo and face icon in Firefox but not in my (old) google-chrome-unstable (51.0.2700.0).

A newer google-chrome-unstable (52.0.2723.2) has the same cropped look as my Firefox though so something seems to have changed between 51.0.2700.0 and 52.0.2723.2.

Comment 6 by sedue...@gmail.com, May 24 2016

So ... do you think is this a bug or maybe was bugged before? :)

Comment 7 by davve@opera.com, May 24 2016

It's this change:

https://chromium.googlesource.com/chromium/src/+/c53a0d93dd13a025e65668dda879f78142459e04

We changed how we treat viewBox with non-integer values, so it now rounds viewBox the same as the width and height values. Since we're now equal to Firefox I'd like to chalk it up as a progression, but there is so much heuristics involved with sub-pixel background image drawing that I'm not sure.

In general I would recommend against using non-integer width and heights for SVG sprite maps. Since traditionally spriting on the web have been done with raster graphics, which are only integer sized, the heuristics are optimized for that.

I'm not sure what it would mean in your case, but that's what I can say right now.

Comment 8 by sedue...@gmail.com, May 24 2016

Thanks, I'm going to discuss it with my people here.
Labels: Needs-Feedback
Cc: brajkumar@chromium.org
seduerey@ - Any update on this bug? Could you please update this bug with your latest behavior by checking this issue in latest chrome canary M53-53.0.2780.0. 
seduerey@ Could you please confirm are you still seeing this issue on latest version 54.0.2825.0?please update the thread.

Thanks,
NextAction: 2016-11-21
Status: WontFix (was: Unconfirmed)
Closing due to lack of feedback.

Sign in to add a comment