Closed Bug 22842 Opened 25 years ago Closed 24 years ago

<map><p></map> doesn't close the <p>

Categories

(Core :: DOM: HTML Parser, defect, P2)

x86
Windows 98
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: Tanyel, Assigned: rickg)

References

()

Details

(Keywords: dataloss, Whiteboard: [nsbeta3] fix in hand)

Attachments

(3 files)

I am not certain why it does not work but the same image map works with netscape, internet explorer and opera. The image map does not change. The graphic does not display. only the counter shows.
For clarification, when I stated that the image map does not change, I meant the webpage is always the same, so the browser always fails on the same condition.
Oh, it was the windows 32-bit version m13 nightly, 12-27-99 I think. M12 did not work either.
Assignee: nobody → harishd
Component: Browser-General → Parser
Summary: image map does not work → image map does not work (various issues with <MAP>)
Sigh ... The HTML in the reported URL has this pattern: <map NAME="LusionsBlock"> <area SHAPE="RECT" COORDS="132,25,211,91" HREF="foo.html"> <area SHAPE="RECT" COORDS="223,25,313,90" HREF="bar.html"> <img SRC="Block.gif" USEMAP="#LusionsBlock" height=480 width=640> </map> There are actually four issues to address with respect to the use of the <MAP> element: 1) %block; content inside the <MAP></MAP> container is not being rendered. http://www.w3.org/TR/html4/struct/objects.html#edef-MAP | Note that the user agent should render block-level content of a | MAP element. 2) If the MAP contains an "unterminated" <P>, <DIV>, or <SPAN> (of those I tested), then contents following the <MAP></MAP> are not rendered. 3) The residual style 'stack' seems to get a little confused if <B>, <I> or <FONT> is used inside the <MAP></MAP> 4) However, the reported page should _technically_ not work as an image map: http://www.w3.org/TR/html4/struct/objects.html#edef-MAP | When a MAP element contains mixed content (both AREA elements and | block-level content), user agents must ignore the AREA elements. However, on Nav4.x, when you nest an IMG inside a MAP that has AREA elements, the IMG is displayed *and* the image map works correctly. So ... backwards compatibility or '100% by the book' HTML4 ... aargh, who dreamed up all these wacky rules! :-] Setting to Parser / harishd/rickg. Attachments for 1, 2 and 3 to follow.
Assignee: harishd → rickg
Stealing from harishd.
Status: NEW → ASSIGNED
Target Milestone: M13
Not an RS bug, it turns out. The problem was a line of silly code in the elementtable that *added* bits for a group test when it should of *ANDed* them. Fixed in my tree awaiting a chance to land.
Fixed by change to CloseContainersTo() and ElementTable().
*spam* changing qa contact from nobody@mozilla.org to me (BlakeR1234@aol.com) on 121 open or resolved (but not verified) bugs. sorry for the spam everybody, but most of these bugs would just remain dormant and not checked by QA otherwise. I'm not sure how so many bugs have nobody as their QA contact, but I suspect this is the fault of some sort of bugzilla corruption that happened at some point (most of these bugs are in the 20000-26000 range, and I don't see where in the activity log that QA contact explicitly changed to nobody@mozilla.org) Anyways, sorry again for spam. If you really get annoyed, I'm usually available in #mozilla on IRC for torture.
QA Contact: nobody → BlakeR1234
hmm...the image map still doesn't appear upon first loading the page (just its border/container does) in 2000080809 win98. But it does on reload...
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Content model for attachment # 1 [details] [diff] [review]: ------------------------------------ docshell=00F0A990 html@021B2188 refcount=3< head@021B2098 refcount=2< base@026A91C8 href=http://members.aol.com/Lusion1/ refcount=2<> > Text@026AD8C0 refcount=3<\n> body@026AF8F8 refcount=3< Text@02669E00 refcount=3<\n\n> pre@0266BDD8 refcount=3< Text@0266BD60 refcount=5<(Win95 1999123008) %block; content inside a <MAP > is not rendered.\n> > Text@0266BBF0 refcount=3<\n\n> p@0266BB08 refcount=3< Text@0266BA90 refcount=3<This is the first paragraph. You should see the w ords "I'm inactive. I'm active" below.> > Text@0266B990 refcount=3<\n> hr@0266B898 refcount=3<> Text@0266B820 refcount=3<\n\n\n> map@0266B728 name=map1 refcount=3< p@0266B268 refcount=2< Text@0266B1F0 refcount=2<\n> a@0266B100 shape=circle coords=100,200,50 refcount=2< Text@0266CB30 refcount=2<I'm inactive.> > Text@0266C9F0 refcount=2<\n> a@0266C960 href=outer-ring-link.html shape=circle coords=100,200,250 ref count=2< Text@0266C6C0 refcount=2<I'm active.> > Text@0266C610 refcount=2<\n> > > Text@0266C570 refcount=3<\n\n\n> hr@0266B938 refcount=3<> Text@0266C460 refcount=3<\n> p@0266C3D8 refcount=3< Text@0266C360 refcount=7<This is the second paragraph. Do you see the word s "I'm inactive. I'm active" above?> > Text@0266C170 refcount=3<\n\n\n\n> > > Content model for attachment # 2 [details] [diff] [review]: ---------------------------------- docshell=00F0A990 html@02682C88 refcount=3< head@02682B98 refcount=2< base@0268C058 href=http://members.aol.com/Lusion1/ refcount=2<> > Text@0268BA70 refcount=3<\n> body@0268BCC8 refcount=7< Text@00F5E160 refcount=3<\n> pre@00F5FAB8 refcount=3< Text@00F5E670 refcount=11<(Win95 1999123008) An "unclosed" <P> inside a <MAP> causes \ncontent to be "discarded" (?). (also breaks on <DIV> and <SP AN>).\n\nThis is a problem ... but this works OK.\n\n<MAP name="map1"> <MAP name="map1"> \n<P> <P> \n </P> \n</MAP> </MAP> \n> > Text@00F24860 refcount=3<\n\n> p@00F26DC8 refcount=3< Text@00F254E0 refcount=3<This is the first paragraph. Do you see the words 'second paragraph'?> > Text@00F209D0 refcount=3<\n> hr@00F22F58 refcount=3<> Text@00F24FB0 refcount=3<\n\n> map@00F25678 name=map1 refcount=3< p@00F27118 refcount=2< Text@00F270A0 refcount=2<\n> a@00F23240 shape=circle coords=100,200,50 refcount=2< Text@00F27600 refcount=2<I'm inactive.> > Text@00F27B50 refcount=2<\n> a@00F26CA0 href=outer-ring-link.html shape=circle coords=100,200,250 ref count=2< Text@00F24BC0 refcount=2<I'm active.> > Text@00F24B10 refcount=2<\n\n\n\n> > hr@00F24A88 refcount=2<> Text@00F27420 refcount=2<\n> p@00F27398 refcount=2< Text@00F27320 refcount=2<This is the second paragraph. If you see this, then no more bug!!> > > > > AFAIK, the content model looks correct on both the cases. I don't think this is a parser problem anymore. Reassigning bug to the block-code folks. Chris will you own this bug?
Assignee: rickg → waterson
Status: REOPENED → NEW
John/Blake: Can you break this bug into the separate issues it covers? At least one of the issues is covered by bug 11431, I don't know about the others.
Well, I certainly see all the problems that jgrm points out. We should prolly fix 'em. "Don't Break the Web", and all.
Status: NEW → ASSIGNED
Keywords: correctness, nsbeta3
Priority: P3 → P2
Target Milestone: M13 → M18
(Sorry for not breaking this up, into separate bug reports.) Of all of these, the only one I would be really concerned about is (2), as it breaks the entire page. (2) is a minor bug. (1) is rare in practice (%block; content inside <map>), and (4) points out that getting this 100% by the book would break some existing content that do use block content inside and image map to set up that image map.
Problem (1) is covered by the bug I mentioned earlier. Problem (2) is still present -- the content model Harish quoted *is* wrong. If you look carefully you will see that the <map> element is not closed until the end of the document. This is wrong. Reassigning back to parser.
Assignee: waterson → rickg
Status: ASSIGNED → NEW
QA Contact: BlakeR1234 → janc
Summary: image map does not work (various issues with <MAP>) → <map><p></map> doesn't close the <p>
Suggest that we fix this (rather easy problem) since it results in data loss.
Status: NEW → ASSIGNED
Keywords: dataloss
Whiteboard: [nsbeta3] fix in hand
*** Bug 13354 has been marked as a duplicate of this bug. ***
Blocks: html4.01
*** Bug 44484 has been marked as a duplicate of this bug. ***
Fixed by correction to element table. This bug could have affected any phrasal or special tag that (legitimately) contained block elements.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
not fixed 2000-09-15-08-M18 Win98
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Status: REOPENED → RESOLVED
Closed: 24 years ago24 years ago
Resolution: --- → FIXED
JanC: Wrong answer. I've added the content model given testcase #3 (for example). As you can see, the parser is constructing the content model correctly. Please open a new layout bug (on buster) to describe the error there. html@029A7078 refcount=3< head@029A2F38 refcount=2< base@029B4BA8 href=http://members.aol.com/Lusion1/ refcount=2<> > Text@029B46E0 refcount=3<\n> body@029B4938 refcount=3< Text@029F7B90 refcount=3<\n\n> pre@029F73C8 refcount=3< Text@029F7350 refcount=3<(Win95 1999123008) Residual style "leaks" out of a <MAP></MAP>.\n> > Text@029F71E0 refcount=3<\n\n> p@029F70C8 refcount=3< Text@029F7050 refcount=3<This is the first paragraph.> > Text@029F3F60 refcount=3<\n> hr@029F3E38 refcount=5<> Text@029F3DC0 refcount=3<\n\n> map@029F3C98 name=map1 refcount=3< b@029F3788 refcount=2< i@029F3698 refcount=2< font@029F35A8 face=sans-serif refcount=2< Text@029F3380 refcount=2<\n> a@029F3260 shape=circle coords=100,200,50 refcount=2< Text@029F3060 refcount=2<I'm inactive.> > Text@029F2EE0 refcount=2<\n> a@029F2E80 href=outer-ring-link.html shape=circle coords=100,200,250 refcount=2< Text@029F2BE0 refcount=2<I'm active.> > Text@029F2B30 refcount=2<\n> > > > > Text@029F2920 refcount=3<\n\n> hr@029F3ED8 refcount=5<> Text@029F2810 refcount=3<\n> p@029F2788 refcount=3< Text@029F2710 refcount=3<This should *not* be bold or italic or FONT FACE='sans-serif'.> > Text@029F2630 refcount=3<\n\n> > > Enabling Quirk StyleSheet
Status: RESOLVED → VERIFIED
Works for Me Platform: PC OS: Windows 98 Mozilla Version: 2000100508 Marking as Verified
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: