Closed
Bug 237530
Opened 20 years ago
Closed 20 years ago
CSS2 Border collapse resolution algorithm implementation error
Categories
(Core :: Layout: Tables, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: lachlan.hunt, Unassigned)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
35.90 KB,
text/html
|
Details |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040113 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040113 For some combinations of border styles for table cells, when border-collapse: collapse; is set, the incorrect border style is rendered, according to step 3 of the CSS2 border conflict resolution algorithm [1]. eg. When a cell with 'inset' is above and/or before cell with 'outset', Mozilla incorrectly renders 'inset', however 'outset' should take precedence. There are also a few other combinations with similar results. [1] http://www.w3.org/TR/CSS2/tables.html#border-conflict-resolution Reproducible: Always Steps to Reproduce: 1. Create the following table: <table> <caption>Test 9.08: inset/groove</caption> <tr> <td>groove</td><td>groove</td><td>groove</td> </tr> <tr> <td>groove</td><td class="inner">inset</td><td>groove</td> </tr> <tr> <td>groove</td><td>groove</td><td>groove</td> </tr> </table> 2. Apply this style: table { border-collapse: collapse; } td { border: 5px groove blue; color: blue; } td.inner { border: 5px inset aqua; color: aqua; } Actual Results: For the middle cell, the right and bottom borders incorrectly render as 'inset', but the top and left corectly render as 'groove' Expected Results: It should have rendered all borders as 'groove'
Reporter | ||
Comment 1•20 years ago
|
||
In this test case, the following tests show this error: 6.07, 7.06, 8.09 and 9.08
Comment 2•20 years ago
|
||
Bernd, any idea what's up here? Looking at styleToPriority in nsTableFrame.cpp, it looks like groove and outset incorrectly have the same priority, but otherwise the ordering is fine....
first of all in css 2.1 the inset - > rigde and outset -> groove identity changed http://www.w3.org/TR/2004/CR-CSS21-20040225/tables.html#border-conflict-resolution so we need to change that anyway.
so the code at http://lxr.mozilla.org/seamonkey/source/layout/html/table/src/nsTableFrame.cpp#5049 needs to be changed first
Comment 5•20 years ago
|
||
Umm.. when did that identity ever hold? Not in CSS2, certainly. See comment 0. Yeah, that code is probably what's causing the problems... we should fix that and make sure that all entries in styleToPriority are distinct (except maybe the "bg" styles").
Status: UNCONFIRMED → NEW
Ever confirmed: true
see some historical reference http://lists.w3.org/Archives/Public/www-style/1999Jan/0007.html so they needed 5 years to fix it, sounds like we are not that bad.
Comment 7•20 years ago
|
||
Oh, interesting... So we need to change that and then fix the priorities (eg inset and ridge should still have different priorities, since otherwise we'll screw up colors as we do in the attached testcase).
Comment 8•20 years ago
|
||
Except of course we look up the _output_ of GetStyleInfo in styleToPriority. Which is bad, because in that output we have (once we fix it) inset == ridge and outset == groove. But the priority order for conflict resolution is 'ridge', 'outset', 'groove', 'inset'. Yay. So inset == ridge, but ridge > outset > inset.
fixed by the checkin for bug 229883
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•