[webkit-dev] Multiple inheritance in the DOM
Adam Barth
abarth at webkit.org
Thu Jul 26 14:36:17 PDT 2012
On Thu, Jul 26, 2012 at 2:29 PM, Alexandru Chiculita <achicu at adobe.com>wrote:
>
> On 25.07.2012, at 18:16, Alan Stearns wrote:
>
> > From: Adam Barth <abarth at webkit.org>
> > Date: Wednesday, July 25, 2012 6:05 PM
> > To: Sam Weinig <sam at webkit.org>
> > Cc: Elliott Sprehn <esprehn at google.com>, Alan Stearns
> > <stearns at adobe.com>, Kentaro Hara <haraken at chromium.org>,
> > "webkit-dev at lists.webkit.org" <webkit-dev at lists.webkit.org>
> > Subject: Re: [webkit-dev] Multiple inheritance in the DOM
> >
> > On Wed, Jul 25, 2012 at 6:00 PM, Sam Weinig <sam at webkit.org> wrote:
> >
> > On Jul 25, 2012, at 5:53 PM, Elliott Sprehn <esprehn at google.com> wrote:
> >
> >>>> It seems like this should really be a [NoInterfaceObject].
> >>>> That resolves the issue of multiple inheritance since you
> >>>> can no longer do instanceof Region, and I'm not sure why
> >>>> you'd ever want to do that anyway.
> >
> >>> I agree.
> >
> >> That doesn't solve the problem.
> >
> > But it's a good idea. I'll add it to the spec.
>
> I don't see any advantage in having the interface anyway, so why don't we
> just it let be a separate object and add two helper methods instead. I can
> only imagine that other browsers might have the same issue anyway.
>
> document.getRegionForElement(element)
> -> where element can be both Element and CSSPseudoElement
> -> this may return null in case of no region being associated, so there's
> no need for instanceof tricks anymore.
>
> region.element
> -> that can return either Element or CSSPseudoElement
>
> BTW, is there any base class shared across Element and CSSPseudoElement?
>
Greping for CSSPseudoElement in WebCore appears to return zero results.
Discussing this issue with Sam in #webkit, we wondered whether another
solution is to not implement the CSSOM for Regions. Is there are strong
use case for having this CSSOM in the first place?
Adam
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20120726/eb22b96c/attachment.html>
More information about the webkit-dev
mailing list