Bug 94917 - [Chromium] Dotted borders not drawn with rounded dots
Summary: [Chromium] Dotted borders not drawn with rounded dots
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Martin Leutelt
URL:
Keywords:
Depends on:
Blocks: 25737
  Show dependency treegraph
 
Reported: 2012-08-24 02:53 PDT by Martin Leutelt
Modified: 2013-04-09 05:46 PDT (History)
7 users (show)

See Also:


Attachments
Dotted borders patch (5.23 KB, patch)
2012-08-24 04:00 PDT, Martin Leutelt
benjamin: review-
webkit.review.bot: commit-queue-
Details | Formatted Diff | Diff
Screenshot showing pattern (641 bytes, image/png)
2012-08-24 04:05 PDT, Martin Leutelt
no flags Details
Screenshot showing different zoom level (338 bytes, image/png)
2012-08-24 04:07 PDT, Martin Leutelt
no flags Details
Archive of layout-test-results from gce-cr-linux-03 (1.32 MB, application/zip)
2012-08-24 04:21 PDT, WebKit Review Bot
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Leutelt 2012-08-24 02:53:10 PDT
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/
Comment 1 Martin Leutelt 2012-08-24 04:00:30 PDT
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.
Comment 2 WebKit Review Bot 2012-08-24 04:03:23 PDT
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.
Comment 3 Martin Leutelt 2012-08-24 04:05:02 PDT
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.
Comment 4 Martin Leutelt 2012-08-24 04:07:43 PDT
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 5 WebKit Review Bot 2012-08-24 04:21:52 PDT
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
Comment 6 WebKit Review Bot 2012-08-24 04:21:55 PDT
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
Comment 7 Martin Leutelt 2012-09-11 05:48:42 PDT
Can someone please answer my questions from comment#1?
Comment 8 Mike Reed 2013-04-08 08:11:00 PDT
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.
Comment 9 Stephen Chenney 2013-04-09 05:46:54 PDT
Discussion moved to:

https://code.google.com/p/chromium/issues/detail?id=229100