Table borders: top right bottom painted 1px too thick

NEW
Unassigned

Status

()

Core
Layout: Tables
7 years ago
7 years ago

People

(Reporter: Julian D. A. Wiseman, Unassigned)

Tracking

2.0 Branch
x86
Mac OS X
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [bugday-20110513])

Attachments

(6 attachments)

(Reporter)

Description

7 years ago
User-Agent:       Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:2.0.1) Gecko/20100101 Firefox/4.0.1
Build Identifier: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:2.0.1) Gecko/20100101 Firefox/4.0.1

If making a simple table with something like 
{border-collapse: collapse;  border-style: solid;  border-color: #009900;  border-width: 4px;}
then the top, right and bottom borders are painted one pixel too thick, but the left border is painted correctly. Thus the left border looks anomalously thin. 

Attachments are a simple HTML example; a screen shot of that; and that same screen shot with the corners of the tables manually edited to highlight the error.

Reproducible: Always
(Reporter)

Comment 1

7 years ago
Created attachment 529458 [details]
HTML test case of too-thick borders
(Reporter)

Comment 2

7 years ago
Created attachment 529460 [details]
PNG of test case of too-thick borders
(Reporter)

Comment 3

7 years ago
Created attachment 529461 [details]
PNG of test case of too-thick borders, with corners edited to highlight error and facilitate counting

Updated

7 years ago
Attachment #529458 - Attachment mime type: text/plain → text/html
Status: UNCONFIRMED → NEW
Component: General → Layout: Tables
Ever confirmed: true
Product: Firefox → Core
QA Contact: general → layout.tables
Whiteboard: [bugday-20110513]

Comment 4

7 years ago
This seems to work correctly on Win XP at 100% page zoom. However I get uneven borders when zooming in (above 100%) but that is probably by design and is caused by rounding.
Version: unspecified → 2.0 Branch
The whole thing is a rounding issue.  The problem is that you're asking for integer-width borders at non-integer layout positions and the collapsed table border drawing code is not very good at that: instead of antialiasing them it just draws them solid over the entire area they cover....

Comment 6

7 years ago
I understand this to be the case for my comment. Do you also mean it for the original report? I cannot reproduce the bug also with linux so the platform seems to be set correctly.
Yes, I mean it for the original report.  If I explicitly set the table width to an integer width (200px, say), the left and right borders both paint 4px wide for the 4px case; if I leave it at its intrinsic non-integer width, the right border (which is at a non-integer position, unlike the left border) ends up 5px wide.
(Reporter)

Comment 8

7 years ago
Apologies for late follow-up. 

Specifying the table width and height does indeed change the problem, by fixing the right margin. Top and bottom are still one pixel too thick, so the corners still look wrong. 

New test case follows.
(Reporter)

Comment 9

7 years ago
Created attachment 534140 [details]
HTML test case of too-thick borders, with table width and height specified
(Reporter)

Comment 10

7 years ago
Created attachment 534141 [details]
PNG test case of too-thick borders, with table width and height specified
(Reporter)

Comment 11

7 years ago
Created attachment 534142 [details]
PNG test case of too-thick borders, corners edited, with table width and height specified
You need to log in before you can comment on or make changes to this bug.