On May 7, 2:59 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> On May 7, 1:41 am, Boris Zbarsky <[EMAIL PROTECTED]> wrote:
>
>
>
> > [EMAIL PROTECTED] wrote:
> > > Does nsGenericHTMLElement implement the nsIDOMElementCSSInlineStyle
> > > interface?
>
> > Yes.
>
> > >http://lxr.mozilla.org/mozilla1.8.0/source/content/html/content/src/n...
>
> > > I don' t ee the nsGenericHTMLElement has inherited the
> > > nsIDOMElementCSSInlineStyle class
>
> > It doesn't.
>
> > > but it has the GetStyle method.
>
> > That's correct.  I suggest looking into the QI implementation for
> > nsGenericHTMLElement, which should make things clear.
>
> > -Boris
>
> > P.S.  Hint: If one uses a tear-off, one can implement nsIFoo without 
> > inheriting
> > from nsIFoo.
>
> Thank you. When you say "QI implementation for
> nsGenericHTMLElemen", do you mean nsGenericHTMLElement.cpp? or
> something else?

Every XPCOM component class has a QueryInterface function, and it is
in this function the nsGenericHTMLElement return different interfaces.
I guess, when nsGenericHTMLElement class is queried for a
nsIDOMElementCSSInlineStyle  interface, it must return another object
which is owned by nsGenericHTMLElement instead this pointer.

Regards!
Bo

_______________________________________________
dev-tech-layout mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-layout

Reply via email to