Re: [webkit-dev] Multiple inheritance in the DOM

2012-08-01 Thread Adam Barth
On Wed, Aug 1, 2012 at 9:45 AM, Andrei Bucur wrote: > On 7/27/12 1:55 AM, "Adam Barth" wrote: >>Perhaps it would make sense to start with a smaller CSSOM for Regions >>that uses established patterns and techniques. That way we can gain >>experience with these patterns and techniques before jumpi

Re: [webkit-dev] Multiple inheritance in the DOM

2012-08-01 Thread Andrei Bucur
Hi Adam, On 7/27/12 1:55 AM, "Adam Barth" wrote: >Perhaps it would make sense to start with a smaller CSSOM for Regions >that uses established patterns and techniques. That way we can gain >experience with these patterns and techniques before jumping into API >designs that don't follow existing

Re: [webkit-dev] Multiple inheritance in the DOM

2012-07-26 Thread Adam Barth
On Thu, Jul 26, 2012 at 3:45 PM, Alexandru Chiculita wrote: > > On 26.07.2012, at 14:36, Adam Barth wrote: > > > 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 CSS

Re: [webkit-dev] Multiple inheritance in the DOM

2012-07-26 Thread Elliott Sprehn
On Thu, Jul 26, 2012 at 3:45 PM, Alexandru Chiculita wrote: > ... > If CSSPseudoElement would be designed to derive from the same base class > as Element and share most of their style/layout properties, then 99% of the > time people will just do region.element.style.top = '100px'; and no query > i

Re: [webkit-dev] Multiple inheritance in the DOM

2012-07-26 Thread Alexandru Chiculita
On 26.07.2012, at 14:36, Adam Barth wrote: 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 t

Re: [webkit-dev] Multiple inheritance in the DOM

2012-07-26 Thread Adam Barth
On Thu, Jul 26, 2012 at 3:39 PM, Alan Stearns wrote: > On 7/26/12 3:15 PM, "Adam Barth" wrote: > > > >On Thu, Jul 26, 2012 at 2:58 PM, Alan Stearns wrote: > > > >On 7/26/12 2:36 PM, "Adam Barth" wrote: > >... > >> > >> > >>Discussing this issue with Sam in #webkit, we wondered whether another

Re: [webkit-dev] Multiple inheritance in the DOM

2012-07-26 Thread Alan Stearns
On 7/26/12 3:15 PM, "Adam Barth" wrote: > >On Thu, Jul 26, 2012 at 2:58 PM, Alan Stearns wrote: > >On 7/26/12 2:36 PM, "Adam Barth" wrote: >... >> >> >>Discussing this issue with Sam in #webkit, we wondered whether another >>solution is to not implement the CSSOM for Regions. Is there are str

Re: [webkit-dev] Multiple inheritance in the DOM

2012-07-26 Thread Adam Barth
t; ** ** > > *From:* webkit-dev-boun...@lists.webkit.org [mailto: > webkit-dev-boun...@lists.webkit.org] *On Behalf Of *Adam Barth > *Sent:* Friday, July 27, 2012 1:15 AM > *To:* Alan Stearns > *Cc:* Kentaro Hara; Elliott Sprehn; webkit-dev@lists.webkit.org; Sam > Weinig > &g

Re: [webkit-dev] Multiple inheritance in the DOM

2012-07-26 Thread Andrei Bucur
] On Behalf Of Adam Barth Sent: Friday, July 27, 2012 1:15 AM To: Alan Stearns Cc: Kentaro Hara; Elliott Sprehn; webkit-dev@lists.webkit.org; Sam Weinig Subject: Re: [webkit-dev] Multiple inheritance in the DOM For Alex's suggestion above, would there be any problems with a parameter (for the

Re: [webkit-dev] Multiple inheritance in the DOM

2012-07-26 Thread Adam Barth
On Thu, Jul 26, 2012 at 2:58 PM, Alan Stearns wrote: > On 7/26/12 2:36 PM, "Adam Barth" wrote: > > > > >On Thu, Jul 26, 2012 at 2:29 PM, Alexandru Chiculita > >wrote: > > > >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

Re: [webkit-dev] Multiple inheritance in the DOM

2012-07-26 Thread Alan Stearns
On 7/26/12 2:36 PM, "Adam Barth" wrote: > >On Thu, Jul 26, 2012 at 2:29 PM, Alexandru Chiculita >wrote: > >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

Re: [webkit-dev] Multiple inheritance in the DOM

2012-07-26 Thread Adam Barth
Hara , > > "webkit-dev@lists.webkit.org" > > Subject: Re: [webkit-dev] Multiple inheritance in the DOM > > > > On Wed, Jul 25, 2012 at 6:00 PM, Sam Weinig wrote: > > > > On Jul 25, 2012, at 5:53 PM, Elliott Sprehn wrote: > > > >>>

Re: [webkit-dev] Multiple inheritance in the DOM

2012-07-26 Thread Alexandru Chiculita
On 25.07.2012, at 18:16, Alan Stearns wrote: > From: Adam Barth > Date: Wednesday, July 25, 2012 6:05 PM > To: Sam Weinig > Cc: Elliott Sprehn , Alan Stearns > , Kentaro Hara , > "webkit-dev@lists.webkit.org" > Subject: Re: [webkit-dev] Multiple inheritance

Re: [webkit-dev] Multiple inheritance in the DOM

