Closed
Bug 172213
Opened 23 years ago
Closed 20 years ago
Problems with TABLE border=x rules=none
Categories
(Core :: Layout: Tables, defect, P3)
Core
Layout: Tables
Tracking
()
RESOLVED
FIXED
Future
People
(Reporter: bugzilla, Unassigned)
References
Details
(Keywords: testcase)
Attachments
(2 files)
When rules="none" is specified, then NO RULES should appear between cells of the
table
- regardless of the border attribute (present or not; with an integer value or not)
- regardless of an border-collapse css declaration
Reproducible: always. XP Pro SP1 and using 2002100208.
The problem arises from litteraly understanding an "implies" as a "should" or as
a "must".
HTML 4.01 section 11.3.1 Borders and rules
http://www.w3.org/TR/html401/struct/tables.html#adef-rules
goes:
"The value 'border' in the start tag of the TABLE element should be interpreted
as the value of the frame attribute. It implies rules='all' and some default
(non-zero) value for the border attribute."
But rules="none" should override this.
http://www.w3.org/TR/html4/sgml/dtd.html#TFrame
says:
"The RULES attribute defines which rules to draw between cells: If RULES is
absent then assume: 'none' if BORDER is absent or BORDER=0 otherwise 'all'."
But nowhere the HTML 4.01 spec suggests or says that if the table attribute
border="x" is declared, then it should override rules="none" and display table
rules.
Complete self-explanatory test case coming.
Reporter | ||
Comment 1•23 years ago
|
||
The first 3 tables in the test case render table rules despite the inclusion of
the table attribute rules="none" in the code. There should be no rules between
cells in the first 3 tables.
The 4th (and last) table in the test case is rendered accordingly.
![]() |
||
Comment 2•23 years ago
|
||
Confirming; over to a more reasonable component....
Assignee: attinasi → karnaze
Status: UNCONFIRMED → NEW
Component: Layout → HTMLTables
Ever confirmed: true
OS: Windows XP → All
QA Contact: petersen → amar
Hardware: PC → All
Updated•23 years ago
|
Priority: -- → P3
Updated•23 years ago
|
Target Milestone: --- → Future
Comment 3•23 years ago
|
||
This bug is something strange. I move first table to last position and produce
a completely different result -- rules="none" apply correctly?
Comment 4•23 years ago
|
||
O'k. I see first part of trouble:
1431 if (NS_STYLE_BORDER_SEPARATE == tableStyle->mBorderCollapse) {
1432 // Set the cell's border from the table in the separate border
model. If there is a border
1433 // on the table, then the mapping to rules=all will take care of
borders in the collapsing model.
1434 nsHTMLValue value;
1435 aAttributes->GetAttribute(nsHTMLAtoms::border, value);
1436 if (((value.GetUnit() == eHTMLUnit_Pixel) &&
1437 (value.GetPixelValue() > 0)) ||
1438 (value.GetUnit() == eHTMLUnit_Empty)) {
1439 if (aData->mMarginData->mBorderWidth->mLeft.GetUnit() ==
eCSSUnit_Null)
1440 aData->mMarginData->mBorderWidth->mLeft.SetFloatValue(1.0f,
eCSSUnit_Pixel);
So this if have no check to rule="none", and even rule="none" it paint border.
Reporter | ||
Comment 5•23 years ago
|
||
I confirm (XP Pro SP1, build 2003012008) the strange behavior you see. I noticed
a similar behavior when doing the initial testcase. This behavior seems to be
related to the way Mozilla handles, parses the border-collapse property.
You are right! The chunk of code you listed suggests that Mozilla will paint
borders around cells even if rules="none" is declared.
FWIW, the html.css file gives:
table {
display: table;
border-spacing: 2px;
border-collapse: separate;
(...)
}
table[rules] {
border-collapse: collapse;
}
The default behavior of the rules attribute is rules="all" as long as the border
attribute is declared and implies a positive value:
"(...) If RULES is absent then assume: 'none' if BORDER is absent or BORDER=0
otherwise 'all'."
http://www.w3.org/TR/html4/sgml/dtd.html#TFrame
Comment 6•22 years ago
|
||
mass reassign to default owner
Assignee: karnaze → table
QA Contact: amar → madhur
Target Milestone: Future → ---
Updated•22 years ago
|
Target Milestone: --- → Future
Reporter | ||
Updated•20 years ago
|
Flags: blocking-aviary1.1?
Keywords: clean-report,
testcase
Reporter | ||
Comment 7•20 years ago
|
||
The fix/patch in attachment 188342 [details] [diff] [review] from bug 299723 has fixed this bug. Both
testcases from attachment 101453 [details] and attachment 112626 [details] render expected results
with Deer Park alpha 2 rv: 1.8b3 build 20050708 under XP Pro SP2.
Resolving as FIXED
Thank you Boris :)
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Updated•20 years ago
|
Flags: blocking-aviary1.1?
You need to log in
before you can comment on or make changes to this bug.
Description
•