Re: Fallout of non-encapsulated shadow trees

2014-07-02 Thread Adam Barth
On Tue, Jul 1, 2014 at 8:52 PM, Boris Zbarsky bzbar...@mit.edu wrote: On 7/1/14, 9:13 PM, Brendan Eich wrote: Are you sure? Because Gecko has used XBL (1) to implement, e.g., input type=file, or so my aging memory says. We use XBL to implement marquee. I'm working on using web components to

Re: Fallout of non-encapsulated shadow trees

2014-07-02 Thread Boris Zbarsky
On 7/2/14, 11:07 AM, Adam Barth wrote: I've studied the XBL implementation of marquee in Gecko, and it does leak some implementation details. Absolutely. The point of the XBL implementation was to provide the functionality (back before there was a spec for it, note) at minimal cost and core

Re: Fallout of non-encapsulated shadow trees

2014-07-02 Thread Ryosuke Niwa
On Jul 2, 2014, at 8:07 AM, Adam Barth w...@adambarth.com wrote: On Tue, Jul 1, 2014 at 8:52 PM, Boris Zbarsky bzbar...@mit.edu wrote: On 7/1/14, 9:13 PM, Brendan Eich wrote: Are you sure? Because Gecko has used XBL (1) to implement, e.g., input type=file, or so my aging memory says. We

Re: Fallout of non-encapsulated shadow trees

2014-07-02 Thread Adam Barth
On Wed, Jul 2, 2014 at 8:15 AM, Ryosuke Niwa rn...@apple.com wrote: On Jul 2, 2014, at 8:07 AM, Adam Barth w...@adambarth.com wrote: On Tue, Jul 1, 2014 at 8:52 PM, Boris Zbarsky bzbar...@mit.edu wrote: On 7/1/14, 9:13 PM, Brendan Eich wrote: Are you sure? Because Gecko has used XBL (1) to

RE: Fallout of non-encapsulated shadow trees

2014-07-01 Thread Domenic Denicola
From: Maciej Stachowiak m...@apple.com Web Components as currently designed cannot explain the behavior of any built-in elements (except maybe those which can be explained with CSS alone). Unfortunately this is a hard problem that nobody has even sketched a solution to. From what I

Re: Fallout of non-encapsulated shadow trees

2014-07-01 Thread Brendan Eich
Domenic Denicola wrote: True encapsulation, wherein each element gets some kind of isolated world in which to implement itself, is much harder. Blink-in-JS [1] accomplishes something along these lines, but does not leverage custom elements, shadow DOM, or the like, and essentially works by

Re: Fallout of non-encapsulated shadow trees

2014-07-01 Thread Edward O'Connor
Hi, Maciej said: I agree with the need for encapsulation in Web Components and have been arguing for it for a long time. Currently, despite agreement dating back several years, it doesn’t even offer a mode with better encapsulation. Now that the non-encapsulation version has shipped in

Re: Fallout of non-encapsulated shadow trees

2014-07-01 Thread Brendan Eich
I meant Shadow DOM below, where I wrote Web Components. IIRC Mozilla second, Google first, are implementing. Anyone else? /be Brendan Eich wrote: I'm not saying WebComponents aren't good enough, note well. Sounds like they're pretty good and can be evolved and built upon to be even better in

RE: Fallout of non-encapsulated shadow trees

2014-07-01 Thread Domenic Denicola
From: Edward O'Connor [mailto:eocon...@apple.com] But soft encapsulation is just as useless for explaining the platform as no encapsulation at all. I think just as useless overstates your case. Type 2 allows you to hide implementation details of your component from authors better than

Re: Fallout of non-encapsulated shadow trees

2014-07-01 Thread Brendan Eich
Domenic Denicola wrote: Well, but*for explaining the platform* it is just as useless. That is a false idol if it means no intermediate steps that explain some but not all of the platform. It may be useful independently for authors who wish to protect against interference by people who

RE: Fallout of non-encapsulated shadow trees

2014-07-01 Thread Domenic Denicola
From: Brendan Eich [mailto:bren...@secure.meer.net] That is a false idol if it means no intermediate steps that explain some but not all of the platform. Sure. But I don't think the proposed type 2 encapsulation explains any of the platform at all. (Just as per Maciej's email from Monday,

Re: Fallout of non-encapsulated shadow trees

2014-07-01 Thread Brendan Eich
Domenic Denicola wrote: From: Brendan Eich [mailto:bren...@secure.meer.net] That is a false idol if it means no intermediate steps that explain some but not all of the platform. Sure. But I don't think the proposed type 2 encapsulation explains any of the platform at all. Are you sure?

Re: Fallout of non-encapsulated shadow trees

2014-07-01 Thread Ryosuke Niwa
On Jul 1, 2014, at 5:34 PM, Domenic Denicola dome...@domenicdenicola.com wrote: From: Edward O'Connor [mailto:eocon...@apple.com] But soft encapsulation is just as useless for explaining the platform as no encapsulation at all. I think just as useless overstates your case. Type 2

RE: Fallout of non-encapsulated shadow trees

2014-07-01 Thread Domenic Denicola
From: Brendan Eich [mailto:bren...@secure.meer.net] I don't even know what 3 means. Is it well defined, or just some utopia? I think it is as well defined as 2 is. Both are really in terms of vague requirements: 2. Widget libraries should be implementable without leaking implementation

Re: Fallout of non-encapsulated shadow trees

2014-07-01 Thread Tab Atkins Jr.
On Tue, Jul 1, 2014 at 6:13 PM, Brendan Eich bren...@secure.meer.net wrote: Domenic Denicola wrote: From: Brendan Eich [mailto:bren...@secure.meer.net] That is a false idol if it means no intermediate steps that explain some but not all of the platform. Sure. But I don't think the

Re: Fallout of non-encapsulated shadow trees

2014-07-01 Thread Brendan Eich
Domenic Denicola wrote: From: Brendan Eich [mailto:bren...@secure.meer.net] I don't even know what 3 means. Is it well defined, or just some utopia? I think it is as well defined as 2 is. Both are really in terms of vague requirements: 2. Widget libraries should be implementable without

Re: Fallout of non-encapsulated shadow trees

2014-07-01 Thread Maciej Stachowiak
On Jul 1, 2014, at 3:26 PM, Domenic Denicola dome...@domenicdenicola.com wrote: From: Maciej Stachowiak m...@apple.com Web Components as currently designed cannot explain the behavior of any built-in elements (except maybe those which can be explained with CSS alone). Unfortunately

Re: Fallout of non-encapsulated shadow trees

2014-07-01 Thread Brian Kardell
[snip] On Jul 1, 2014 10:07 PM, Maciej Stachowiak m...@apple.com wrote: (3) A two-way membrane at the API layer between a component and a script; approximately, this would be the Structured Clone algorithm, but extended to also translate references to DOM objects between the worlds. Has this

Re: Fallout of non-encapsulated shadow trees

2014-07-01 Thread Boris Zbarsky
On 7/1/14, 9:16 PM, Ryosuke Niwa wrote: I would love to hear from Mozillians if they have gotten enough developer feedbacks Our implementation is currently at a stage that can best be described as not usable yet, which is most of the feedback we've gotten thus far. ;) -Boris

Re: Fallout of non-encapsulated shadow trees

2014-07-01 Thread Boris Zbarsky
On 7/1/14, 9:13 PM, Brendan Eich wrote: Are you sure? Because Gecko has used XBL (1) to implement, e.g., input type=file, or so my aging memory says. We use XBL to implement marquee. We do not use XBL to implement input type=file, though there was once a project to do that sort of thing.

Re: Fallout of non-encapsulated shadow trees

2014-07-01 Thread Boris Zbarsky
On 7/1/14, 11:20 PM, Brendan Eich wrote: XBL can expose anonymous content via special API: https://developer.mozilla.org/en-US/docs/XBL/XBL_1.0_Reference/DOM_Interfaces#getAnonymousNodes https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Tutorial/XBL_Example

Re: Fallout of non-encapsulated shadow trees

2014-07-01 Thread Brendan Eich
Boris Zbarsky wrote: On 7/1/14, 9:13 PM, Brendan Eich wrote: Are you sure? Because Gecko has used XBL (1) to implement, e.g., input type=file, or so my aging memory says. We use XBL to implement marquee. Also video playback controls, per your next message. We do not use XBL to implement

Re: Fallout of non-encapsulated shadow trees

2014-07-01 Thread Boris Zbarsky
On 7/2/14, 12:15 AM, Brendan Eich wrote: Boris Zbarsky wrote: On 7/1/14, 9:13 PM, Brendan Eich wrote: Are you sure? Because Gecko has used XBL (1) to implement, e.g., input type=file, or so my aging memory says. We use XBL to implement marquee. Also video playback controls, per your next

Re: Fallout of non-encapsulated shadow trees

2014-06-30 Thread Ryosuke Niwa
On May 15, 2014, at 6:17 AM, Anne van Kesteren ann...@annevk.nl wrote: I'm still trying to grasp the philosophy behind shadow trees. Sometimes it's explained as exposing the primitives but the more I learn (rather slowly, this time at BlinkOn) the more it looks like a bunch of new primitives.

Re: Fallout of non-encapsulated shadow trees

2014-06-30 Thread Maciej Stachowiak
On May 15, 2014, at 6:17 AM, Anne van Kesteren ann...@annevk.nl wrote: I'm still trying to grasp the philosophy behind shadow trees. Sometimes it's explained as exposing the primitives but the more I learn (rather slowly, this time at BlinkOn) the more it looks like a bunch of new