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

RESOLVED FIXED in mozilla1.9.3a5

Status

()

Core
HTML: Parser
RESOLVED FIXED
12 years ago
8 years ago

People

(Reporter: sicking, Assigned: sicking)

Tracking

Trunk
mozilla1.9.3a5
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [fixed by the HTML5 parser])

Attachments

(1 attachment, 2 obsolete attachments)

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.
Created attachment 200470 [details] [diff] [review]
Patch to fix
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-
Created attachment 200473 [details] [diff] [review]
Patch v2

Fix comments by blake
Attachment #200470 - Attachment is obsolete: true
Attachment #200473 - Flags: superreview?(peterv)
Attachment #200473 - Flags: review?(mrbkap)
Attachment #200470 - Flags: superreview?(peterv)
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+
Created attachment 200488 [details] [diff] [review]
Patch v3

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
Last Resolved: 8 years ago
Resolution: --- → FIXED
Whiteboard: [fixed by the HTML5 parser]

Updated

8 years ago
Target Milestone: --- → mozilla1.9.3a5
You need to log in before you can comment on or make changes to this bug.