Closed Bug 647471 Opened 13 years ago Closed 13 years ago

"ASSERTION: We should never hit a case where our height is non-zero but smaller than the caret baseline"

Categories

(Core :: DOM: Editor, defect)

x86_64
macOS
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: jruderman, Unassigned)

References

Details

(Keywords: assertion, regression, testcase)

Attachments

(4 files)

Attached file testcase
###!!! ASSERTION: We should never hit a case where our height is non-zero but smaller than the caret baseline...: 'baseline <= mRect.height', file layout/generic/nsInlineFrame.cpp, line 936

This assertion is part of nsInlineFrame::GetCaretBaseline, which was added recently:

changeset:   db8e95fbcd39
user:        Ehsan Akhgari
date:        Mon Mar 28 20:17:16 2011 -0400
summary:     Bug 644428 - Position the caret correctly for empty inline frames; r=roc
Attached file stack trace
I don't get the assertion on trunk, but I do get this error:

JavaScript error: , line 0: uncaught exception: [Exception... "Component returned failure code: 0x80004003 (NS_ERROR_INVALID_POINTER) [nsIDOMNSHTMLDocument.execCommand]"  nsresult: "0x80004003 (NS_ERROR_INVALID_POINTER)"  location: "JS frame :: https://bug647471.bugzilla.mozilla.org/attachment.cgi?id=523806 :: boom :: line 12"  data: no]

This is caused by nsEditor::GetChildOffset using nsIContent's instead of nsINodes, which cause it to fail if aParent is a document (which happens in this test case).
As with everything in the editor, fixing the js error in comment 2 is not trivial...  I tried a couple of things, and they both failed.  I'm going to attach both of my failed attempts here, for my own future reference.

But this bug in its original form is WFM, since the assertion was removed in <http://hg.mozilla.org/mozilla-central/rev/3c21288157a9>
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: