Re: Spring meeting in Paris?

2015-01-12 Thread Michael[tm] Smith
Date: Tue, 06 Jan 2015 11:13:57 -0800 From: Ryosuke Niwa rn...@apple.com Archived-At: http://www.w3.org/mid/4ecbfae7-b763-497d-b7ab-98055ef88...@apple.com ... Do you have any update on possible F2F meeting schedule? According to HTML WG's minutes, they might be planning to have it at MIT

Re: Custom element design with ES6 classes and Element constructors

2015-01-12 Thread Anne van Kesteren
On Sun, Jan 11, 2015 at 9:13 PM, Domenic Denicola d...@domenic.me wrote: However, I don't understand how to make it work for upgraded elements at all Yes, upgrading is the problem. There's two strategies as far as I can tell to maintain a sane class design: 1) There is no upgrading. We

Re: Shadow tree style isolation primitive

2015-01-12 Thread Anne van Kesteren
On Fri, Jan 9, 2015 at 10:11 PM, Tab Atkins Jr. jackalm...@gmail.com wrote: tl;dr: Cramming a subtree into a TreeScope container and then hanging that off the DOM would do the job for free (because it bakes all that functionality in). Sure, or we could expose a property that when set isolates

Re: Shadow tree style isolation primitive

2015-01-12 Thread chaals
09.01.2015, 16:42, Anne van Kesteren ann...@annevk.nl: I'm wondering if it's feasible to provide developers with the primitive that the combination of Shadow DOM and CSS Scoping provides. Namely a way to isolate a subtree from selector matching (of document stylesheets, not necessarily user

Re: [Selection] Should selection.getRangeAt return a clone or a reference?

2015-01-12 Thread Aryeh Gregor
On Mon, Jan 12, 2015 at 3:40 AM, Karl Dubost k...@la-grange.net wrote: I'm using multiple range selection very often. From every day to a couple of times a week. My main usage is when I use bookmarking services and I want to keep part of an article which are distant. Basically a text1 […]

Re: [Selection] Should selection.getRangeAt return a clone or a reference?

2015-01-12 Thread Olivier Forget
On Sat Jan 10 2015 at 8:30:34 AM Aryeh Gregor a...@aryeh.name wrote: I don't remember whether it was ever discussed on the mailing list in depth. The gist is that no one has ever implemented it except Gecko, and I'm pretty sure no one else is interested in implementing it. The Selection

[Selection] Support of Multiple Selection (was: Should selection.getRangeAt return a clone or a reference?)

2015-01-12 Thread Ben Peters
[subject change] Multiple selection is an important feature in the future. Table columns are important, but we also need to think about BIDI. Depending on who you talk to, BIDI should support selection in document order or layout order. Layout order is not possible without multi-selection. I

Re: Custom element design with ES6 classes and Element constructors

2015-01-12 Thread Erik Arvidsson
In ES6 the constructor does both allocation and initialization. At upgrade time it is too late to do allocation so we cannot call the constructor at that time. We would need a callback for this, call it upgradeCallback for example. When the parser sees a custom element (any element with a dash in

Re: [Selection] Should selection.getRangeAt return a clone or a reference?

2015-01-12 Thread Olli Pettay
On 01/10/2015 06:30 PM, Aryeh Gregor wrote: On Fri, Jan 9, 2015 at 8:29 PM, Olivier Forget teleclim...@gmail.com wrote: On Fri Jan 09 2015 at 4:43:49 AM Aryeh Gregor a...@aryeh.name wrote: - It may never happen, but when multiple ranges are supported, are they bound to index? Everyone

Re: Shadow tree style isolation primitive

2015-01-12 Thread Tab Atkins Jr.
On Fri, Jan 9, 2015 at 5:40 AM, Anne van Kesteren ann...@annevk.nl wrote: I'm wondering if it's feasible to provide developers with the primitive that the combination of Shadow DOM and CSS Scoping provides. Namely a way to isolate a subtree from selector matching (of document stylesheets, not

Re: Shadow tree style isolation primitive

2015-01-12 Thread Ryosuke Niwa
On Jan 12, 2015, at 4:13 AM, cha...@yandex-team.ru wrote: 09.01.2015, 16:42, Anne van Kesteren ann...@annevk.nl: I'm wondering if it's feasible to provide developers with the primitive that the combination of Shadow DOM and CSS Scoping provides. Namely a way to isolate a subtree from

Re: Shadow tree style isolation primitive

2015-01-12 Thread Brian Kardell
On Mon, Jan 12, 2015 at 4:57 PM, Ryosuke Niwa rn...@apple.com wrote: On Jan 12, 2015, at 4:13 AM, cha...@yandex-team.ru wrote: 09.01.2015, 16:42, Anne van Kesteren ann...@annevk.nl: I'm wondering if it's feasible to provide developers with the primitive that the combination of Shadow

Re: Shadow tree style isolation primitive

2015-01-12 Thread Ryosuke Niwa
On Jan 12, 2015, at 1:28 PM, Tab Atkins Jr. jackalm...@gmail.com wrote: On Fri, Jan 9, 2015 at 5:40 AM, Anne van Kesteren ann...@annevk.nl wrote: I'm wondering if it's feasible to provide developers with the primitive that the combination of Shadow DOM and CSS Scoping provides. Namely a

Re: Shadow tree style isolation primitive

2015-01-12 Thread Ryosuke Niwa
On Jan 12, 2015, at 2:07 PM, Brian Kardell bkard...@gmail.com wrote: On Mon, Jan 12, 2015 at 4:57 PM, Ryosuke Niwa rn...@apple.com mailto:rn...@apple.com wrote: On Jan 12, 2015, at 4:13 AM, cha...@yandex-team.ru mailto:cha...@yandex-team.ru wrote: 09.01.2015, 16:42, Anne van

Re: Shadow tree style isolation primitive

2015-01-12 Thread Tab Atkins Jr.
On Mon, Jan 12, 2015 at 2:14 PM, Ryosuke Niwa rn...@apple.com wrote: On Jan 12, 2015, at 1:28 PM, Tab Atkins Jr. jackalm...@gmail.com wrote: Let's assume we did it, though. We'd have to have some mechanism for defining an isolation boundary, and denoting whether rules were inside or outside

Re: Custom element design with ES6 classes and Element constructors

2015-01-12 Thread Ryosuke Niwa
On Jan 12, 2015, at 5:16 AM, Anne van Kesteren ann...@annevk.nl wrote: On Sun, Jan 11, 2015 at 9:13 PM, Domenic Denicola d...@domenic.me wrote: However, I don't understand how to make it work for upgraded elements at all Yes, upgrading is the problem. There's two strategies as far as I

RE: Shadow tree style isolation primitive

2015-01-12 Thread François REMY
± On Fri, Jan 9, 2015 at 5:40 AM, Anne van Kesteren ann...@annevk.nl ± wrote: ± I'm wondering if it's feasible to provide developers with the ± primitive that the combination of Shadow DOM and CSS Scoping provides. ± Namely a way to isolate a subtree from selector matching (of document ±

RE: Custom element design with ES6 classes and Element constructors

2015-01-12 Thread Domenic Denicola
From: Ryosuke Niwa [mailto:rn...@apple.com] As we have repeatedly stated elsewhere in the mailing list, we support option 1 since authors and frameworks can trivially implement 2 or choose to set prototype without us baking the feature into the platform. At first I was sympathetic toward

Re: Shadow tree style isolation primitive

2015-01-12 Thread Ryosuke Niwa
On Jan 12, 2015, at 2:37 PM, Brian Kardell bkard...@gmail.com wrote: On Mon, Jan 12, 2015 at 5:18 PM, Ryosuke Niwa rn...@apple.com mailto:rn...@apple.com wrote: [snip] I agree that having both style isolation and subtree isolation is desirable in some use cases such as Web app

Re: Shadow tree style isolation primitive

2015-01-12 Thread Ryosuke Niwa
On Jan 12, 2015, at 3:51 PM, Ryosuke Niwa rn...@apple.com wrote: On Jan 12, 2015, at 2:41 PM, Tab Atkins Jr. jackalm...@gmail.com wrote: On Mon, Jan 12, 2015 at 2:14 PM, Ryosuke Niwa rn...@apple.com wrote: On Jan 12, 2015, at 1:28 PM, Tab Atkins Jr. jackalm...@gmail.com wrote: Let's

Re: Shadow tree style isolation primitive

2015-01-12 Thread Brian Kardell
Sure, here are some use cases I can think off the top of my head: 1. Styling a navigation bar which is implemented as a list of hyperlinks 2. Styling an article in a blog 3. Styling the comment section in a blog article 4. Styling a code snippet in a blog article None of

Re: Shadow tree style isolation primitive

2015-01-12 Thread Ryosuke Niwa
On Jan 12, 2015, at 4:28 PM, Brian Kardell bkard...@gmail.com wrote: On Mon, Jan 12, 2015 at 7:23 PM, Ryosuke Niwa rn...@apple.com mailto:rn...@apple.com wrote: On Jan 12, 2015, at 4:16 PM, Brian Kardell bkard...@gmail.com mailto:bkard...@gmail.com wrote: Sure, here are some

Re: Shadow tree style isolation primitive

2015-01-12 Thread Ryosuke Niwa
On Jan 12, 2015, at 2:41 PM, Tab Atkins Jr. jackalm...@gmail.com wrote: On Mon, Jan 12, 2015 at 2:14 PM, Ryosuke Niwa rn...@apple.com wrote: On Jan 12, 2015, at 1:28 PM, Tab Atkins Jr. jackalm...@gmail.com wrote: Let's assume we did it, though. We'd have to have some mechanism for

RE: Custom element design with ES6 classes and Element constructors

2015-01-12 Thread Domenic Denicola
From: Domenic Denicola [mailto:d...@domenic.me] In other words, in an ES6 modules world, all custom elements are upgraded elements. Should be, In other words, in an ES6 modules world, all custom elements __that appear in the initially-downloaded .html file__ are upgraded elements.

Re: Shadow tree style isolation primitive

2015-01-12 Thread Ryosuke Niwa
On Jan 12, 2015, at 5:41 PM, Tab Atkins Jr. jackalm...@gmail.com wrote: [ryosuke, your mail client keeps producing flattened replies. maybe send as plain-text, not HTML?] Weird. I'm not seeing that at all on my end. The style defined for bar *in bar's setup code* (that is, in a style

Re: Custom element design with ES6 classes and Element constructors

2015-01-12 Thread Ryosuke Niwa
On Jan 12, 2015, at 2:59 PM, Domenic Denicola d...@domenic.me wrote: From: Ryosuke Niwa [mailto:rn...@apple.com] As we have repeatedly stated elsewhere in the mailing list, we support option 1 since authors and frameworks can trivially implement 2 or choose to set prototype without us

Re: Shadow tree style isolation primitive

2015-01-12 Thread Ryosuke Niwa
On Jan 12, 2015, at 4:10 PM, Tab Atkins Jr. jackalm...@gmail.com wrote: On Mon, Jan 12, 2015 at 3:51 PM, Ryosuke Niwa rn...@apple.com wrote: On Jan 12, 2015, at 2:41 PM, Tab Atkins Jr. jackalm...@gmail.com wrote: On Mon, Jan 12, 2015 at 2:14 PM, Ryosuke Niwa rn...@apple.com wrote: On Jan

Re: Custom element design with ES6 classes and Element constructors

2015-01-12 Thread Ryosuke Niwa
On Jan 12, 2015, at 4:24 PM, Domenic Denicola d...@domenic.me wrote: From: Ryosuke Niwa [mailto:rn...@apple.com] In that case, we can either delay the instantiation of those unknown elements with - in their names until pending module loads are finished Could you explain this in a bit

RE: Custom element design with ES6 classes and Element constructors

2015-01-12 Thread Domenic Denicola
From: Ryosuke Niwa [mailto:rn...@apple.com] In that case, we can either delay the instantiation of those unknown elements with - in their names until pending module loads are finished Could you explain this in a bit more detail? I'm hoping there's some brilliant solution hidden here that I

Re: Shadow tree style isolation primitive

2015-01-12 Thread Tab Atkins Jr.
[oof, somehow your latest response flattened all of the quotes] On Mon, Jan 12, 2015 at 4:18 PM, Ryosuke Niwa rn...@apple.com wrote: On Jan 12, 2015, at 4:10 PM, Tab Atkins Jr. jackalm...@gmail.com wrote: ? I didn't mention DOM APIs. I'm referring back to the example you're replying to - if

Re: Shadow tree style isolation primitive

2015-01-12 Thread Brian Kardell
On Mon, Jan 12, 2015 at 7:45 PM, Ryosuke Niwa rn...@apple.com wrote: I understand your use case but please also understand that some authors don't want to write a few dozen lines of JavaScript to create a shadow DOM, and hundreds of lines of code or load a framework to decoratively isolate

Re: Shadow tree style isolation primitive

2015-01-12 Thread Tab Atkins Jr.
On Mon, Jan 12, 2015 at 3:51 PM, Ryosuke Niwa rn...@apple.com wrote: On Jan 12, 2015, at 2:41 PM, Tab Atkins Jr. jackalm...@gmail.com wrote: On Mon, Jan 12, 2015 at 2:14 PM, Ryosuke Niwa rn...@apple.com wrote: On Jan 12, 2015, at 1:28 PM, Tab Atkins Jr. jackalm...@gmail.com wrote: Let's assume

Re: Shadow tree style isolation primitive

2015-01-12 Thread Ryosuke Niwa
On Jan 12, 2015, at 4:16 PM, Brian Kardell bkard...@gmail.com wrote: Sure, here are some use cases I can think off the top of my head: Styling a navigation bar which is implemented as a list of hyperlinks Styling an article in a blog Styling the comment section in a blog article Styling

Re: Shadow tree style isolation primitive

2015-01-12 Thread Brian Kardell
On Mon, Jan 12, 2015 at 7:23 PM, Ryosuke Niwa rn...@apple.com wrote: On Jan 12, 2015, at 4:16 PM, Brian Kardell bkard...@gmail.com wrote: Sure, here are some use cases I can think off the top of my head: 1. Styling a navigation bar which is implemented as a list of hyperlinks 2.

Re: Shadow tree style isolation primitive

2015-01-12 Thread Tab Atkins Jr.
[ryosuke, your mail client keeps producing flattened replies. maybe send as plain-text, not HTML?] On Mon, Jan 12, 2015 at 5:23 PM, Ryosuke Niwa rn...@apple.com wrote: On Jan 12, 2015, at 4:59 PM, Tab Atkins Jr. jackalm...@gmail.com wrote: On Mon, Jan 12, 2015 at 4:18 PM, Ryosuke Niwa

Re: Shadow tree style isolation primitive

2015-01-12 Thread Tab Atkins Jr.
On Mon, Jan 12, 2015 at 5:59 PM, Ryosuke Niwa rn...@apple.com wrote: On Jan 12, 2015, at 5:41 PM, Tab Atkins Jr. jackalm...@gmail.com wrote: [ryosuke, your mail client keeps producing flattened replies. maybe send as plain-text, not HTML?] Weird. I'm not seeing that at all on my end. It's

Re: Shadow tree style isolation primitive

2015-01-12 Thread Ryosuke Niwa
On Jan 12, 2015, at 6:11 PM, Tab Atkins Jr. jackalm...@gmail.com wrote: On Mon, Jan 12, 2015 at 5:59 PM, Ryosuke Niwa rn...@apple.com wrote: On Jan 12, 2015, at 5:41 PM, Tab Atkins Jr. jackalm...@gmail.com wrote: [ryosuke, your mail client keeps producing flattened replies. maybe send as

Re: [Selection] Should selection.getRangeAt return a clone or a reference?

2015-01-12 Thread Boris Zbarsky
On 1/12/15 1:56 PM, Olivier Forget wrote: Unfortunately multiple range selections are not a nice to have. All real editors (MS Word, Google Docs, etc..) support selecting multiple ranges Precisely. This is why Gecko ended up supporting it: it was needed for the editor that was part of the

Re: Shadow tree style isolation primitive

2015-01-12 Thread Hayato Ito
Intent to remove style scoped in blink-dev is here: https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/R1x18ZLS5qQ On Tue Jan 13 2015 at 1:26:52 PM Marc Fawzi marc.fa...@gmail.com wrote: Can someone shed light at why Scoped Style Element was removed from Chrome experimental

Adopting a Custom Element into Another Document

2015-01-12 Thread Ryosuke Niwa
Hi, Have you settled the question of what happens to a custom element that's adopted into another document? As far as I tested, WebKit and Blink keep the old __proto__ while Gecko changes it to the adopted document's prototype. There is a bug in DOM component about this:

Re: Custom element design with ES6 classes and Element constructors

2015-01-12 Thread Boris Zbarsky
On 1/12/15 12:20 PM, Tab Atkins Jr. wrote: Proto munging isn't even that big of a deal. That really depends. For example, dynamically changing __proto__ on something somewhat permanently deoptimizes that object in at least some JS engines. Whether that's a big deal depends on what you do

Re: Defining a constructor for Element and friends

2015-01-12 Thread Boris Zbarsky
On 1/11/15 2:33 PM, Domenic Denicola wrote: Terminology: In what follows I use 'own-instances of X' to mean objects where obj.constructor === X, That doesn't make much sense to me as a useful test, since it's pretty simple to produce, say, an HTMLParagraphElement instance on the web that

Re: Shadow tree style isolation primitive

2015-01-12 Thread Marc Fawzi
Can someone shed light at why Scoped Style Element was removed from Chrome experimental features? http://caniuse.com/#feat=style-scoped In suggesting @isolate declaration, I meant it would go inside a scoped style element. If there are nested scope style elements and each have @isolate then it

Re: Custom element design with ES6 classes and Element constructors

2015-01-12 Thread Boris Zbarsky
On 1/11/15 3:13 PM, Domenic Denicola wrote: So, at least as a thought experiment: what if we got rid of all the local name checks in implementations and the spec. I think then `my-q` could work, as long as it was done *after* `document.registerElement` calls. Yes. However, I don't

Re: element.onresize

2015-01-12 Thread Spirit
But what if we can get notification only for some of elements (not all) via setting some properties or methods. This not solve performance isue? Something like this: el.resized = true el.resized(true|false) etc. and only el will generate resize event. Or fire resize only for elements that

Re: Custom element design with ES6 classes and Element constructors

2015-01-12 Thread Boris Zbarsky
On 1/12/15 7:24 PM, Domenic Denicola wrote: One crazy idea for solving B is to make every DOM element (or at least, every one generated via parsing a hyphenated or is= element) into a proxy whose target can switch from e.g. `new HTMLUnknownElement()` to `new MyEl()` after upgrading. Like

Re: Shadow tree style isolation primitive

2015-01-12 Thread Marc Fawzi
If the goal is to isolate a style sheet or several per a DOM sub tree then why not just use scoped style element that has imports that apply the stylesheet(s) only to the sub tree in scope? Obviously, you are talking about preventing stylesheets applied at a higher level from leaking in. So

RE: Custom element design with ES6 classes and Element constructors

2015-01-12 Thread Domenic Denicola
From: Tab Atkins Jr. [mailto:jackalm...@gmail.com] Proto munging isn't even that big of a deal. It's the back-end stuff that's kinda-proto but doesn't munge that's the problem. This is potentially fixable if we can migrate more elements out into JS space. It really isn't though, at least,

Re: Custom element design with ES6 classes and Element constructors

2015-01-12 Thread Tab Atkins Jr.
On Mon, Jan 12, 2015 at 5:16 AM, Anne van Kesteren ann...@annevk.nl wrote: On Sun, Jan 11, 2015 at 9:13 PM, Domenic Denicola d...@domenic.me wrote: However, I don't understand how to make it work for upgraded elements at all Yes, upgrading is the problem. There's two strategies as far as I can

Re: Shadow tree style isolation primitive

2015-01-12 Thread Brian Kardell
On Mon, Jan 12, 2015 at 11:51 AM, Anne van Kesteren ann...@annevk.nl wrote: On Mon, Jan 12, 2015 at 5:47 PM, Brian Kardell bkard...@gmail.com wrote: Controlling it through CSS definitely seems to be very high-level. To me at least it feels like it requires a lot more answering of how since

Re: Shadow tree style isolation primitive

2015-01-12 Thread Brian Kardell
On Mon, Jan 12, 2015 at 7:04 AM, Anne van Kesteren ann...@annevk.nl wrote: On Fri, Jan 9, 2015 at 10:11 PM, Tab Atkins Jr. jackalm...@gmail.com wrote: tl;dr: Cramming a subtree into a TreeScope container and then hanging that off the DOM would do the job for free (because it bakes all

Re: Shadow tree style isolation primitive

2015-01-12 Thread Anne van Kesteren
On Mon, Jan 12, 2015 at 5:47 PM, Brian Kardell bkard...@gmail.com wrote: Controlling it through CSS definitely seems to be very high-level. To me at least it feels like it requires a lot more answering of how since it deals with identifying elements by way of rules/selection in order to