[Bug 27876] New: [Shadow] It is not defined what event.path actually should return

2015-01-21 Thread bugzilla
https://www.w3.org/Bugs/Public/show_bug.cgi?id=27876 Bug ID: 27876 Summary: [Shadow] It is not defined what event.path actually should return Product: WebAppsWG Version: unspecified Hardware: PC OS: Linux

Re: oldNode.replaceWith(...collection) edge case

2015-01-21 Thread Glen Huang
I have two more things to add. 1. One more reason why context node should be allowed as an argument. These work as intended: node.before(node) node.after(node) node.replaceWith(node) By passing an additional argument, they suddenly fail: node.before(node, another) node.after(node, another)

RE: Better focus support for Shadow DOM

2015-01-21 Thread Domenic Denicola
Thanks Takoyoshi! This new version looks great to me. It would allow people to create custom elements with the same focus capabilities as native elements, including both the simple cases (like custom-a) and the more complicated ones with a shadow DOM (like custom-input type=date). Very exciting

Re: oldNode.replaceWith(...collection) edge case

2015-01-21 Thread Simon Pieters
On Wed, 21 Jan 2015 00:45:32 +0100, Glen Huang curvedm...@gmail.com wrote: Ah, thank you for letting me know. I vaguely remember document fragment is introduced just to reduce reflows. Looks like this best practice is obsolete now? (I remember myself wondering why bowsers couldn’t

Re: oldNode.replaceWith(...collection) edge case

2015-01-21 Thread Glen Huang
@Boris @Simon From the jsperf, looks like Blink is indeed making document fragment obsolete. Run the tests in webkit, although still way faster with document fragment, I believe the gap will narrow in the future. (I really think authors shouldn’t have to rely on it to get good performance).

Re: oldNode.replaceWith(...collection) edge case

2015-01-21 Thread Boris Zbarsky
On 1/21/15 3:52 AM, Simon Pieters wrote: This jsperf might be interesting: http://jsperf.com/appendchild-vs-documentfragment-vs-innerhtml/81 Or misleading. Again, in real life what matters most here is what else is on the page, which the jsperf doesn't capture. The other thing that really

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

2015-01-21 Thread Mats Palmgren
On 01/17/2015 05:11 PM, Aryeh Gregor wrote: On Wed, Jan 14, 2015 at 6:14 PM, Mats Palmgren m...@mozilla.com wrote: It would be easy to change Gecko to ignore addRange() calls if the range start/end node is detached. We could easily do the same for range.setStart*/setEnd* for ranges that are in