Closed Bug 752045 Opened 9 years ago Closed 9 years ago

Editor seems to want document fragments to QI to dom::Element

Categories

(Core :: DOM: Editor, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla15

People

(Reporter: Ms2ger, Assigned: Ms2ger)

References

Details

Attachments

(1 file)

I'm getting <https://tbpl.mozilla.org/?tree=Try&rev=9e9518c33d28>: oranges in editor/libeditor/html/tests/test_bug520189.html. I think because of the QI at <http://mxr.mozilla.org/mozilla-central/source/editor/libeditor/base/nsEditor.cpp#3549>.
Yeah I think Aryeh recently came across this too.  This is crazy, in case that is not obvious!  :-)
Attached patch Patch v1Splinter Review
Attachment #621326 - Flags: review?(ehsan)
Comment on attachment 621326 [details] [diff] [review]
Patch v1

I'm not sure why you're QIing to nsINode and then static-casting to nsIContent.  You can just QI to nsIContent, and you'll have access to the NodeType method since nsIContent derives publicly from nsINode, right?

Please make that change, r=me with that.
Attachment #621326 - Flags: review?(ehsan) → review+
https://hg.mozilla.org/mozilla-central/rev/82c85325b86f
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla15
You need to log in before you can comment on or make changes to this bug.