[webkit-dev] About WebIDL supplemental interfaces

2012-07-19 Thread Andrei Bucur
Hello Webkitters!

The latest WD for WebIDL defines a supplemental interface of an interface A as 
any element of the acyclic graph of interfaces that is connected to A through 
implements statements or through the inheritance chain of another 
supplemental interface:
http://www.w3.org/TR/WebIDL/#dfn-supplemental-interface

However, WebKitIDL defines Supplemental more like a partial interface:
http://trac.webkit.org/wiki/WebKitIDL#Supplemental

I'm asking this because CSS Regions spec defines the Region interface as an 
WebIDL supplemental interface that needs to be implemented by any object that 
can be a region (Element, Pseudo elements etc.). Is there a way in WebKit to 
write an interface that implements another as specified by WebIDL?

Thanks,
Andrei.
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-dev


Re: [webkit-dev] About WebIDL supplemental interfaces

2012-07-19 Thread Kentaro Hara
Hi Andrei

 I'm asking this because CSS Regions spec defines the Region interface as an
 WebIDL supplemental interface that needs to be implemented by any object
 that can be a region (Element, Pseudo elements etc.). Is there a way in
 WebKit to write an interface that implements another as specified by
 WebIDL?

Currently, no. (Correct me if I'm wrong.)

 However, WebKitIDL defines Supplemental more like a partial interface:
 http://trac.webkit.org/wiki/WebKitIDL#Supplemental

The current WebKitIDL implementation is on the way. Eventually we
want to remove the [Supplemental] IDL attribute and support the A
implements B syntax as defined in the WebIDL.

Do you have any alternative solution to make CSS Regions work without
the A implements B syntax? If no, maybe it's time to consider
supporting the A implements B syntax (, which would require a
substantial amount of work though:-).


On Thu, Jul 19, 2012 at 5:08 PM, Andrei Bucur abu...@adobe.com wrote:
 Hello Webkitters!

 The latest WD for WebIDL defines a supplemental interface of an interface A
 as any element of the acyclic graph of interfaces that is connected to A
 through implements statements or through the inheritance chain of another
 supplemental interface:
 http://www.w3.org/TR/WebIDL/#dfn-supplemental-interface

 However, WebKitIDL defines Supplemental more like a partial interface:
 http://trac.webkit.org/wiki/WebKitIDL#Supplemental

 I'm asking this because CSS Regions spec defines the Region interface as an
 WebIDL supplemental interface that needs to be implemented by any object
 that can be a region (Element, Pseudo elements etc.). Is there a way in
 WebKit to write an interface that implements another as specified by
 WebIDL?

 Thanks,
 Andrei.

 ___
 webkit-dev mailing list
 webkit-dev@lists.webkit.org
 http://lists.webkit.org/mailman/listinfo/webkit-dev


-- 
Kentaro Hara, Tokyo, Japan (http://haraken.info)
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-dev


Re: [webkit-dev] About WebIDL supplemental interfaces

2012-07-19 Thread Andrei Bucur
Hey Kentaro,

On 7/19/12 6:20 PM, Kentaro Hara hara...@chromium.org wrote:

Hi Andrei

 I'm asking this because CSS Regions spec defines the Region interface
as an
 WebIDL supplemental interface that needs to be implemented by any object
 that can be a region (Element, Pseudo elements etc.). Is there a way in
 WebKit to write an interface that implements another as specified by
 WebIDL?

Currently, no. (Correct me if I'm wrong.)

 However, WebKitIDL defines Supplemental more like a partial
interface:
 http://trac.webkit.org/wiki/WebKitIDL#Supplemental

The current WebKitIDL implementation is on the way. Eventually we
want to remove the [Supplemental] IDL attribute and support the A
implements B syntax as defined in the WebIDL.

Do you have any alternative solution to make CSS Regions work without
the A implements B syntax? If no, maybe it's time to consider
supporting the A implements B syntax (, which would require a
substantial amount of work though:-).

The only way I can see this implemented without the new syntax is by
writing some crazy hacks, probably very similar with how EventTarget
works. And even then I'm not sure everything will work out well. Right
now, hacking things in does not seem to worth the effort, especially if
it's going to be removed once the implements syntax gets in. I'm open to
suggestions though :).
However, it would be nice to have the new syntax on board sooner than
later. Is there a roadmap for adding this in WebKit? I'm sure you are very
busy so having a timeline would allow other hackers help move the
implementation forward :).

Thanks,
Andrei.

___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-dev


Re: [webkit-dev] About WebIDL supplemental interfaces

2012-07-19 Thread Adam Barth
On Thu, Jul 19, 2012 at 9:29 AM, Andrei Bucur abu...@adobe.com wrote:

 Hey Kentaro,

 On 7/19/12 6:20 PM, Kentaro Hara hara...@chromium.org wrote:

 Hi Andrei
 
  I'm asking this because CSS Regions spec defines the Region interface
 as an
  WebIDL supplemental interface that needs to be implemented by any object
  that can be a region (Element, Pseudo elements etc.). Is there a way in
  WebKit to write an interface that implements another as specified by
  WebIDL?
 
 Currently, no. (Correct me if I'm wrong.)
 
  However, WebKitIDL defines Supplemental more like a partial
 interface:
  http://trac.webkit.org/wiki/WebKitIDL#Supplemental
 
 The current WebKitIDL implementation is on the way. Eventually we
 want to remove the [Supplemental] IDL attribute and support the A
 implements B syntax as defined in the WebIDL.
 
 Do you have any alternative solution to make CSS Regions work without
 the A implements B syntax? If no, maybe it's time to consider
 supporting the A implements B syntax (, which would require a
 substantial amount of work though:-).

 The only way I can see this implemented without the new syntax is by
 writing some crazy hacks, probably very similar with how EventTarget
 works. And even then I'm not sure everything will work out well. Right
 now, hacking things in does not seem to worth the effort, especially if
 it's going to be removed once the implements syntax gets in. I'm open to
 suggestions though :).


Can you say what specifically in the CSS regions spec is giving you trouble?

Adam



 However, it would be nice to have the new syntax on board sooner than
 later. Is there a roadmap for adding this in WebKit? I'm sure you are very
 busy so having a timeline would allow other hackers help move the
 implementation forward :).

 Thanks,
 Andrei.

 ___
 webkit-dev mailing list
 webkit-dev@lists.webkit.org
 http://lists.webkit.org/mailman/listinfo/webkit-dev

