Closed Bug 109806 Opened 23 years ago Closed 23 years ago

Unclosed <p> before <table> results in wrong document tree

Categories

(Core :: DOM: HTML Parser, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 91927
mozilla1.2alpha

People

(Reporter: george, Assigned: harishd)

References

()

Details

(Keywords: regression, testcase)

Attachments

(1 file)

From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.5) Gecko/20011013 BuildID: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.5) Gecko/20011013 If you set margin and indent (and maybe other) style attributes for the <p> tag, tables withing the <p> tag are very messed up. In the two examples given (see urls) the first demostrates the problem while the second demonstrates the fix by closing the paragraph before the table. Bad bug as many existing pages break. Reproducible: Always Steps to Reproduce: 1.see examples (url's given) 2. 3.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Similar to bug 94269. The test cases activate the quirks mode but the problem also occurs in the standards mode, although <table> should close <p> implicitly. -> Parser
Assignee: attinasi → harishd
Blocks: html4.01
Component: Layout → Parser
QA Contact: petersen → moied
Summary: paragraph styles wreak havoc with tables within a <p> → Unclosed <p> before <table> results in wrong document tree
Content model: docshell=00B53D30 html@02750850 refcount=8< head@02750760 refcount=2< Text@0279B470 refcount=2<\n> base@0279B380 href=http://www.datstat.com refcount=2<> Text@027546D0 refcount=2<\n> style@02754610 type=text/css refcount=2< Text@027755D0 refcount=2<\r\nP {text-indent: 2em; margin-top: .5em; margin -bottom: .5em;}\r\n> > > Text@0279B8A0 refcount=3<\n> body@02776040 refcount=3< Text@02D566B0 refcount=3<\n> form@02D565F0 refcount=3< > Text@02D64840 refcount=3<\n> hr@02D64980 refcount=5<> Text@02D677E0 refcount=3<\n> p@02D64710 refcount=3< Text@02D607D0 refcount=3<question:\n\n> table@02D629D0 cellspacing=0 cellpadding=1 border=1 width=100% refcount=15 < Text@02D653A0 refcount=2<\n> tbody@02D655B0 refcount=3< tr@02D668E0 refcount=3< Text@02D66880 refcount=2<\n> td@02D67650 refcount=4< Text@02D66700 refcount=3<\u00a0\u00a0\u00a0\u00a0> > td@02D66640 refcount=4< Text@02D64270 refcount=3<\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a 0\u00a0> > Text@02D64210 refcount=2<\n> td@02D641B0 refcount=4< img@02D62E50 src=/images/stronglydisagree.gif border=0 refcount=3< > > Text@02D6C070 refcount=2<\n> td@02D6CF20 refcount=4< img@02D6C920 src=/images/disagree.gif border=0 refcount=3<> > Text@02D6E440 refcount=2<\n> td@02D6FFC0 refcount=4< img@02D6E270 src=/images/slightlydisagree.gif border=0 refcount=3< > > Text@02D6FF60 refcount=2<\n> td@02D6CA40 refcount=4< img@02D6B8B0 src=/images/neutral.gif border=0 refcount=3<> > Text@02D6B920 refcount=2<\n> td@02D6B850 refcount=4< img@02D6D1B0 src=/images/slightlyagree.gif border=0 refcount=3<> > Text@02D69950 refcount=2<\n> td@02D6D150 refcount=4< img@02D6C790 src=/images/agree.gif border=0 refcount=3<> > Text@02D6C800 refcount=2<\n> td@02D6C6C0 refcount=4< img@02D6C5F0 src=/images/stronglyagree.gif border=0 refcount=3<> > Text@02D6C660 refcount=2<\n> td@02D6C4F0 refcount=4< img@02D6C300 src=/images/unanswered-gray.gif border=0 refcount=3<> > Text@02D6E210 refcount=2<\n> > Text@02D6C240 refcount=2<\n> tr@02D6DD20 bgcolor=#ffffff refcount=3< Text@02D6DB70 refcount=2<\n> td@02D6DB10 refcount=4< img@02D6DA40 src=/images/qpointer.gif border=0 refcount=3<> > Text@02D6D870 refcount=2<\n> td@02D6D810 width=100% refcount=4< Text@02D6D660 refcount=3<statement:> > Text@02D6D9E0 refcount=2<\n> td@02D6D5C0 refcount=4< input@02D6D460 type=radio name=_QsT_PLCY01 value=1 refcount=3<> > Text@02D6B180 refcount=2<\n> td@02D6B120 refcount=4< input@02D6B050 type=radio name=_QsT_PLCY01 value=2 refcount=3<> > Text@02D71E50 refcount=2<\n> td@02D748E0 refcount=4< input@02D70400 type=radio name=_QsT_PLCY01 value=3 refcount=3<> > Text@02D75CE0 refcount=2<\n> td@02D76590 refcount=4< input@02D74670 type=radio name=_QsT_PLCY01 value=4 refcount=3<> > Text@02D6B0C0 refcount=2<\n> td@02D746E0 refcount=4< input@02D70CE0 type=radio name=_QsT_PLCY01 value=5 refcount=3<> > Text@02D7D0D0 refcount=2<\n> td@02D7FE40 refcount=4< input@02D79220 type=radio name=_QsT_PLCY01 value=6 refcount=3<> > Text@02D7F460 refcount=2<\n> td@02D7E660 refcount=4< input@02D7B890 type=radio name=_QsT_PLCY01 value=7 refcount=3<> > Text@02D7EC60 refcount=2<\n> td@02D7DB60 refcount=4< input@02D7DA90 type=radio name=_QsT_PLCY01 value=-9 checked=checke d refcount=3<> > Text@02D7DB00 refcount=2<\n> > Text@02D7FA10 refcount=2<\n> > > Text@02D7A3D0 refcount=3<\n\n> Text@02D7A310 refcount=3<\n> > > > Note: IE allows P to contain TABLE and so do we. Changing this behavior would regress bug 43678. IMO this is a layout bug not parser. --> layout
Assignee: harishd → attinasi
Component: Parser → Layout
QA Contact: moied → petersen
Severity: major → normal
Target Milestone: --- → mozilla1.2
harishd: The parser should not allow TABLE to contain P in standards mode. There is a general content model issue here: a DOM tree created by reading a correct HTML file should never have a TABLE inside a P.
Component: Layout → Parser
OS: Linux → All
Hardware: PC → All
HTML 4.0 Strict test case should demonstrate the problem in "standards" mode.
back to harishd...
Assignee: attinasi → harishd
Keywords: testcase
QA Contact: petersen → moied
Regression. I believe this was working fine until the fix to bug 43678 was checked in.
Keywords: regression
*** This bug has been marked as a duplicate of 91927 ***
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: