Re: Defining a constructor for Element and friends

2015-01-09 Thread Boris Zbarsky
On 1/9/15 8:01 PM, Domenic Denicola wrote: I was writing up my ideas in an email but it kind of snowballed into something bigger so now it's a repo: https://github.com/domenic/element-constructors Domenic, thanks for putting this together. Caveat: I won't get a chance to read through this

RE: Defining a constructor for Element and friends

2015-01-09 Thread Domenic Denicola
OK, so I've thought about this a lot, and there was some discussion on an unfortunately-TC39-private thread that I want to put out in the open. In [1] I outlined some initial thoughts, but that was actually a thread on a different topic, and my thinking has evolved. [1]:

Re: [Pointer Lock] Comments

2015-01-09 Thread Vincent Scheib
Thank you again: https://dvcs.w3.org/hg/pointerlock/rev/25ad122a8000 On Tue, Dec 2, 2014 at 6:43 PM, timeless timel...@gmail.com wrote: 1. w3c is en-us https://dvcs.w3.org/hg/pointerlock/raw-file/ea789b4e5b82/index.html#abstract modelling - modeling Done. 2. Xlib

Re: Shadow tree style isolation primitive

2015-01-09 Thread Brian Kardell
On Jan 9, 2015 8:43 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: Custom element lifecycle callbacks

2015-01-09 Thread Domenic Denicola
From: annevankeste...@gmail.com [mailto:annevankeste...@gmail.com] On Behalf Of Anne van Kesteren On Fri, Jan 9, 2015 at 3:30 AM, Adam Klein ad...@chromium.org wrote: Do you have a proposal for where these symbols would be vended? My idea was to put them on Node or Element as statics,

Re: Shadow tree style isolation primitive

2015-01-09 Thread Brian Kardell
On Fri, Jan 9, 2015 at 10:49 AM, Anne van Kesteren ann...@annevk.nl wrote: I wasn't suggesting anything since I'm not sure what the best way would be. It has to be some flag that eventually ends up on an element so when you do selector matching you know what subtrees to ignore. If you set

Re: Custom element lifecycle callbacks

2015-01-09 Thread Boris Zbarsky
On 1/9/15 9:33 AM, Anne van Kesteren wrote: On Fri, Jan 9, 2015 at 3:09 PM, Boris Zbarsky bzbar...@mit.edu wrote: In any case, the fact that we're even _having_ this discussion and that it needs careful reading of the HTML spec is my point. It does seem however we could define this in a way

Re: Shadow tree style isolation primitive

2015-01-09 Thread Anne van Kesteren
On Fri, Jan 9, 2015 at 4:35 PM, Brian Kardell bkard...@gmail.com wrote: For clarity, are you suggesting you'd control the matching boundary via CSS somehow or you'd need an indicator in the tree? A new element/attribute or something like a fragment root (sort of a shadowroot-lite)? I wasn't

Re: Shadow tree style isolation primitive

2015-01-09 Thread Dimitri Glazkov
For the record, I am a huge fan of exploring this. I tried a couple of times, but was unable to extract this primitive from Shadow DOM in a clean way. I talked with Tab late last year about restarting this effort, so this is timely. :DG On Fri, Jan 9, 2015 at 7:49 AM, Anne van Kesteren

Re: Custom element lifecycle callbacks

2015-01-09 Thread Anne van Kesteren
On Thu, Jan 8, 2015 at 5:54 PM, Boris Zbarsky bzbar...@mit.edu wrote: On 1/8/15 10:56 AM, Anne van Kesteren wrote: 2) For normal elements we act directly when they are cloned or adopted. How much interest is there in delaying what happens for normal elements to align them with custom elements?

Re: Custom element lifecycle callbacks

2015-01-09 Thread Anne van Kesteren
On Fri, Jan 9, 2015 at 3:30 AM, Adam Klein ad...@chromium.org wrote: Do you have a proposal for where these symbols would be vended? In ES, builtin symbols are available as properties on the Symbol object, but clearly WebIDL shouldn't be adding things there. This might be a good question for

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

2015-01-09 Thread Mats Palmgren
On 01/07/2015 10:08 AM, Koji Ishii wrote: While I agree that it's nice, I have mild preference to return a clone. As Olii said, changing from clone to live would involve quite a bit of code. I don't think he said that. He said implementing the live-ness properly can be somewhat annoying,

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

2015-01-09 Thread Koji Ishii
Thank you Aryeh for the explanation to this newbie, I understand that better now. That was a bit different from what I had in mind, but glad to see you agree to return a value. So, sounds like we're in consensus to change it to return a value? /koji On Fri, Jan 9, 2015 at 9:40 PM, Aryeh Gregor

Re: Shadow tree style isolation primitive

2015-01-09 Thread Dimitri Glazkov
Here's an attempt from 2012. This approach doesn't work (the trivial plumbing mentioned in the doc is actually highly non-trivial), but maybe it will give some insights to find the right a proper solution:

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

2015-01-09 Thread Olivier Forget
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 wants to kill this feature, so it's moot. Could you please point me to the discussion where this conclusion was reached? I

Re: Shadow tree style isolation primitive

2015-01-09 Thread Tab Atkins Jr.
On Fri, Jan 9, 2015 at 8:08 AM, Dimitri Glazkov dglaz...@google.com wrote: Here's an attempt from 2012. This approach doesn't work (the trivial plumbing mentioned in the doc is actually highly non-trivial), but maybe it will give some insights to find the right a proper solution:

[Bug 26904] Introduce typedef for IDBKeyPath, use it

2015-01-09 Thread bugzilla
https://www.w3.org/Bugs/Public/show_bug.cgi?id=26904 Joshua Bell jsb...@google.com changed: What|Removed |Added Resolution|LATER |WONTFIX -- You are

Re: Custom element lifecycle callbacks

2015-01-09 Thread Anne van Kesteren
On Fri, Jan 9, 2015 at 12:29 PM, Boris Zbarsky bzbar...@mit.edu wrote: Ok, what about this testcase: var parent = document.createElement(x-my-element); var input = document.createElement(input); parent.appendChild(input); input.value = file:///etc/passwd; parent.cloneNode(true);

Re: Custom element lifecycle callbacks

2015-01-09 Thread Boris Zbarsky
On 1/9/15 8:46 AM, Anne van Kesteren wrote: As far as I can tell from the specification, when the value IDL attribute is in the filename mode, any values that might be stored in internal slots are ignored. Hmm... That was not obvious to me, but OK. I guess it uses the list of selected files

Re: Custom element lifecycle callbacks

2015-01-09 Thread Anne van Kesteren
On Fri, Jan 9, 2015 at 3:09 PM, Boris Zbarsky bzbar...@mit.edu wrote: In any case, the fact that we're even _having_ this discussion and that it needs careful reading of the HTML spec is my point. It does seem however we could define this in a way that is safe. -- https://annevankesteren.nl/

Shadow tree style isolation primitive

2015-01-09 Thread Anne van Kesteren
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 and user agent stylesheets) and requiring a special selector,

Re: Custom element lifecycle callbacks

2015-01-09 Thread Anne van Kesteren
On Fri, Jan 9, 2015 at 2:29 PM, Boris Zbarsky bzbar...@mit.edu wrote: On 1/9/15 7:14 AM, Anne van Kesteren wrote: OK. So just to be clear, the type will be set before the input's cloning callback runs, yes? Yes. It's a bit unclear to me why When an input element's type attribute changes

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

2015-01-09 Thread Aryeh Gregor
On Wed, Jan 7, 2015 at 12:32 AM, Ryosuke Niwa rn...@apple.com wrote: Trident (since IE10) and Gecko both return a live Range, which can be modified to update selection. WebKit and Blink both return a clone Range so that any changes to the Range doesn't update the selection. It appears that

Re: Custom element lifecycle callbacks

2015-01-09 Thread Boris Zbarsky
On 1/9/15 7:14 AM, Anne van Kesteren wrote: Both parent and input need to be cloned in this case. While parent's callback runs it changes the type of input, at which point input's callback runs. So, yes. OK. So just to be clear, the type will be set before the input's cloning callback runs,

Re: Custom element lifecycle callbacks

2015-01-09 Thread Boris Zbarsky
On 1/9/15 4:28 AM, Anne van Kesteren wrote: On Thu, Jan 8, 2015 at 5:54 PM, Boris Zbarsky bzbar...@mit.edu wrote: var input = document.createElement(input); input.value = file:///etc/passwd; var newInput = input.cloneNode(); newInput.type = file; Note that in the above example