___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-dev


Re: [webkit-dev] About WebIDL supplemental interfaces

2012-07-19 Thread Andrei Bucur
Hello Adam,

Sure: http://www.w3.org/TR/2012/WD-css3-regions-20120503/#the-region-interface

The spec does not explicitly states that the Region should be supplemental, 
however after raising some issues on www-style ( 
http://lists.w3.org/Archives/Public/www-style/2012Jul/0251.html )  and talking 
them through (offline) it seemed the best way to solve them was making Region 
supplemental for Element and any other object that could become region. Right 
now, I'm feeling out the situation to see how feasible this is to be 
implemented in WebKit.

Andrei.

From: Adam Barth aba...@webkit.orgmailto:aba...@webkit.org
Date: Thursday, July 19, 2012 7:31 PM
To: Andrei Bucur abu...@adobe.commailto:abu...@adobe.com
Cc: Kentaro Hara hara...@chromium.orgmailto:hara...@chromium.org, 
webkit-dev@lists.webkit.orgmailto:webkit-dev@lists.webkit.org 
webkit-dev@lists.webkit.orgmailto:webkit-dev@lists.webkit.org
Subject: Re: [webkit-dev] About WebIDL supplemental interfaces

Can you say what specifically in the CSS regions spec is giving you trouble?

Adam
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-dev


Re: [webkit-dev] About WebIDL supplemental interfaces

2012-07-19 Thread Adam Barth
What else can become a region besides an element?  If there aren't too
many interfaces, we can just copy/paste this stanza into each IDL,
like we do for EventTarget.  If there are a lot of them, then I agree
that you'll probably want a fancier Supplemental feature.

One way to approach that is to make the [Supplemental] attribute take
a list of interfaces.  That should be straightforward to implement
given our current implementation of Supplemental.

Adam


On Thu, Jul 19, 2012 at 9:58 AM, Andrei Bucur abu...@adobe.com wrote:
 Hello Adam,

 Sure:
 http://www.w3.org/TR/2012/WD-css3-regions-20120503/#the-region-interface

 The spec does not explicitly states that the Region should be supplemental,
 however after raising some issues on www-style (
 http://lists.w3.org/Archives/Public/www-style/2012Jul/0251.html )  and
 talking them through (offline) it seemed the best way to solve them was
 making Region supplemental for Element and any other object that could
 become region. Right now, I'm feeling out the situation to see how feasible
 this is to be implemented in WebKit.

 Andrei.

 From: Adam Barth aba...@webkit.org
 Date: Thursday, July 19, 2012 7:31 PM
 To: Andrei Bucur abu...@adobe.com
 Cc: Kentaro Hara hara...@chromium.org, webkit-dev@lists.webkit.org
 webkit-dev@lists.webkit.org
 Subject: Re: [webkit-dev] About WebIDL supplemental interfaces

 Can you say what specifically in the CSS regions spec is giving you trouble?

 Adam
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-dev


Re: [webkit-dev] About WebIDL supplemental interfaces

2012-07-19 Thread Alan Stearns
Adam,

Currently, an Element is the only thing represented in the object model
that can become a CSS Region.

Pseudo-elements (::before and ::after) can become CSS Regions, but AFAIK
there isn't yet a representation of those in the OM. I'm hoping this
changes in the future (I'm working on a spec that addresses this), so that
could be a second copy. I can construct a region chain now that includes
pseudo-element Regions, and the NamedFlow interface is supposed to return
a sequence of Regions from its getRegions() method. So ideally we'd have a
way of returning a Region interface for those pseudo-elements that have
been added to the region chain.

Alan

On 7/19/12 10:50 AM, Adam Barth aba...@webkit.org wrote:

What else can become a region besides an element?  If there aren't too
many interfaces, we can just copy/paste this stanza into each IDL,
like we do for EventTarget.  If there are a lot of them, then I agree
that you'll probably want a fancier Supplemental feature.

One way to approach that is to make the [Supplemental] attribute take
a list of interfaces.  That should be straightforward to implement
given our current implementation of Supplemental.

Adam


On Thu, Jul 19, 2012 at 9:58 AM, Andrei Bucur abu...@adobe.com wrote:
 Hello Adam,

 Sure:
 http://www.w3.org/TR/2012/WD-css3-regions-20120503/#the-region-interface

 The spec does not explicitly states that the Region should be
supplemental,
 however after raising some issues on www-style (
 http://lists.w3.org/Archives/Public/www-style/2012Jul/0251.html )  and
 talking them through (offline) it seemed the best way to solve them was
 making Region supplemental for Element and any other object that could
 become region. Right now, I'm feeling out the situation to see how
feasible
 this is to be implemented in WebKit.

 Andrei.

 From: Adam Barth aba...@webkit.org
 Date: Thursday, July 19, 2012 7:31 PM
 To: Andrei Bucur abu...@adobe.com
 Cc: Kentaro Hara hara...@chromium.org, webkit-dev@lists.webkit.org
 webkit-dev@lists.webkit.org
 Subject: Re: [webkit-dev] About WebIDL supplemental interfaces

 Can you say what specifically in the CSS regions spec is giving you
trouble?

 Adam
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-dev

___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-dev


Re: [webkit-dev] About WebIDL supplemental interfaces

2012-07-19 Thread Adam Barth
It sounds like you don't have a problem today, but you might have a
problem in the future.  I'd recommend going with the simple solution
today and worrying about future problems in the future.

Adam


On Thu, Jul 19, 2012 at 11:04 AM, Alan Stearns stea...@adobe.com wrote:
 Adam,

 Currently, an Element is the only thing represented in the object model
 that can become a CSS Region.

 Pseudo-elements (::before and ::after) can become CSS Regions, but AFAIK
 there isn't yet a representation of those in the OM. I'm hoping this
 changes in the future (I'm working on a spec that addresses this), so that
 could be a second copy. I can construct a region chain now that includes
 pseudo-element Regions, and the NamedFlow interface is supposed to return
 a sequence of Regions from its getRegions() method. So ideally we'd have a
 way of returning a Region interface for those pseudo-elements that have
 been added to the region chain.

 Alan

 On 7/19/12 10:50 AM, Adam Barth aba...@webkit.org wrote:

What else can become a region besides an element?  If there aren't too
many interfaces, we can just copy/paste this stanza into each IDL,
like we do for EventTarget.  If there are a lot of them, then I agree
that you'll probably want a fancier Supplemental feature.

One way to approach that is to make the [Supplemental] attribute take
a list of interfaces.  That should be straightforward to implement
given our current implementation of Supplemental.

Adam


On Thu, Jul 19, 2012 at 9:58 AM, Andrei Bucur abu...@adobe.com wrote:
 Hello Adam,

 Sure:
 http://www.w3.org/TR/2012/WD-css3-regions-20120503/#the-region-interface

 The spec does not explicitly states that the Region should be
supplemental,
 however after raising some issues on www-style (
 http://lists.w3.org/Archives/Public/www-style/2012Jul/0251.html )  and
 talking them through (offline) it seemed the best way to solve them was
 making Region supplemental for Element and any other object that could
 become region. Right now, I'm feeling out the situation to see how
feasible
 this is to be implemented in WebKit.

 Andrei.

 From: Adam Barth aba...@webkit.org
 Date: Thursday, July 19, 2012 7:31 PM
 To: Andrei Bucur abu...@adobe.com
 Cc: Kentaro Hara hara...@chromium.org, webkit-dev@lists.webkit.org
 webkit-dev@lists.webkit.org
 Subject: Re: [webkit-dev] About WebIDL supplemental interfaces

 Can you say what specifically in the CSS regions spec is giving you
trouble?

 Adam
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-dev

___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-dev