Bug 154980

Summary: Subpixel rendering: Make collapsed borders painting subpixel aware.
Product: WebKit Reporter: zalan <zalan>
Component: Layout and RenderingAssignee: zalan <zalan>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, esprehn+autocc, glenn, hyatt, kondapallykalyan, nvasilyev, simon.fraser
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description zalan 2016-03-03 12:53:25 PST
Collapsed borders with odd pixel width should paint on subpixel position.
Comment 1 zalan 2016-03-03 13:00:00 PST
Created attachment 272772 [details]
Patch
Comment 2 Dave Hyatt 2016-03-03 13:42:26 PST
Comment on attachment 272772 [details]
Patch

r=me
Comment 3 WebKit Commit Bot 2016-03-03 15:55:43 PST
Comment on attachment 272772 [details]
Patch

Clearing flags on attachment: 272772

Committed r197524: <http://trac.webkit.org/changeset/197524>
Comment 4 WebKit Commit Bot 2016-03-03 15:55:47 PST
All reviewed patches have been landed.  Closing bug.
Comment 5 Nikita Vasilyev 2016-03-04 21:32:06 PST
The following CSS still doesn't draw any borders.

table {border-collapse: collapse}
td {border: 0.5px solid red}

Is it expected?
Comment 6 Nikita Vasilyev 2016-03-04 21:34:05 PST
*** Bug 150383 has been marked as a duplicate of this bug. ***
Comment 7 zalan 2016-03-04 21:34:34 PST
(In reply to comment #5)
> The following CSS still doesn't draw any borders.
> 
> table {border-collapse: collapse}
> td {border: 0.5px solid red}
> 
> Is it expected?

it is still blocked on bug 150383. I soon have a patch to address it.
Comment 8 zalan 2016-03-04 21:45:21 PST
(In reply to comment #5)
> The following CSS still doesn't draw any borders.
> 
> table {border-collapse: collapse}
> td {border: 0.5px solid red}
> 
> Is it expected?
I need to think about it a bit, but according to the spec 0.5px should be rounded off to 1px on retina displays. see https://www.w3.org/TR/CSS2/tables.html#collapsing-borders

"Borders are centered on the grid lines between the cells. User agents must find a consistent rule for rounding off in the case of an odd number of discrete units (screen pixels, printer dots)."