Closed
Bug 184104
Opened 22 years ago
Closed 21 years ago
hr inside table cell loses width on certain css values
Categories
(Core :: Layout, defect, P3)
Tracking
()
RESOLVED
FIXED
Future
People
(Reporter: ve3ll, Unassigned)
References
Details
(Keywords: regression, testcase)
Attachments
(3 files, 1 obsolete file)
User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.2.1) Gecko/20021130 Build Identifier: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.2.1) Gecko/20021130 the following html code illustrates a problem when hr element is inside a table cell. css properties text-align and whitespace force hr to nil removing either one will allow hr to be full width. the width property can be used to force it but not if RELATIVE measure, ie 100px works 100% doesn't work .... very peculiar bug that occurs in all gecko products i will not even mention that gecko uses background property and msie/opera uses color .... that gets into the lack of standards and no clarity in the w3 css recommendation (read politics). the width think is a BUG although very obscure... it is for the anal retentive to find and another kindred soul to fix ;-] ;-] ;-] <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>Rule Test</title> <style type="text/css"> hr {color:green; background:red; margin:0px; padding:0px} th {width:130px; white-space:nowrap; text-align:left;} </style> </head> <body> <h1>Rule Test</h1> <table summary="*"> <tr> <th><hr></th> </table> <hr> </body> </html> Reproducible: Always Steps to Reproduce: 1. run the included html code 2. take out one of the offending properties (text-align|whitespace) and rerun 3. try setting hr width property with either absolute or relative measure have fun --- simple to find, once you know where to look. it cost me hours to find why my rules were not showing up in sidebar navigation. Actual Results: hr is reduced to dot instead of being width of table cell Expected Results: view with opera arf arf no that aint right the rule should default to the width of the cell minus any default boxing effect. it is a mystery why only the intersection of these two elements cause a problem... and why doesnt relative work to fix ???
Comment 1•22 years ago
|
||
->Style
Assignee: asa → dbaron
Component: Browser-General → Style System
QA Contact: asa → ian
Comment 3•22 years ago
|
||
regression between trunk builds 2002061108 and 2002061304, same as bug 154776. probably a regression from bug 141054. marking NEW
Comment 4•22 years ago
|
||
Comment 5•22 years ago
|
||
testcase for the right bug
Attachment #108618 -
Attachment is obsolete: true
Reporter | ||
Comment 6•22 years ago
|
||
note to testers from original submitter if i change doctype to strict by removing word transitional the behaviour changes to that expected --- width of the box so it may have something to do with quirks mode --- quirks mode must mean make it quirky ;-] ;-] ;-]
Updated•22 years ago
|
Priority: -- → P3
Target Milestone: --- → Future
Comment 7•22 years ago
|
||
The same bug, but a demonstration that you don't need any CSS foolery to trip over it: a simple <HR> in a <PRE> in a simple <TABLE> will do it. Also, a workaround: wrap the <HR> to be </PRE><HR><PRE>.
Updated•22 years ago
|
Attachment #113445 -
Attachment mime type: text/plain → text/html
Comment 8•21 years ago
|
||
This will happen any time the <hr> is reflowed with an unconstrained available width and never reflowed with a constrained available width after that....
Could this have something to do with the resize reflow optimization in the block frame code (which I suspect is entirely bogus)? (See nsBlockFrame::PrepareResizeReflow and nsLineBox::ResizeReflowOptimizationDisabled.)
Comment 10•21 years ago
|
||
I just tried changing ResizeReflowOptimizationDisabled() to return PR_TRUE in all cases and that did not help the testcases in this bug....
Comment 11•21 years ago
|
||
wasn't hr in quirks mode a synonym for hack
Comment 12•21 years ago
|
||
isnt this a dupe of bug 60992? (http://bugzilla.mozilla.org/show_bug.cgi?id=60992#c23)
Comment 14•21 years ago
|
||
the way to get rid of the hack is shown in bug 38370
Comment 15•21 years ago
|
||
Patch in bug 38370 is in. Is this still an issue?
Reporter | ||
Comment 16•21 years ago
|
||
original reporter ran his test case with today's and the hr now spans 130 px ie. width of table cell rather than the offending dot (assumed no width to cell) can flag bug as repaired. thank you for the fix
Comment 17•21 years ago
|
||
Fixed by bug 38370
You need to log in
before you can comment on or make changes to this bug.
Description
•