Bug 19651

Summary: Corners are jagged when border styles don't match and border radius is less than border width
Product: WebKit Reporter: Alex Taylor <darwin>
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: mitz, simon.fraser
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Mac   
OS: OS X 10.5   
Bug Depends on:    
Bug Blocks: 19655    
Attachments:
Description Flags
Test case that shows the vertical sides of the border extended too far
none
View of the artifacts from drawArc none

Description Alex Taylor 2008-06-18 04:40:23 PDT
Border Radii smaller than Border Width don't render correctly when different sides have different styles.

The current way of drawing border radii covers up an issue with drawArc when the radius is smaller than the thickness. This issue doesn't cause problems until the colours are different on intersecting sides as the logic in RenderObject::paintBorder covers the artifacts with the vertical sides of the box.

One way to fix this issue is to alter drawArc to not exhibit the artifacts and draw the arc correctly and then it is a fairly small change to paintBorder to make the vertical sides of the box retract to the edges of the radius corners.
Comment 1 Alex Taylor 2008-06-18 04:42:15 PDT
Created attachment 21814 [details]
Test case that shows the vertical sides of the border extended too far

This test case shows the vertical borders protruding into the top and bottom border. They do this currently to cover artifacts caused by the way strokeArc works the radius of an arc is smaller than the arc's thickness.
Comment 2 Alex Taylor 2008-06-18 04:51:06 PDT
Created attachment 21815 [details]
View of the artifacts from drawArc

This picture shows what happens at the corners when the vertical sides are not rendered (commented out in RenderObject). The drawArc function and in turn the strokeArc function draws the arc but ends up spilling inside the arc because the thickness was greater than the radius. The outside half of the corners is the correct rendering.
Comment 3 mitz 2008-06-18 09:32:25 PDT
See bug 9197 for some work in progress on this.
Comment 4 Simon Fraser (smfr) 2011-04-17 15:01:21 PDT
I don't think this happens any more.