[Webkit-unassigned] [Bug 195968] New: border collapsing: subpixels can make table-cell with smaller border width "win" over table with larger width
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Mar 19 15:33:12 PDT 2019
https://bugs.webkit.org/show_bug.cgi?id=195968
Bug ID: 195968
Summary: border collapsing: subpixels can make table-cell with
smaller border width "win" over table with larger
width
Product: WebKit
Version: Safari Technology Preview
Hardware: Unspecified
OS: macOS 10.13
Status: NEW
Severity: Normal
Priority: P2
Component: Layout and Rendering
Assignee: webkit-unassigned at lists.webkit.org
Reporter: dgrogan at chromium.org
CC: bfulgham at webkit.org, simon.fraser at apple.com,
zalan at apple.com
http://w3c-test.org/css/css-tables/subpixel-collapsed-borders-003.html passes in hi-dpi but fails in low-dpi. Its essence is:
<table style="border-collapse: collapsed; border-width:5.95px">
<td style="border-width:5px"></td>
</table>
In the collapsed border resolution algorithm, Safari (and Firefox) presumably use border widths after they've been rounded to device pixels. In the test above, the table's 5.95px border should beat the cell's 5px border.
But rounding causes 5.95px to round down to 5px on a 1x ratio device. So the table and cell have the same widths. When the widths are the same, the cell beats the table. On a 2x device, 5.95px is rounded to 5.5px, making the table beat the cell.
The pre-rounded width should be used in the algorithm so that colors don't change based on the user's device pixel ratio.
(I filed an identical Firefox bug at https://bugzilla.mozilla.org/show_bug.cgi?id=1536646)
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20190319/43a4ca5c/attachment-0001.html>
More information about the webkit-unassigned
mailing list