As per CSS spec here http://www.w3.org/TR/css3-background/#border-style dotted borders should be drawn
with rounded dots.
Websites for testing:
Created attachment 160386 [details]
Dotted borders patch
Maybe someone can elaborate on some aspects of the patch:
- I've enabled antialiasing since the dots look jagged otherwise. Is it ok to force it to be on in this case?
- Having AA enabled results in the dotted lines disappearing at some zoom levels. This is easily visible for lines with 1px width.
Am I doing something wrong or is this a skia bug?
- Without AA the dotted lines have a strange pattern at certain zoom levels but don't disappear no matter how thin the line is.
I'm going to attach some screenshots that show the mentioned problems.
Attachment 160386 [details] did not pass style-queue:
Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCor..." exit_code: 1
Source/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp:492: Should have only a single space after a punctuation in a comment. [whitespace/comments] 
Source/WebCore/ChangeLog:1: ChangeLog entry has no bug number [changelog/bugnumber] 
Total errors found: 2 in 3 files
If any of these errors are false positives, please file a bug against check-webkit-style.
Created attachment 160388 [details]
Screenshot showing pattern
Attached screenshot shows 2 dotted lines. The top one is drawn with AA disabled, showing the pattern. The bottom one is drawn with AA enabled.
Created attachment 160390 [details]
Screenshot showing different zoom level
Screenshot shows how the top line has artifacts on different zoom level, the bottom line disappears.
Comment on attachment 160386 [details]
Dotted borders patch
Attachment 160386 [details] did not pass chromium-ews (chromium-xvfb):
New failing tests:
Created attachment 160391 [details]
Archive of layout-test-results from gce-cr-linux-03
The attached test failures were seen while running run-webkit-tests on the chromium-ews.
Bot: gce-cr-linux-03 Port: <class 'webkitpy.common.config.ports.ChromiumXVFBPort'> Platform: Linux-2.6.39-gcg-201203291735-x86_64-with-Ubuntu-10.04-lucid
Can someone please answer my questions from comment#1?
The literals 0.01 and 0.005 are clearly fragile if we zoom in on this "dash", since we are not creating perfect circles. There is no other good way to achieve this in skia at the moment, but one is coming soon!
When that is done, we will be able to change this code to just instantiate a patheffect that explicitly stamps circles with a given size and spacing.
Discussion moved to: