Closed Bug 538466 Opened 12 years ago Closed 12 years ago
"ASSERTION: Wrong document somewhere" with contenteditable
490 bytes, text/html
Bug 537041 is fixed, but this new testcase also triggers the same assertion. ###!!! ASSERTION: Wrong document somewhere: 'GetCurrentDoc() == aPresShell->GetDocument()', file /Users/jruderman/central/content/base/src/nsGenericElement.cpp, line 400
Well, the code in nsHTMLEditor::SelectAll just grabs the selection anchor node (which is in the textnode that's in the span that's in the paragraph that's in the body that's NOT in the document) and then calls GetSelectionRootContent() on it. Then we assert. I think we should probably just replace the assert in GetSelectionRootContent() with a check; fixing all the selection consumers who apparently feel that they can trust selections (when they actually can't) is too much hassle... Masayuki, does that sound ok to you? This is basically what bug 537041 comment 9 last sentence was about.
Did you think we should land nsGenericElement.cpp part of https://bugzilla.mozilla.org/attachment.cgi?id=419535&action=diff ? If so, I think it's ok.
Yes, that's exactly what I think. r=me if you want to do that, or I can put up the patch and ask you for review. ;) Let me know.
ok, looks like the current tinderbox is safe for landing, I'll land the patch's part with r=bz.
Assignee: nobody → masayuki
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.3a1
You need to log in before you can comment on or make changes to this bug.