Last Comment Bug 461440 - ASSERTION: Fix the caller, this type of node can never contain children.: 'parentTagEnum < NS_HTML_TAG_MAX'
: ASSERTION: Fix the caller, this type of node can never contain children.: 'pa...
Status: RESOLVED FIXED
: assertion, testcase
Product: Core
Classification: Components
Component: Editor (show other bugs)
: Trunk
: All Linux
: -- normal (vote)
: mozilla17
Assigned To: :Ms2ger
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-10-23 16:48 PDT by Mats Palmgren (vacation)
Modified: 2012-08-09 04:09 PDT (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Testcase (648 bytes, application/xhtml+xml)
2008-10-23 16:48 PDT, Mats Palmgren (vacation)
no flags Details
Patch v1 (861 bytes, patch)
2012-08-06 00:43 PDT, :Ms2ger
ehsan: review+
Details | Diff | Splinter Review

Description Mats Palmgren (vacation) 2008-10-23 16:48:20 PDT
Created attachment 344559 [details]
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
Comment 1 Jesse Ruderman 2008-10-23 17:54:06 PDT
The testcase in bug 382210 also triggers this assertion.
Comment 2 Jesse Ruderman 2011-09-25 22:22:51 PDT
Still happens on trunk (not fixed in bug 414178).
Comment 3 :Ms2ger 2012-08-06 00:43:56 PDT
Created attachment 649204 [details] [diff] [review]
Patch v1

This is also hit in editing tests; possibly through the DocumentFragment case in nsEditor::CanContainTag.
Comment 4 :Ehsan Akhgari 2012-08-07 12:35:30 PDT
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).
Comment 5 :Ehsan Akhgari 2012-08-07 12:49:10 PDT
Comment on attachment 649204 [details] [diff] [review]
Patch v1

Ms2ger tells me that CanContain already asserts what I asked for here!

Note You need to log in before you can comment on or make changes to this bug.