Re: Component Models and Encapsulation (was Re: Component Model: Landing Experimental Shadow DOM API in WebKit)

2011-06-30 Thread Roland Steiner
On Fri, Jul 1, 2011 at 7:01 AM, Dimitri Glazkov wrote: > On Thu, Jun 30, 2011 at 2:50 PM, Boris Zbarsky wrote: > > On 6/30/11 5:45 PM, Dimitri Glazkov wrote: > >> > >> There's a very interesting distinction here. You don't "attach" > >> components to DOM elements. DOM elements _are_ components.

Re: Component Models and Encapsulation (was Re: Component Model: Landing Experimental Shadow DOM API in WebKit)

2011-06-30 Thread Boris Zbarsky
On 6/30/11 6:04 PM, Dimitri Glazkov wrote: Perhaps the right solution is to require and disallow access to shadow DOM tree if the sub-class is not overriding the subtree? I don't know. First, I'm not sure what problem we're solving. Second, I'm not sure what does Third, who is being d

Re: Component Models and Encapsulation (was Re: Component Model: Landing Experimental Shadow DOM API in WebKit)

2011-06-30 Thread Dimitri Glazkov
Perhaps the right solution is to require and disallow access to shadow DOM tree if the sub-class is not overriding the subtree? :DG<

Re: Component Model: Landing Experimental Shadow DOM API in WebKit

2011-06-30 Thread Garrett Smith
On 6/29/11, Dimitri Glazkov wrote: > Hi Folks! > > With use cases (http://wiki.whatwg.org/wiki/Component_Model_Use_Cases) > firmed up, and isolation > (http://lists.w3.org/Archives/Public/public-webapps/2011JanMar/0900.html), > inheritance > (http://lists.w3.org/Archives/Public/public-webapps/2011

Re: Component Models and Encapsulation (was Re: Component Model: Landing Experimental Shadow DOM API in WebKit)

2011-06-30 Thread Dimitri Glazkov
On Thu, Jun 30, 2011 at 2:50 PM, Boris Zbarsky wrote: > On 6/30/11 5:45 PM, Dimitri Glazkov wrote: >> >> There's a very interesting distinction here. You don't "attach" >> components to DOM elements. DOM elements _are_ components. The only >> way to make a component is by sub-classing it from an e

Re: Component Models and Encapsulation (was Re: Component Model: Landing Experimental Shadow DOM API in WebKit)

2011-06-30 Thread Dimitri Glazkov
On Thu, Jun 30, 2011 at 2:50 PM, Boris Zbarsky wrote: > On 6/30/11 5:45 PM, Dimitri Glazkov wrote: >> >> There's a very interesting distinction here. You don't "attach" >> components to DOM elements. DOM elements _are_ components. The only >> way to make a component is by sub-classing it from an e

Re: Component Models and Encapsulation (was Re: Component Model: Landing Experimental Shadow DOM API in WebKit)

2011-06-30 Thread Boris Zbarsky
On 6/30/11 5:45 PM, Dimitri Glazkov wrote: There's a very interesting distinction here. You don't "attach" components to DOM elements. DOM elements _are_ components. The only way to make a component is by sub-classing it from an existing element. In this case, there is no distinction between nati

Re: Component Models and Encapsulation (was Re: Component Model: Landing Experimental Shadow DOM API in WebKit)

2011-06-30 Thread Dimitri Glazkov
On Thu, Jun 30, 2011 at 2:21 PM, Maciej Stachowiak wrote: > > On Jun 30, 2011, at 2:07 PM, Dimitri Glazkov wrote: > > On Thu, Jun 30, 2011 at 1:32 PM, Maciej Stachowiak wrote: > > On Jun 30, 2011, at 1:03 PM, Dimitri Glazkov wrote: > > > In the case of extending elements with native shadow DOM, y

Re: Component Models and Encapsulation (was Re: Component Model: Landing Experimental Shadow DOM API in WebKit)

2011-06-30 Thread Maciej Stachowiak
On Jun 30, 2011, at 2:07 PM, Dimitri Glazkov wrote: > On Thu, Jun 30, 2011 at 1:32 PM, Maciej Stachowiak wrote: >> >> On Jun 30, 2011, at 1:03 PM, Dimitri Glazkov wrote: >> > > In the case of extending elements with native shadow DOM, you have to > use composition or have something like , whe

Re: Component Model: Landing Experimental Shadow DOM API in WebKit

2011-06-30 Thread Dimitri Glazkov
On Thu, Jun 30, 2011 at 10:59 AM, Maciej Stachowiak wrote: > > On Jun 29, 2011, at 9:08 AM, Dimitri Glazkov wrote: > >> Hi Folks! >> >> With use cases (http://wiki.whatwg.org/wiki/Component_Model_Use_Cases) > > So I looked at this list of use cases. It seems to me almost none of these > are met b

Re: Component Models and Encapsulation (was Re: Component Model: Landing Experimental Shadow DOM API in WebKit)

2011-06-30 Thread Dimitri Glazkov
On Thu, Jun 30, 2011 at 1:32 PM, Maciej Stachowiak wrote: > > On Jun 30, 2011, at 1:03 PM, Dimitri Glazkov wrote: > >> Maciej, as promised on #whatwg, here's a more thorough review of your >> proposal. I am in agreement in the first parts of your email, so I am >> going to skip those. >> >>> =3D=3

Re: Component Models and Encapsulation (was Re: Component Model: Landing Experimental Shadow DOM API in WebKit)

2011-06-30 Thread Maciej Stachowiak
On Jun 30, 2011, at 1:03 PM, Dimitri Glazkov wrote: > Maciej, as promised on #whatwg, here's a more thorough review of your > proposal. I am in agreement in the first parts of your email, so I am > going to skip those. > >> == Are there other limitations created by the lack of encapsulation? ==

Re: Component Models and Encapsulation (was Re: Component Model: Landing Experimental Shadow DOM API in WebKit)

2011-06-30 Thread Dimitri Glazkov
Maciej, as promised on #whatwg, here's a more thorough review of your proposal. I am in agreement in the first parts of your email, so I am going to skip those. > == Are there other limitations created by the lack of encapsulation? == > > My understanding is yes, there are some serious limitations

Re: Component Models and Encapsulation (was Re: Component Model: Landing Experimental Shadow DOM API in WebKit)

2011-06-30 Thread Maciej Stachowiak
On Jun 30, 2011, at 10:57 AM, Dimitri Glazkov wrote: > Hi Maciej! > > First off, I really appreciate your willingness to get into the mix of > things. It's a hard problem and I welcome any help we can get to solve > it. > > I also very much liked your outline of encapsulation and I would like >

Re: Component Model: Landing Experimental Shadow DOM API in WebKit

2011-06-30 Thread Maciej Stachowiak
On Jun 29, 2011, at 9:08 AM, Dimitri Glazkov wrote: > Hi Folks! > > With use cases (http://wiki.whatwg.org/wiki/Component_Model_Use_Cases) So I looked at this list of use cases. It seems to me almost none of these are met by the proposal at

Re: Component Models and Encapsulation (was Re: Component Model: Landing Experimental Shadow DOM API in WebKit)

2011-06-30 Thread Dimitri Glazkov
Hi Maciej! First off, I really appreciate your willingness to get into the mix of things. It's a hard problem and I welcome any help we can get to solve it. I also very much liked your outline of encapsulation and I would like to start using the terminology you introduced. I am even flattered to

Component Models and Encapsulation (was Re: Component Model: Landing Experimental Shadow DOM API in WebKit)

2011-06-29 Thread Maciej Stachowiak
I am not a fan of this API because I don't think it provides sufficient encapsulation. The words "encapsulation" and "isolation" have been used in different ways in this discussion, so I will start with an outline of different possible senses of "encapsulation" that could apply here. == Diffe

Re: Component Model: Landing Experimental Shadow DOM API in WebKit

2011-06-29 Thread Cameron McCormack
Anne van Kesteren: > > How can Document inherit from TreeScope if it already inherits from Node? Dimitri Glazkov: > TreeScope is a Node. That doesn’t work now that Web IDL allows only single inheritance. Here is how I would write the IDL, if I understand what you want correctly: // augment El

Re: Component Model: Landing Experimental Shadow DOM API in WebKit

2011-06-29 Thread Dimitri Glazkov
On Wed, Jun 29, 2011 at 1:56 PM, Anne van Kesteren wrote: > On Wed, 29 Jun 2011 19:17:01 +0200, Dimitri Glazkov > wrote: >> >> The former: >> http://codesearch.google.com/codesearch#OAMlx_jo-ck/src/third_party/WebKit/Source/WebCore/dom/Document.h&l=208 > > How can Document inherit from TreeScope

Re: Component Model: Landing Experimental Shadow DOM API in WebKit

2011-06-29 Thread Anne van Kesteren
On Wed, 29 Jun 2011 19:17:01 +0200, Dimitri Glazkov wrote: The former: http://codesearch.google.com/codesearch#OAMlx_jo-ck/src/third_party/WebKit/Source/WebCore/dom/Document.h&l=208 How can Document inherit from TreeScope if it already inherits from Node? -- Anne van Kesteren http://anneva

Re: Component Model: Landing Experimental Shadow DOM API in WebKit

2011-06-29 Thread Dimitri Glazkov
+cam, in case his mail filters are haters. :DG< On Wed, Jun 29, 2011 at 10:17 AM, Dimitri Glazkov wrote: > On Wed, Jun 29, 2011 at 10:14 AM, Boris Zbarsky wrote: >> On 6/29/11 12:59 PM, Dimitri Glazkov wrote: >> >>> It will just return null when the membrane is in place. >> >> OK.  And the enca

Re: Component Model: Landing Experimental Shadow DOM API in WebKit

2011-06-29 Thread Dimitri Glazkov
On Wed, Jun 29, 2011 at 10:14 AM, Boris Zbarsky wrote: > On 6/29/11 12:59 PM, Dimitri Glazkov wrote: > >> It will just return null when the membrane is in place. > > OK.  And the encapsulation will prevent other ways of getting at the shadow > tree? Yes! element.shadow is the only way to access s

Re: Component Model: Landing Experimental Shadow DOM API in WebKit

2011-06-29 Thread Boris Zbarsky
On 6/29/11 12:59 PM, Dimitri Glazkov wrote: > It will just return null when the membrane is in place. OK. And the encapsulation will prevent other ways of getting at the shadow tree? Ah yes -- I didn't know how to express this in IDL. The Node comes to Document by way of TreeScope. Docume

Re: Component Model: Landing Experimental Shadow DOM API in WebKit

2011-06-29 Thread Dimitri Glazkov
On Wed, Jun 29, 2011 at 9:41 AM, Boris Zbarsky wrote: > On 6/29/11 12:08 PM, Dimitri Glazkov wrote: >> >> 2) There is no separation between internal >> (http://dev.w3.org/2006/xbl2/#xblimplementation) and external objects, >> since we decided to push isolation into its own spec. > > I still think

Re: Component Model: Landing Experimental Shadow DOM API in WebKit

2011-06-29 Thread Boris Zbarsky
On 6/29/11 12:08 PM, Dimitri Glazkov wrote: 2) There is no separation between internal (http://dev.w3.org/2006/xbl2/#xblimplementation) and external objects, since we decided to push isolation into its own spec. I still think this is a mistake that will come back and bite as as we try to bolt

Component Model: Landing Experimental Shadow DOM API in WebKit

2011-06-29 Thread Dimitri Glazkov
Hi Folks! With use cases (http://wiki.whatwg.org/wiki/Component_Model_Use_Cases) firmed up, and isolation (http://lists.w3.org/Archives/Public/public-webapps/2011JanMar/0900.html), inheritance (http://lists.w3.org/Archives/Public/public-webapps/2011JanMar/0941.html) out of the way, a component mo