Outer <SVG> element should snap to pixel coordinates
Categories
(Core :: SVG, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox68 | --- | fixed |
People
(Reporter: jorendorff, Assigned: violet.bugreport)
References
Details
(Whiteboard: [webcompat])
Attachments
(8 files, 2 obsolete files)
1.73 KB,
text/html
|
Details | |
313 bytes,
text/html
|
Details | |
173 bytes,
text/html
|
Details | |
1.24 KB,
image/png
|
Details | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review |
Updated•14 years ago
|
Comment 1•13 years ago
|
||
Comment 2•13 years ago
|
||
Updated•13 years ago
|
Comment 3•13 years ago
|
||
Updated•13 years ago
|
Comment 4•9 years ago
|
||
Comment 5•9 years ago
|
||
Updated•9 years ago
|
Comment 6•9 years ago
|
||
Comment 8•8 years ago
|
||
Comment 9•8 years ago
|
||
Comment 10•8 years ago
|
||
Comment 11•8 years ago
|
||
Comment 12•8 years ago
|
||
Comment 13•8 years ago
|
||
Comment hidden (advocacy) |
Comment hidden (obsolete) |
Comment hidden (advocacy) |
Comment 23•6 years ago
|
||
What is the status of this bug? It’s still marked as new. Can it be closed because nothing with regards to it is going to be changed or will there be a fix?
Possible workarounds like setting "transform: translateZ(0)" or "will-change: transform" are hacks to workaround this problem. The often suggested "shape-rendering: crispEdges" makes matters worse because it allows the browser to turn off anti-aliasing for the SVG element. It’s desirable to have both anti-aliasing and alignment with the pixel grid.
Reduced test case: https://codepen.io/kleinfreund/pen/MLOWeX
Expected behavior: Both SVGs are crisp
Actual behavior: The first SVG is blurry
Reproducable in Firefox. Works fine in Chrome.
Comment 24•6 years ago
|
||
(In reply to Philipp Rudloff from comment #23)
It might not mean much, but on my system (Nightly, Linux, WebRender), the two SVGs look the same. The first one is blurry if I disable WebRender.
Comment 25•6 years ago
|
||
(In reply to Laurentiu Nicola from comment #24)
(In reply to Philipp Rudloff from comment #23)
It might not mean much, but on my system (Nightly, Linux, WebRender), the two SVGs look the same. The first one is blurry if I disable WebRender.
I see that bug on OSX. It depends on font. If text before SVG ends at pixel edge, it will look fine. Try changing text or font.
Comment 26•6 years ago
|
||
(In reply to CyberAlien from comment #25)
I see that bug on OSX. It depends on font. If text before SVG ends at pixel edge, it will look fine. Try changing text or font.
I can't manage to. https://bugzilla.mozilla.org/attachment.cgi?id=612899 is also fine for me (only with WebRender).
But of course, it might be platform-dependent. I assume you're also testing with WR and a recent Nightly?
Comment 27•6 years ago
|
||
(In reply to Laurentiu Nicola from comment #26)
(In reply to CyberAlien from comment #25)
I see that bug on OSX. It depends on font. If text before SVG ends at pixel edge, it will look fine. Try changing text or font.
I can't manage to. https://bugzilla.mozilla.org/attachment.cgi?id=612899 is also fine for me (only with WebRender).
But of course, it might be platform-dependent. I assume you're also testing with WR and a recent Nightly?
Actually no. Bug disappeared after enabling WR. So ignore my previous message, WR does make a difference.
Updated•6 years ago
|
Comment 29•6 years ago
|
||
Migrating Webcompat whiteboard priorities to project flags. See bug 1547409.
Comment 30•6 years ago
|
||
See bug 1547409. Migrating whiteboard priority tags to program flags.
Comment hidden (obsolete) |
Assignee | ||
Updated•6 years ago
|
Comment hidden (obsolete) |
Assignee | ||
Comment 36•6 years ago
|
||
Updated•6 years ago
|
Assignee | ||
Comment 39•6 years ago
|
||
The comment in nsDisplayTransform::GetTransformForRendering() clearly
says that |aOutOrigin| should return the same offset as GetTransform().
GetTransform() will pass the offset to GetResultingTransformMatrix()
which will round it in many cases to avoid subpixel blurry rendering.
But GetTransformForRendering() doesn't take this rounding into account,
thus contradicting the intent described by the comment.
This rounding is important to keep subpixel behavior consistent with
or without webrender enabled. Currently, SVG will be rendered blurry
in some cases if it's at a subpixel position. After fixing the problem
in non-webrender case, the strange blur still occurs in webrender case.
It turns out to be caused by this inconsistency.
Comment 40•6 years ago
|
||
Assignee | ||
Comment 41•6 years ago
|
||
Comment 42•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/3dddcde1fde6
https://hg.mozilla.org/mozilla-central/rev/75abef5719a7
https://hg.mozilla.org/mozilla-central/rev/5a252b843ac8
Comment 49•6 years ago
|
||
Comment 50•6 years ago
|
||
bugherder |
Description
•