Closed Bug 313419 Opened 19 years ago Closed 14 years ago

Don't kill <area>s outside <map>s

Categories

(Core :: DOM: HTML Parser, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9.3a5

People

(Reporter: sicking, Assigned: sicking)

References

Details

(Whiteboard: [fixed by the HTML5 parser])

Attachments

(1 file, 2 obsolete files)

We currently don't put <area>s outside map-elements into the contentmodel.
There's not really a good reason for this since they won't do anything and they
won't affect rendering. IE puts them in the DOM so it should be safe.
Attached patch Patch to fix (obsolete) — Splinter Review
Attachment #200470 - Flags: superreview?(peterv)
Attachment #200470 - Flags: review?(mrbkap)
Comment on attachment 200470 [details] [diff] [review]
Patch to fix

You're going to need to have to change the element table definition of
eHTMLTag_area so that regular elements will be able to contain it.
Attachment #200470 - Flags: review?(mrbkap) → review-
Attached patch Patch v2 (obsolete) — Splinter Review
Fix comments by blake
Attachment #200470 - Attachment is obsolete: true
Attachment #200473 - Flags: superreview?(peterv)
Attachment #200473 - Flags: review?(mrbkap)
Comment on attachment 200473 [details] [diff] [review]
Patch v2

>Index: src/nsElementTable.cpp
>-DECL_TAG_LIST(gAreaParent,{eHTMLTag_map})
...
>-    /*parent,incl,exclgroups*/          kNone, kInlineEntity, kSelf,
>+    /*parent,incl,exclgroups*/          kHeadMisc, kInlineEntity, kSelf,
>     /*special props, prop-range*/       kNonContainer,kDefaultPropRange,
>-    /*special parents,kids,skip*/       &gAreaParent,0,eHTMLTag_unknown,
>+    /*special parents,kids,skip*/       0,0,eHTMLTag_unknown,

I think you want (kFlowEntity | kHeadMisc) as the parent model, and I think I'd
feel better leaving the "special parent" to seperate out <map> as being one.
(maps can probably contain areas even with this patch because area is map's
"special child", but making the relationship explicit seems like the right way
to go).

Other than that, looks good.
Attachment #200473 - Flags: review?(mrbkap) → review+
Attached patch Patch v3Splinter Review
We talked some more and agreed to try to compleatly kill the special relationship between map and area which this patch does. However I need to run some more testing on this, but I can't fully test this until bug 312592 is fixed since that bug causes the html sink to not create areas outside the map even if the parser allows it.

So holding off review requests for now
Attachment #200473 - Attachment is obsolete: true
Attachment #200473 - Flags: superreview?(peterv)
Status: NEW → ASSIGNED
Depends on: 312592
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Whiteboard: [fixed by the HTML5 parser]
Target Milestone: --- → mozilla1.9.3a5
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: