Re: Imperative API for Node Distribution in Shadow DOM (Revisited)

2015-04-28 Thread Elliott Sprehn
A distribute callback means running script any time we update distribution, which is inside the style update phase (or event path computation phase, ...) which is not a location we can run script. We could run script in another scripting context like is being considered for custom layout and paint

Re: Directory Upload Proposal

2015-04-28 Thread Jonas Sicking
On Tue, Apr 28, 2015 at 4:28 PM, Travis Leithead travis.leith...@microsoft.com wrote: Aaron opened an issue for this on GitHub [1] and I agree that it is a problem and we should definitely rename it to something else! One option might be to change dir to directory, but we would need a

RE: Directory Upload Proposal

2015-04-28 Thread Ali Alabbas
On Tue, Apr 28, 2015 at 4:15 PM, Tab Atkins Jr. jackalm...@gmail.com wrote: On Tue, Apr 28, 2015 at 3:53 PM, Ryan Seddon seddon.r...@gmail.com wrote: To enable developers to build future interoperable solutions, we've drafted a proposal [4], with the helpful feedback of Mozilla and Google,

Re: Imperative API for Node Distribution in Shadow DOM (Revisited)

2015-04-28 Thread Justin Fagnani
On Tue, Apr 28, 2015 at 4:32 PM, Ryosuke Niwa rn...@apple.com wrote: On Apr 27, 2015, at 4:23 PM, Tab Atkins Jr. jackalm...@gmail.com wrote: On Mon, Apr 27, 2015 at 4:06 PM, Tab Atkins Jr. jackalm...@gmail.com wrote: On Mon, Apr 27, 2015 at 3:42 PM, Ryosuke Niwa rn...@apple.com wrote: On

Re: Directory Upload Proposal

2015-04-28 Thread Ryan Seddon
To enable developers to build future interoperable solutions, we've drafted a proposal [4], with the helpful feedback of Mozilla and Google, that focuses strictly on providing the mechanisms necessary to enable directory uploads. The use of the dir attribute seems odd since I can already

RE: Directory Upload Proposal

2015-04-28 Thread Travis Leithead
Second, rather than adding a .directory attribute, I think that we should simply add any selected directories to the .files list. My experience is that having a direct mapping between what the user does, and what we expose to the webpage, generally results in less developer confusion and/or

Re: Directory Upload Proposal

2015-04-28 Thread Jonas Sicking
On Mon, Apr 27, 2015 at 9:45 PM, Jonas Sicking jo...@sicking.cc wrote: On Thu, Apr 23, 2015 at 12:28 PM, Ali Alabbas a...@microsoft.com wrote: Hello WebApps Group, Hi Ali, Yay! This is great to see a formal proposal for! Definitely something that mozilla is very interested in working on.

Re: Imperative API for Node Distribution in Shadow DOM (Revisited)

2015-04-28 Thread Ryosuke Niwa
On Apr 27, 2015, at 4:23 PM, Tab Atkins Jr. jackalm...@gmail.com wrote: On Mon, Apr 27, 2015 at 4:06 PM, Tab Atkins Jr. jackalm...@gmail.com wrote: On Mon, Apr 27, 2015 at 3:42 PM, Ryosuke Niwa rn...@apple.com wrote: On Apr 27, 2015, at 3:15 PM, Steve Orvell sorv...@google.com wrote: IMO, the

Re: Directory Upload Proposal

2015-04-28 Thread Tab Atkins Jr.
On Tue, Apr 28, 2015 at 3:53 PM, Ryan Seddon seddon.r...@gmail.com wrote: To enable developers to build future interoperable solutions, we've drafted a proposal [4], with the helpful feedback of Mozilla and Google, that focuses strictly on providing the mechanisms necessary to enable directory

Re: Directory Upload Proposal

2015-04-28 Thread Jonas Sicking
On Tue, Apr 28, 2015 at 4:26 PM, Travis Leithead travis.leith...@microsoft.com wrote: Second, rather than adding a .directory attribute, I think that we should simply add any selected directories to the .files list. My experience is that having a direct mapping between what the user does, and

[selectors-api] How to mark TR version as obsolete/superseded? [Was: Re: Obsolete Document]

2015-04-28 Thread Arthur Barstow
On 3/26/15 8:30 AM, Gulfaraz Yasin wrote: Hi It has come to my notice that the following document http://www.w3.org/TR/selectors-api/#resolving-namespaces is obsolete. Hi Gulfaraz, Thanks for your e-mail and sorry for the slow reply. I was directed to it's page from one of

Re: Web Storage Rec errata?

2015-04-28 Thread Arthur Barstow
On 4/21/15 5:39 AM, Kostiainen, Anssi wrote: Hi, Is there a plan to publish an errata to sync the Web Storage Rec [1] with the latest? I counted 8 commits cherry picked into the Editor's Draft since Rec [2]. If no errata publication is planned, I'd expect the Rec to clearly indicate its

RE: Directory Upload Proposal

2015-04-28 Thread Travis Leithead
Aaron opened an issue for this on GitHub [1] and I agree that it is a problem and we should definitely rename it to something else! One option might be to change dir to directory, but we would need a different name for directory (the attribute that gets back the virtual root holding the

Re: Why is querySelector much slower?

2015-04-28 Thread Boris Zbarsky
On 4/28/15 2:44 AM, Glen Huang wrote: But If I do getElementsByClass()[0], and LiveNodeList is immediately garbage collectable Then it will only be collected the next time GC happens. Which might not be for a while. -Boris

Re: Why is querySelector much slower?

2015-04-28 Thread Boris Zbarsky
On 4/28/15 1:58 AM, Glen Huang wrote: Just a quick follow up question to quench my curiosity: if I do list[1] and no one has ever asked the list for any element, Gecko will find the first two matching elements, and store them in the list, if I then immediately do list[0], the first element is

Re: Why is querySelector much slower?

2015-04-28 Thread Boris Zbarsky
On 4/28/15 2:13 AM, Glen Huang wrote: On second thought, if the list returned by getElementsByClass() is lazy populated as Boris says, it shouldn't be a problem. The list is only updated when you access that list again. Mutations have to check whether the list is marked dirty already or not.

[Bug 28353] [Shadow]: Use a parent/child relationship in the composed tree for some elements, i.e. ol/li

2015-04-28 Thread bugzilla
https://www.w3.org/Bugs/Public/show_bug.cgi?id=28353 Koji Ishii kojii...@gmail.com changed: What|Removed |Added Status|REOPENED|RESOLVED

Re: Why is querySelector much slower?

2015-04-28 Thread Glen Huang
Ww, this is pure gold. Thank you so much for such thorough explanation, any even took the trouble to actually implement optimizations to make sure the numbers are right. I'm so grateful for the work you put into this just to answer my question. How do I accept your answer here? ;) So what

Re: Why is querySelector much slower?

2015-04-28 Thread Boris Zbarsky
On 4/28/15 2:59 AM, Glen Huang wrote: Looking at the microbenchmark again, for Gecko, getElementById is around 300x faster than querySelector('#id'), and even getElementsByClassName is faster than it. This is why one should not write microbenchmarks. ;) Or at least if one does, examine

Re: Inheritance Model for Shadow DOM Revisited

2015-04-28 Thread Ryosuke Niwa
On Apr 27, 2015, at 9:50 PM, Hayato Ito hay...@chromium.org wrote: The feature of shadow as function supports *subclassing*. That's exactly the motivation I've introduced it once in the spec (and implemented it in blink). I think Jan Miksovsky, co-author of Apple's proposal, knows well

=[xhr]

2015-04-28 Thread Ken Nelson
RE async: false being deprecated There's still occasionally a need for a call from client javascript back to server and wait on results. Example: an inline call from client javascript to PHP on server to authenticate an override password as part of a client-side operation. The client-side

Re: Imperative API for Node Distribution in Shadow DOM (Revisited)

2015-04-28 Thread Ryosuke Niwa
I've updated the gist to reflect the discussion so far: https://gist.github.com/rniwa/2f14588926e1a11c65d3 https://gist.github.com/rniwa/2f14588926e1a11c65d3 Please leave a comment if I missed anything. - R. Niwa

IndieUI Teleconference Agenda; 29 April at 21:00Z

2015-04-28 Thread Janina Sajka
Cross-posting as is usual ... What: IndieUI Task Force Teleconference When: Wednesday 29 April 2:00 PMSan Francisco -- U.S. Pacific Time (PDT: UTC -7) 4:00 PMAustin -- U.S. Central Time(CDT: UTC -5) 5:00 PMBoston -- U.S.

Re: Imperative API for Node Distribution in Shadow DOM (Revisited)

2015-04-28 Thread Ryosuke Niwa
On Apr 28, 2015, at 1:04 PM, Elliott Sprehn espr...@chromium.org wrote: A distribute callback means running script any time we update distribution, which is inside the style update phase (or event path computation phase, ...) which is not a location we can run script. That's not what

Re: =[xhr]

2015-04-28 Thread Tab Atkins Jr.
On Tue, Apr 28, 2015 at 7:51 AM, Ken Nelson k...@pure3interactive.com wrote: RE async: false being deprecated There's still occasionally a need for a call from client javascript back to server and wait on results. Example: an inline call from client javascript to PHP on server to authenticate

Re: Inheritance Model for Shadow DOM Revisited

2015-04-28 Thread Hayato Ito
Could you help me to understand what implicitly means here? In this particular case, you might want to blame the super class's author and tell the author, Please use content select=.input-foo so that subclass can override it with arbitrary element with class=input-foo. Could you give me an

RE: [components] Isolated Imports and Foreign Custom Elements

2015-04-28 Thread Jonathan Bond-Caron
On Thu Apr 23 02:58 PM, Maciej Stachowiak wrote: https://github.com/w3c/webcomponents/wiki/Isolated-Imports-Proposal I welcome comments on whether this approach makes sense. Security rules are unclear but love this approach

[Bug 28579] New: [Shadow]:

2015-04-28 Thread bugzilla
https://www.w3.org/Bugs/Public/show_bug.cgi?id=28579 Bug ID: 28579 Summary: [Shadow]: Product: WebAppsWG Version: unspecified Hardware: PC OS: Windows NT Status: NEW Severity: minor Priority: P2

Re: Inheritance Model for Shadow DOM Revisited

2015-04-28 Thread Ryosuke Niwa
On Wed, Apr 29, 2015 at 2:09 AM Ryosuke Niwa rn...@apple.com wrote: On Apr 27, 2015, at 9:50 PM, Hayato Ito hay...@chromium.org wrote: The feature of shadow as function supports *subclassing*. That's exactly the motivation I've introduced it once in the spec (and implemented it in

Re: Why is querySelector much slower?

2015-04-28 Thread Glen Huang
Wow, it's now super clear. Thanks for the detailed explanation. Just a quick follow up question to quench my curiosity: if I do list[1] and no one has ever asked the list for any element, Gecko will find the first two matching elements, and store them in the list, if I then immediately do

Re: Why is querySelector much slower?

2015-04-28 Thread Glen Huang
querySelector with an id selector does in fact benefit from the id hashtable Looking at the microbenchmark again, for Gecko, getElementById is around 300x faster than querySelector('#id'), and even getElementsByClassName is faster than it. It doesn't look like it benefits much from an eagerly

Re: Why is querySelector much slower?

2015-04-28 Thread Glen Huang
Live node lists make all dom mutation slower Haven't thought about this before. Thank you for pointing it out. So if I use, for example, lots of getElementsByClass() in the code, I'm actually slowing down all DOM mutating APIs?

Re: Why is querySelector much slower?

2015-04-28 Thread Elliott Sprehn
On Mon, Apr 27, 2015 at 11:13 PM, Glen Huang curvedm...@gmail.com wrote: On second thought, if the list returned by getElementsByClass() is lazy populated as Boris says, it shouldn't be a problem. The list is only updated when you access that list again. The invalidation is what makes your

Re: Why is querySelector much slower?

2015-04-28 Thread Glen Huang
But If I do getElementsByClass()[0], and LiveNodeList is immediately garbage collectable, then if I change the DOM, Blink won't traverse ancestors, thus no penalty for DOM mutation? On Apr 28, 2015, at 2:28 PM, Elliott Sprehn espr...@chromium.org wrote: On Mon, Apr 27, 2015 at 11:13 PM,

Re: Why is querySelector much slower?

2015-04-28 Thread Glen Huang
On second thought, if the list returned by getElementsByClass() is lazy populated as Boris says, it shouldn't be a problem. The list is only updated when you access that list again. On Apr 28, 2015, at 2:08 PM, Glen Huang curvedm...@gmail.com wrote: Live node lists make all dom mutation