[webkit-dev] Multiple inheritance in the DOM
morrita at chromium.org
Wed Jul 25 18:06:57 PDT 2012
If the only problem is to determine the type of JS wrappers, is it possible
make wrapSlow() a virtual method of some base class, instead of static
It need a tweak on the code generator. Also, it might need to avoid name
by suffixing like wrapSlowForNode(), wrapSlowForRegion() etc.
This approach would make wrapSlow() a variation of QueryInterface(). But
considering that the functionality is limited and hard to abuse, it might
be better than having DOMInterface.
On Thu, Jul 26, 2012 at 9:53 AM, Alan Stearns <stearns at adobe.com> wrote:
> On 7/25/12 5:37 PM, "Sam Weinig" <sam at webkit.org> wrote:
> >On Jul 25, 2012, at 5:13 PM, Alan Stearns <stearns at adobe.com> wrote:
> >> On 7/25/12 4:49 PM, "Kentaro Hara" <haraken at chromium.org> wrote:
> >>>>>>> A) Should we push back on the folks writing the CSS Regions
> >>>>>>> specification to avoid using multiple inheritance? As far as I
> >>>>>> know,
> >>>>>>> this is the only instance of multiple inheritance in the platform.
> >>>>>>> Historically, EventTarget used multiple inheritance, but that's
> >>>>>>> fixed in DOM4 .
> >>> If it is possible to avoid the multiple inheritance, that would be
> >> From the WebIDL side, it's not strictly multiple inheritance. It's
> >> a supplemental interface that more than one object can implement. None
> >> the members of the Region interface can clash with any of the members of
> >> the object that implements it.
> >> Right now Elements can become CSS Regions, but in the future other
> >> will be able to become CSS Regions. As far as I know, the correct way to
> >> specify this kind of relation is with WebIDL supplemental interfaces.
> >> rather figure out the correct way to add this WebIDL functionality to
> >> WebKit now, than put something else into the spec and WebKit that we'll
> >> have to change later.
> >> Thanks,
> >> Alan
> >What other objects do you envision implementing CSSRegion? With the spec
> >written the way it is now, I see no reason to make anything virtual, or
> >even have a Region class. Just implement it in Element. If need to pull
> >things out for code reuse purposes, we can do that when it comes to that,
> >but right now, there doesn't seem to be a need to complicate things.
> I have an upcoming proposal for a CSSPseudoElement object. You can make a
> pseudo-element like ::before or ::after into a CSS Region right now in
> WebKit. All that's lacking is a way to access those pseudo-elements from
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the webkit-dev