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: http://www.w3schools.com/cssref/tryit.asp?filename=trycss_border-style http://dev.harnos.at/webkit/border-bug/
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] [5] Source/WebCore/ChangeLog:1: ChangeLog entry has no bug number [changelog/bugnumber] [5] 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): Output: http://queues.webkit.org/results/13574725 New failing tests: editing/inserting/editing-empty-divs.html css2.1/t170602-bdr-conflct-w-43-d.html css2.1/t170602-bdr-conflct-w-45-d.html css2.1/t170602-bdr-conflct-w-42-d.html css2.1/t0805-c5517-brdr-s-00-c.html fast/borders/borderRadiusAllStylesAllCorners.html css2.1/t170602-bdr-conflct-w-46-d.html css2.1/t170602-bdr-conflct-w-47-d.html css2.1/t170602-bdr-conflct-w-74-d.html fast/borders/0px-borders.html css2.1/t170602-bdr-conflct-w-44-d.html fast/backgrounds/repeat/negative-offset-repeat.html fast/borders/borderRadiusDotted05.html fast/backgrounds/repeat/mask-negative-offset-repeat.html css2.1/t170602-bdr-conflct-w-34-d.html css2.1/t170602-bdr-conflct-w-64-d.html css2.1/t170602-bdr-conflct-w-94-d.html fast/borders/border-mixed-alpha.html css2.1/t170602-bdr-conflct-w-54-d.html fast/backgrounds/repeat/negative-offset-repeat-transformed.html css1/box_properties/border_style.html css2.1/t170602-bdr-conflct-w-84-d.html css2.1/t170602-bdr-conflct-w-24-d.html css2.1/t170602-bdr-conflct-w-41-d.html css2.1/t170602-bdr-conflct-w-04-d.html css2.1/t170602-bdr-conflct-w-14-d.html css2.1/t170602-bdr-conflct-w-48-d.html css2.1/t170602-bdr-conflct-w-49-d.html
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! skbug/1214 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: https://code.google.com/p/chromium/issues/detail?id=229100