Closed Bug 157047 Opened 19 years ago Closed 18 years ago

Problems with 'border-collapse:collapse'

Categories

(Core :: Layout: Tables, defect, P2)

defect

Tracking

()

RESOLVED FIXED
Future

People

(Reporter: tapio.markula, Assigned: bernd_mozilla)

References

()

Details

(Keywords: testcase)

Attachments

(4 files)

Mozilla 1.1a support now border-collapse:collapse, but it has difficulties, in tables, which has been defined this CSS. It has problems render all borders correctly:

See
http://www.nic.fi/~tapio1/Teaching/CSSTableProp.php3 

Mozilla doesn't render all borders; the quantity or rendered borders is NOT always the same. If you compare this page with Opera 6.0x you can see, how Opera renders the table much better.

In addition Mozilla doesn't render borders of the main menu on top-left correctly (on the state :hover the link 'Other sites' has not the bottom border). 

http://www.nic.fi/~tapio1/Teaching/Model25b.html 

Borders might be randomly too wide and some border are missing and table cells might be too wide - the browser renders borders SOMETIMES correctly sometimes not. WHEN the browser renders them corretly, the result is much better than in Opera 6.04.

The problem is the fact, that implementations are not stable. My tables are hard task for browsers, I know. It is not possible to create a simple test case for this, because my tables shows problems in hard tasks.

Requests:

Please, check also the content of the tables:
http://www.nic.fi/~tapio1/Teaching/CSSTableProp.php3
http://www.nic.fi/~tapio1/Teaching/CSSTable.php3

Could someone tell me, which is the first Mozilla, which support the collapsing borders model. The date and version (for example Mozilla 1.0a)
> which is the first Mozilla, which support the collapsing borders model

0.9.9.

Could you possibly post a screenshot of Opera's rendering?  You can attach it to
this bug using http://bugzilla.mozilla.org/attachment.cgi?bugid=157047&action=enter

Thanks!
OK.  I see the problem.  After loading the page, force repaints of parts of the
table by dragging another window over it.  The width of the borders changes.
Assignee: attinasi → karnaze
Status: UNCONFIRMED → NEW
Component: Layout → HTMLTables
Ever confirmed: true
OS: other → All
QA Contact: petersen → amar
Hardware: PC → All
I've just stumbled across this bug while writing a database-driven site that
generates a timetable using HTML and CSS. I was seeing an extra border extend
outside some of the cells I placed borders around. After reading this bug, I
tried opening another window and dragging it over the top of the incorrectly
drawn borders. Sure enough, this caused them to change length.

I've uploaded a static version of the page, which can be found at:
http://timetables.dhs.org/border-collapse-bug.html

It'd be nice to get this tracked down...! It's interesting to note that in IE,
the Lecture cell on Friday is missing its border on the left hand side under
where the Thursday 9am lecture finishes.

I'm on WinXP, build 2002-07-14-04. I've run the CSS and HTML through the W3's
validator services to make sure it's not a coding error, and they both report
the code is fine (I thought it may have been something wrong with the TD tags
and ROWSPANing).
Priority: -- → P2
I'm not seeing any problems (including the one Boris mentioned), but there are a
lot of urls mentioned and they are long. I did notice that Opera has problems
aligning borders on the edges of tables,
http://www.nic.fi/~tapio1/Teaching/Model25b.html looks very bad in Opera. Can
someone state a simple way to reproduce a problem. 
I've fixed the server containing the URL posted in comment 4 - the problem can
be seen visiting:

http://timetables.dhs.org/border-collapse-bug.html

and observing the incorrect border behaviour.
Target Milestone: --- → Future
Reproduced in branch build. Mozilla/5.0 (Windows; U; Windows NT 5.1; en-CA;
rv:1.0.2) Gecko/20021120 Netscape/7.01. Minimised testcase in comment #6.

Keywords: testcase
Blocks: 192658
Attached patch patchSplinter Review
The patch is a cumulative patch it also includes the patches from bug 141660,
bug 182879 and bug 191731, which have been reviewed previously to some extent.
The patch will improve the border collapse code as soon as rowspans are involved
and seems to me like low risk. I tested the patch against the testcase list in
the original border collapse bug 41262.
Assignee: karnaze → bernd_mozilla
Attachment #114601 - Flags: superreview?(roc+moz)
Attachment #114601 - Flags: review?(jkeiser)
Attachment #114601 - Flags: superreview?(roc+moz) → superreview+
Comment on attachment 114601 [details] [diff] [review]
patch

OK, while I haven't grokked why, you said the 6000 chunk needed work on IRC. 
Everything else looks ok except if you could possible put a comment next to
those "|| (lastBottomBorder.index != cellEndRowIndex + 1)"'s you added saying
what the point of them is--i.e. you are testing whether the previous cell we
looked at had the same rowspan as the current cell, in which case the bottom
borders would be the same.  I'd also personally prefer that that be an if
(!startSeg) { ... } instead of a cryptic || statement, but that's just a
suggestion, do what you want.  (Yes, I know you are just copying code that does
an ||).

Awaiting patch with 6000 chunk fixed.
Attachment #115024 - Flags: review?(jkeiser)
Comment on attachment 115024 [details] [diff] [review]
patch with johns comments

r=me with s/startseg/startSeg ;)
Attachment #115024 - Flags: review?(jkeiser) → review+
Attachment #114601 - Flags: review?(jkeiser) → review-
fix checked in
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
I still see problems with testcase from comment 6. Build 2003022404 Win2K.

Left ant top borders of table are not drawn. They appear correctly after
refresh, reload etc. To reproduce I need to clear cache.
(I saw the same problems on themes.mozdev.org site)
the remaining paint issue is bug 155955
You need to log in before you can comment on or make changes to this bug.