Bug 24498

Summary: Dotted and Dashed Borders Causing Various Problems
Product: WebKit Reporter: Jeremy Norris <kuaera>
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: manyoso
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Linux   
Attachments:
Description Flags
HTML Testcase Source
none
Screenshot of HTML Testcase
none
Fix for Qt port oliver: review+

Description Jeremy Norris 2009-03-10 13:02:53 PDT
[Using QtWebkit from Qt4.5.0]

Attached are test cases [source HTML and image] for several issues;
First, the "double" border style causes the next following instance of a dotted or dashed border to render the top with 1px width.
Second,  nesting a div with a border inside of a div with a 1px dashed or dotted causes the child div to overlap the left border, as if the whole child div were moved up and to the left by one pixel.
Third, the dotted border actually features short dashes instead of the expected dots, and the left and right borders do not render all the way to the bottom of the div. Bottom border is potentially a pixel too low.
Comment 1 Jeremy Norris 2009-03-10 13:04:05 PDT
Created attachment 28448 [details]
HTML Testcase Source
Comment 2 Jeremy Norris 2009-03-10 13:04:42 PDT
Created attachment 28449 [details]
Screenshot of HTML Testcase
Comment 3 Adam Treat 2009-03-10 14:17:29 PDT
For the "Third" problem I have tested and confirmed that this is a problem with QPen.  It does not draw dots when the width of the pen != 0 (e.g. it is not cosmetic).  Investigating the rest and looking for solutions to the "Third" problem.
Comment 4 Adam Treat 2009-03-11 08:02:48 PDT
Another update about the "Third" problem.  When I use -graphicssystem raster then it draws with dots even if not using cosmetic pen.  This indicates the dashes with non-cosmetic pens is a problem in Qt with qpaintengine_x11.cpp.

Also, I've found that there is a problem with the bottom border no matter the paint engine.  This is most likely an off-by-one error somewhere in the border drawing code in RenderObject or in GraphicsContextQt.cpp. Still trying to nail it down.
Comment 5 Adam Treat 2009-03-12 19:59:25 PDT
Created attachment 28570 [details]
Fix for Qt port

A refactor to share this code between the ports will follow.
Comment 6 Adam Treat 2009-03-12 20:10:51 PDT
Landed with r41659.