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 aba...@webkit.org 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

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 abu...@adobe.com wrote: On 7/27/12 1:55 AM, Adam Barth aba...@webkit.org 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

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

2012-07-26 Thread Alexandru Chiculita
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 s...@webkit.org wrote: On Jul 25, 2012, at 5:53 PM, Elliott Sprehn espr...@google.com wrote: It seems like this should really be a [NoInterfaceObject

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

2012-07-26 Thread Adam Barth
stea...@adobe.com, Kentaro Hara hara...@chromium.org, webkit-dev@lists.webkit.org 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 s...@webkit.org wrote: On Jul 25, 2012, at 5:53 PM, Elliott Sprehn espr

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

2012-07-26 Thread Alan Stearns
On 7/26/12 2:36 PM, Adam Barth aba...@webkit.org wrote: On Thu, Jul 26, 2012 at 2:29 PM, Alexandru Chiculita ach...@adobe.com 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

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 first

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

2012-07-26 Thread Adam Barth
-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 *Subject:* Re: [webkit-dev] Multiple inheritance in the DOM ** ** For Alex's suggestion above

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

2012-07-26 Thread Alan Stearns
On 7/26/12 3:15 PM, Adam Barth aba...@webkit.org wrote: On Thu, Jul 26, 2012 at 2:58 PM, Alan Stearns stea...@adobe.com wrote: On 7/26/12 2:36 PM, Adam Barth aba...@webkit.org wrote: ... Discussing this issue with Sam in #webkit, we wondered whether another solution is to not implement the

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 stea...@adobe.com wrote: On 7/26/12 3:15 PM, Adam Barth aba...@webkit.org wrote: On Thu, Jul 26, 2012 at 2:58 PM, Alan Stearns stea...@adobe.com wrote: On 7/26/12 2:36 PM, Adam Barth aba...@webkit.org wrote: ... Discussing this issue with

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

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 ach...@adobe.comwrote: ... 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

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 ach...@adobe.comwrote: 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

[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

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

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 aba...@webkit.org wrote:

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 http://www.w3.org/TR/WebIDL/#dfn-primary-interface. 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:44

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 SVGLocatable,

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 dschu...@adobe.com 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

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 fixed in DOM4 [4]. If

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

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

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

2012-07-25 Thread Alan Stearns
On 7/25/12 5:37 PM, Sam Weinig s...@webkit.org wrote: On Jul 25, 2012, at 5:13 PM, Alan Stearns stea...@adobe.com wrote: On 7/25/12 4:49 PM, Kentaro Hara hara...@chromium.org wrote: A) Should we push back on the folks writing the CSS Regions specification to avoid using multiple

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 s...@webkit.org wrote: On Jul 25, 2012, at 5:53 PM, Elliott Sprehn espr...@google.com wrote: On Wed, Jul 25, 2012 at 5:13 PM, Alan Stearns stea...@adobe.com wrote: ... From the WebIDL side, it's not strictly multiple inheritance. It's merely a

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(),

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

2012-07-25 Thread Alan Stearns
On 7/25/12 6:12 PM, Sam Weinig s...@webkit.org wrote: On Jul 25, 2012, at 5:37 PM, Sam Weinig s...@webkit.org wrote: On Jul 25, 2012, at 5:13 PM, Alan Stearns stea...@adobe.com wrote: On 7/25/12 4:49 PM, Kentaro Hara hara...@chromium.org wrote: A) Should we push back on the folks

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

2012-07-25 Thread Alan Stearns
] Multiple inheritance in the DOM On Wed, Jul 25, 2012 at 6:00 PM, Sam Weinig s...@webkit.org wrote: On Jul 25, 2012, at 5:53 PM, Elliott Sprehn espr...@google.com wrote: It seems like this should really be a [NoInterfaceObject]. That resolves the issue of multiple inheritance since you can

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 dschu...@adobe.com 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