Re: How get nsIView from a nsGenericElement
hap497 <[email protected]> Mon, 26 Apr 2010 08:43:14 -0700 (PDT)
| Newsgroups | gmane.comp.mozilla.devel.dom |
|---|---|
| Organization | http://groups.google.com |
| Message-ID | <771ba577-25ed-49ac-b381-d8c8bb48b69f@z21g2000pre.googlegroups.com> |
On Apr 25, 8:00 pm, Boris Zbarsky <[email protected]> wrote: > On 4/25/10 9:32 PM, hap497 wrote: > > > If I have a pointer to nsGenericElement, how can I get a nsIView of > > the element? > > Just based on the element, you can't. There may not be a view, or there > may be more than one. > > What are you actually trying to do? > > -Boris I am trying to emulate an user click event on html element like anchor. So I am trying to call nsPresShell's HandleEvent method HandleEvent(nsIView* aView, nsGUIEvent* aEvent, nsEventStatus* aEventStatus); http://mxr.mozilla.org/mozilla1.9.1/source/layout/base/nsPresShell.cpp#908 Since my input is an nsGenericElement (an anchor), I need to get a nsIView to call this HandleEvent. Thank you.