2012-07-25 Thread Dirk Schulze
On Jul 25, 2012, at 3:50 PM, Adam Barth wrote: > On Wed, Jul 25, 2012 at 3:44 PM, Dirk Schulze wrote: >> On Jul 25, 2012, at 2:33 PM, Adam Barth wrote: >>> Eric Seidel points out that SVG uses multiple inheritance in its DOM >>> interfaces. However, the situation there is a bit different. >>> A

Re: [webkit-dev] Multiple inheritance in the DOM

2012-07-25 Thread Alan Stearns
From: Adam Barth Date: Wednesday, July 25, 2012 6:05 PM To: Sam Weinig Cc: Elliott Sprehn , Alan Stearns , Kentaro Hara , "webkit-dev@lists.webkit.org" Subject: Re: [webkit-dev] Multiple inheritance in the DOM On Wed, Jul 25, 2012 at 6:00 PM, Sam Weinig wrote: On Jul 25, 201

Re: [webkit-dev] Multiple inheritance in the DOM

2012-07-25 Thread Alan Stearns
On 7/25/12 6:12 PM, "Sam Weinig" wrote: > >On Jul 25, 2012, at 5:37 PM, Sam Weinig wrote: > >> >> On Jul 25, 2012, at 5:13 PM, Alan Stearns wrote: >> >>> On 7/25/12 4:49 PM, "Kentaro Hara" wrote: >>> A) Should we push back on the folks writing the CSS Regions specification

Re: [webkit-dev] Multiple inheritance in the DOM

2012-07-25 Thread Hajime Morrita
If the only problem is to determine the type of JS wrappers, is it possible to make wrapSlow() a virtual method of some base class, instead of static functions? It need a tweak on the code generator. Also, it might need to avoid name conflicts by suffixing like wrapSlowForNode(), wrapSlowForRegion

Re: [webkit-dev] Multiple inheritance in the DOM

2012-07-25 Thread Adam Barth
On Wed, Jul 25, 2012 at 6:00 PM, Sam Weinig wrote: > > On Jul 25, 2012, at 5:53 PM, Elliott Sprehn wrote: > > > On Wed, Jul 25, 2012 at 5:13 PM, Alan Stearns wrote: > >> ... >> >> From the WebIDL side, it's not strictly multiple inheritance. It's merely >> a supplemental interface that more tha

Re: [webkit-dev] Multiple inheritance in the DOM

2012-07-25 Thread Alan Stearns
On 7/25/12 5:37 PM, "Sam Weinig" wrote: > >On Jul 25, 2012, at 5:13 PM, Alan Stearns wrote: > >> On 7/25/12 4:49 PM, "Kentaro Hara" wrote: >> >>> A) Should we push back on the folks writing the CSS Regions >>> specification to avoid using multiple inheritance? As far as I >> know,

Re: [webkit-dev] Multiple inheritance in the DOM

2012-07-25 Thread Alan Stearns
On 7/25/12 4:49 PM, "Kentaro Hara" 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

Re: [webkit-dev] Multiple inheritance in the DOM

2012-07-25 Thread Kentaro Hara
>>> > 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 been >>> > fix

Re: [webkit-dev] Multiple inheritance in the DOM

2012-07-25 Thread Adam Barth
On Wed, Jul 25, 2012 at 3:44 PM, Dirk Schulze wrote: > On Jul 25, 2012, at 2:33 PM, Adam Barth wrote: >> Eric Seidel points out that SVG uses multiple inheritance in its DOM >> interfaces. However, the situation there is a bit different. >> Although SVGSVGElement implements SVGLocatable, there ar

Re: [webkit-dev] Multiple inheritance in the DOM

2012-07-25 Thread Dirk Schulze
On Jul 25, 2012, at 2:33 PM, Adam Barth wrote: > Eric Seidel points out that SVG uses multiple inheritance in its DOM > interfaces. However, the situation there is a bit different. > Although SVGSVGElement implements SVGLocatable, there aren't any > interfaces with methods that return SVGLocatab

Re: [webkit-dev] Multiple inheritance in the DOM

2012-07-25 Thread Adam Barth
According to WebIDL, every platform object has a "primary" interface, as defined by . As long as that's the case, DOMInterface::interfaceName() should be sufficient to figure out which JavaScript wrapper to use. Adam On Wed, Jul 25, 2012 at 2:4

Re: [webkit-dev] Multiple inheritance in the DOM

2012-07-25 Thread Darin Fisher
At least DOMInterface::interfaceName() is no where near as bad as COM's QueryInterface. Provided we don't end up with any diamond inheritance hierarchies, we shouldn't need something as complicated as QueryInterface. -Darin On Wed, Jul 25, 2012 at 2:33 PM, Adam Barth wrote: > Eric Seidel poi

Re: [webkit-dev] Multiple inheritance in the DOM

2012-07-25 Thread Adam Barth
Eric Seidel points out that SVG uses multiple inheritance in its DOM interfaces. However, the situation there is a bit different. Although SVGSVGElement implements SVGLocatable, there aren't any interfaces with methods that return SVGLocatable, which means we don't need to implement toJS(SVGLocata

[webkit-dev] Multiple inheritance in the DOM

2012-07-25 Thread Adam Barth
The CSS Regions specification [1] defines a CSSOM interface named Region, which can be mixed into interfaces for other objets that can be CSS regions. That means that Region introduces a form of multiple inheritance into the DOM. For example, Element implements Region but Node does not implement