Closed
Bug 1195779
Opened 11 years ago
Closed 2 years ago
Svg image element position issue when devicePixelRatio >1
Categories
(Core :: SVG, defect)
Tracking
()
RESOLVED
INCOMPLETE
People
(Reporter: u536868, Unassigned)
Details
Attachments
(1 file)
|
464.97 KB,
image/png
|
Details |
User Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2478.0 Safari/537.36
Steps to reproduce:
I have two div elements with absolute position defined in integer pixels, and they contain an svg image. The two images are side-by-side, without a gap. For example devicePixelRatio is 2. The user scrolls the page.
Actual results:
The div elements get positioned to subpixels (actual screen pixels), but the svg images always start on logical pixels (thus only at even screen pixels, given devicePixelRatio = 2). This causes a pixel gap to appear between the images. In case of non-integer devicePixelRatio values, the width of the gap can even be less than a screen pixel.
See https://jsfiddle.net/hhcofcmds/gnd9zj4w/2/, and the attached screenshot.
Expected results:
The svg image should be positioned aligned to its containing div.
Updated•3 years ago
|
Severity: normal → S3
Comment 1•2 years ago
|
||
The images are gone now.
Status: UNCONFIRMED → RESOLVED
Closed: 2 years ago
Resolution: --- → INCOMPLETE
You need to log in
before you can comment on or make changes to this bug.
Description
•