Closed Bug 461440 Opened 16 years ago Closed 12 years ago

ASSERTION: Fix the caller, this type of node can never contain children.: 'parentTagEnum < NS_HTML_TAG_MAX'

Categories

(Core :: DOM: Editor, defect)

All
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla17

People

(Reporter: MatsPalmgren_bugz, Assigned: Ms2ger)

Details

(Keywords: assertion, testcase)

Attachments

(2 files)

Attached file Testcase
STEPS TO REPRODUCE
1. load the attached testcase

ACTUAL RESULT
###!!! ASSERTION: Fix the caller, this type of node can never contain children.: 'parentTagEnum < NS_HTML_TAG_MAX', file /usr/moz/hg1/editor/libeditor/html/nsHTMLEditor.cpp, line 4183
The testcase in bug 382210 also triggers this assertion.
Still happens on trunk (not fixed in bug 414178).
Attached patch Patch v1Splinter Review
This is also hit in editing tests; possibly through the DocumentFragment case in nsEditor::CanContainTag.
Assignee: nobody → Ms2ger
Status: NEW → ASSIGNED
Attachment #649204 - Flags: review?(ehsan)
Comment on attachment 649204 [details] [diff] [review]
Patch v1

Review of attachment 649204 [details] [diff] [review]:
-----------------------------------------------------------------

I think the right fix to this is to OR the condition of the assertion with parentTagEnum == eHTMLTag_userdefined (assuming that that is what HTMLAtomTagToId returns).
Attachment #649204 - Flags: review?(ehsan) → review-
Comment on attachment 649204 [details] [diff] [review]
Patch v1

Ms2ger tells me that CanContain already asserts what I asked for here!
Attachment #649204 - Flags: review- → review+
https://hg.mozilla.org/mozilla-central/rev/753b39a6e957
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Hardware: x86 → All
Resolution: --- → FIXED
Target Milestone: --- → mozilla17
Version: unspecified → Trunk
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: