<tr> without <td> or <th>

RESOLVED WONTFIX

Status

()

P3
normal
RESOLVED WONTFIX
17 years ago
14 years ago

People

(Reporter: andy, Assigned: harishd)

Tracking

Trunk
mozilla1.5beta
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment)

(Reporter)

Description

17 years ago
Most other browsers seem to handle a table without any table data <td> or table
header <th> cells inside of a table row <tr> even though it isn't  compliant
with the HTML 4.01 spec. IT may be worth supporting this flaw because there a
numerous poorly built table which display poorly in Mozilla.

i.e., 

<table>
<tr>test data that should be in a table data tag</tr>
<tr>more text</tr>
</table>

If you have bgcolors or other items specified for the <tr> tag you get some 
interesting results.

Updated

17 years ago
Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P4

Comment 1

17 years ago
using dom inspector to browse the url,
it seems that dom model of it is something wrong.

Comment 2

17 years ago
it is parser's bug, I think.
Component: HTMLTables → Parser

Comment 3

17 years ago
I found that 
<table><td>xx</table>
parser will add <tbody><tr> into it,
but if it meet
<table><tr>xxx</table>
it dont insert <td> into it.

Assignee: karnaze → harishd
Severity: minor → major
OS: Windows 2000 → All
Priority: P4 → P3
Hardware: PC → All

Comment 4

17 years ago
http://www.w3.org/TR/CSS2/tables.html#anonymous-boxes
according to css2 spec 17.2.1 5.
"If a child T of a 'table-row' element P is not a 'table-cell' element, an
object corresponding to a 'table-cell' element will be generated between P and T."

I think it is a bug that dont compatible with CSS2.
Keywords: css2
This has nothing to do with CSS2.  That quote refers to CSS tables, not HTML
tables, and refers to the rendering model, not the DOM model.  We handle that in
frame code anyway, since it needs to work for arbitray CSS tables.
s/arbitray/arbitrary/, of course.
Keywords: css2

Comment 7

17 years ago
    Since  when parser meet <table><td>, it will create <tbody> and <tr> inside
them, I still think that when parser meet <tr>text, it should create <td> inside
them, it will affect DOM model .
    
I think it is reasonable. Anyone wanna work on a fix? I think we want to wait
for Harish to come back to review the fix, this is not urgent.

Comment 9

17 years ago
Created attachment 93367 [details] [diff] [review]
patch 0.1

Comment 10

17 years ago
testcase: <table><tr>text

I found that when parser meet 'Text', its parent is '<tr>', parser will omit 'Text',
when parser process is nearly finished, parser will insert 'Text' as child of
'<Body>'.

So I make patch 0.1.
1. make change to CanOmit(), so in that case, parser will continue to handle token, 
2. make change to CanPropagate(), when the parent tag is '<tr>' and the child
isnot '<td>', it will call CreateContextStackFor() to create '<td>' and handle it.

3. add some judgement to make it works with some special testcase such as
'<table><tr><tr>Text' or '<table><tr></tr><tr>Text'.

Comment 11

16 years ago
*** Bug 161347 has been marked as a duplicate of this bug. ***

Updated

16 years ago
Blocks: 159359

Updated

16 years ago
No longer blocks: 159359
Is there a reason you're using a global variable rather than a member variable?

Comment 13

16 years ago
I dont think mPropagateTd is a member of CNavDTD logically,
but I need it to hold status when called in different functions.
so make it as global state variable.
(Assignee)

Updated

16 years ago
Severity: major → normal
Target Milestone: --- → mozilla1.5beta
IE doesn't do this. Emulating IE in this case requires more code than I feel is
strictly necessary. I'm WONTFIXing this based on that.
Status: NEW → RESOLVED
Last Resolved: 14 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.