Closed Bug 1198307 Opened 9 years ago Closed 8 years ago

256px tile boundaries visible on OS X with SVG stroke

Categories

(Core :: SVG, defect)

40 Branch
All
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla48

People

(Reporter: jonathan.olson, Unassigned)

References

Details

(Keywords: regression)

Attachments

(2 files, 2 obsolete files)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.155 Safari/537.36 Steps to reproduce: View this minimal example in Firefox on OS X (also available at http://www.colorado.edu/physics/phet/dev/olsonjb/firefox-lines.html) <!DOCTYPE html> <!-- Shows buggy lines in Firefox, see https://github.com/phetsims/scenery/issues/451 --> <html> <head></head> <body style="padding: 0px; margin: 0px;"> <svg width="640" height="480"> <g transform="translate(5,5)"> <rect x="0" y="0" width="630" height="470" style="fill: none; stroke: black; stroke-width: 0.5;"></rect> </g> </svg> </body> </html> This has been tested with Firefox 40.0 on a MacBook Air (OS X 10.9.5) and a MacBook Pro (OS X 10.10.4). We have not been able to trigger it on Windows. Other platforms untested. More information (if necessary) is at https://github.com/phetsims/scenery/issues/451, and let me know if there's anything else I can provide. Actual results: It displays not just the rectangle, but also a 256px grid on the inside of the rectangle (in the stroked color). A screenshot of the output is attached. Expected results: Just the outer stroked rectangle should be displayed.
Attached image test.svg (obsolete) —
user's testcase simplified further
Component: Untriaged → SVG
Product: Firefox → Core
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Unspecified → Mac OS X
Hardware: Unspecified → All
Manually reversing the patch from bug 1123019 corrects this.
Blocks: 1123019
Attached patch 1198307.txt (obsolete) — Splinter Review
Assignee: nobody → longsonr
Attachment #8653470 - Flags: review?(mstange)
I could probably create a reftest using a rect with a really long stroke dash I think (assuming I'm on the right lines with the code change).
Can you explain why your patch fixes the problem? As far as I can tell, you're just not shortening the line if it's not dashed. But why is shortening it a problem? And why is it not a problem as soon as the line is dashed in any way?
If the line is dashed then it's only going to be a problem if the dash period is some divisor of the tile size so that the clipped rect's sides are exactly on the tile boundary. I think you're right that the fix isn't quite right but I'm not quite sure what to do to fix it. If the stroke (when shortened) ends up exactly on the boundary (or near enough to it that its stroke width makes it renderable) it will be visible.
Attachment #8653470 - Attachment is obsolete: true
Attachment #8653470 - Flags: review?(mstange)
Assignee: longsonr → nobody
I'm not sure what the right fix is here.
Assignee: nobody → mstange
In case the developers haven't already figured this one out: I noticed in my duplicate #1202155 that this problem only seems to be visible with sub-integer stroke-wid4ths. My example attachment in that issue had a stroke-width of 0.5 (as does the example here), but the grid disappears for me if I change the stroke-width to 1. Also of note is that this problem does not appear (at default zoom) on Retina displays, or at least not for my example. I had to click Command-- to zoom out one level to see the problem. For users with non-Retina displays, the problem was apparent right away.
Cannot reproduce - working for me Version 49.0a1 Build ID 20160527030220 User Agent Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:49.0) Gecko/20100101 Firefox/49.0
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → WORKSFORME
Attachment #8652452 - Attachment is obsolete: true
The boxes are twice the size which is why my reduced testcase looks OK now but the original testcase still shows extraneous lines.
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
This bug was "fixed" by switching content drawing to use Skia in bug 1207332, and then removing the code that had the bug in bug 1258751.
Assignee: mstange → nobody
Status: REOPENED → RESOLVED
Closed: 9 years ago8 years ago
Depends on: skia-osx
Resolution: --- → FIXED
Target Milestone: --- → mozilla48
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: