Open
Bug 1096885
Opened 11 years ago
Updated 3 years ago
SVG image as CSS background has left edge flattened/cropped, with fractional pixel sizing & positioning
Categories
(Core :: SVG, defect)
Tracking
()
NEW
People
(Reporter: yem_salat, Unassigned)
References
Details
Attachments
(2 files)
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:36.0) Gecko/20100101 Firefox/36.0
Build ID: 20141101211637
Steps to reproduce:
http://codepen.io/anon/pen/yyBZKG
Actual results:
The left side is slightly cut off when background-size is 100%
http://i.imgur.com/oX4x1S7.png
Expected results:
Shouldn't be cut out at all, works correctly in Chrome and Opera (Blink)
Exemple: http://codepen.io/Novitsky/pen/bNbOQg
Screenshot: http://www.imageup.ru/img278/1940138/77651918.png
Comment 3•11 years ago
|
||
Seems significantly better on trunk. https://nightly.mozilla.org/ what do you think Vladimir?
Flags: needinfo?(yem_salat)
Comment 4•11 years ago
|
||
To be clear, the screenshot from the reporter in comment 0 *is* from trunk, per the UA string in that comment. It also matches what I see on my linux nightly -- the left edge is flattened a bit.
( --> Canceling needinfo, as I think Robert might've missed the comment 0 screenshot/UA-string.)
Seth, do you know of any ongoing imagelib refactoring that might help here?
Flags: needinfo?(yem_salat) → needinfo?(seth)
Version: 36 Branch → Trunk
Comment 5•11 years ago
|
||
Here's the reporter's testcase, with the SVG simplified a bit (and encoded as a data URL), and with the HTML simplified a bit as well.
Note that the HTML has a fractional pixel values for positioning and sizing. If I change *either* the "width" value or the "padding-left" value to be a whole number, then the flattening goes away. So, this is clearly a rounding/snapping bug at some level.
Updated•11 years ago
|
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment 6•11 years ago
|
||
In Nightly, the rendering is better at default zoom level, but if I zoom out/in, I can the see the bad rendering again.
As Daniel mentioned - my screen is from nightly trunk on linux, the result is the same on on regular firefox (also linux)
Everything looks fine on a Mac.
Vladimir's screen is made on regular ff in windows 8.1, setting background-size to 99% does not help his case, I asked him to re-test on latest nightly.
Vladimir reports that on Windwows 8.1 on nightly build the situation is the same as on linux: http://www.imageup.ru/img278/1941213/77651919.png
Comment 10•11 years ago
|
||
(In reply to Daniel Holbert [:dholbert] from comment #4)
> Seth, do you know of any ongoing imagelib refactoring that might help here?
There's no ongoing refactoring that might help here. This is just a numerical accuracy bug that somehow didn't get fixed by bug 1037713.
Most of the other bugs like that involve issues with the layers system. I wonder if there's something SVG-specific here? (i.e., the bug is either in VectorImage or in the underlying SVG code)
I'll make this depend on bug 1037713 so it has a connection to the other numerical accuracy bugs.
Depends on: DrawAPIRefactor
Flags: needinfo?(seth)
Updated•11 years ago
|
Summary: SVG is displayed incorrectly, when used as background → SVG background has "flattened" left edge (with fractional pixel sizing & positioning)
Updated•11 years ago
|
Summary: SVG background has "flattened" left edge (with fractional pixel sizing & positioning) → SVG image as CSS background has left edge flattened/cropped, with fractional pixel sizing & positioning
Updated•3 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•