Last Comment Bug 752045 - Editor seems to want document fragments to QI to dom::Element
: Editor seems to want document fragments to QI to dom::Element
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Editor (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla15
Assigned To: :Ms2ger (⌚ UTC+1/+2)
:
Mentors:
Depends on:
Blocks: 361460
  Show dependency treegraph
 
Reported: 2012-05-04 14:23 PDT by :Ms2ger (⌚ UTC+1/+2)
Modified: 2012-05-18 02:47 PDT (History)
2 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Patch v1 (2.37 KB, patch)
2012-05-05 11:18 PDT, :Ms2ger (⌚ UTC+1/+2)
ehsan: review+
Details | Diff | Splinter Review

Description :Ms2ger (⌚ UTC+1/+2) 2012-05-04 14:23:11 PDT
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>.
Comment 1 :Ehsan Akhgari 2012-05-04 15:26:45 PDT
Yeah I think Aryeh recently came across this too.  This is crazy, in case that is not obvious!  :-)
Comment 2 :Ms2ger (⌚ UTC+1/+2) 2012-05-05 11:18:32 PDT
Created attachment 621326 [details] [diff] [review]
Patch v1
Comment 3 :Ehsan Akhgari 2012-05-05 12:17:31 PDT
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.
Comment 4 :Ms2ger (⌚ UTC+1/+2) 2012-05-18 02:47:22 PDT
https://hg.mozilla.org/mozilla-central/rev/82c85325b86f

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