W3C home > Mailing lists > Public > public-webapps@w3.org > January to March 2013

Re: [shadow-dom] Counters and list item counting

From: Andrei Bucur <abucur@adobe.com>
Date: Thu, 7 Mar 2013 09:43:57 +0000
To: Elliott Sprehn <esprehn@gmail.com>
CC: public-webapps <public-webapps@w3.org>
Message-ID: <596B4E57-EBC2-41E4-B70E-1450F2E7440A@adobe.com>
Hello,

I want to clarify a certain situation:
  <ol>
    <li>A</li>
    <li id="host">
	<ShadowRoot>
		<li>X</li>
        	<li>Y</li>
	<ShadowRoot>
    </li>
    <li>C</li>
  </ol>

How is this case supposed to be rendered?
1. A
2. 1. X
    2. Y
3. C

or

1.  A
2,3. X
4. Y
5. C

Basically, do we want the shadow root to become the counting root for the <li>s inside the shadow or we let them go through the upper boundary and use the <ol> instead?
I would vote for the first rendering as it seems to better respect the shadow encapsulation. If so, it also means we need to prevent the propagation of the type, reversed etc. attributes of the parent <ol>
to the shadow <li>s, right?

Thanks,
Andrei.

On Feb 19, 2013, at 9:20 PM, Elliott Sprehn <esprehn@gmail.com> wrote:

> Currently in Webkit list item counting is done on the render tree, but we are looking at making it use the DOM instead so that ordered lists work properly in regions. This raises an interesting question about if they should use the composed shadow tree, or the original tree.
> 
> ex.
> 
> <x-widget>
> <ol>
>   <li>
>   <li>
> </ol>
> </x-widget>
> 
> inside x-widget:
> 
> <div>
>   <content select="li:last-child">
> </div>
> 
> What's the count on that projected list item?
> 
> This also raises questions of how counters interact with shadows. Should counters work on the project DOM or the original DOM?
> 
> We're leaning towards the original DOM since otherwise counters become difficult to work with when they're reprojected deeper and deeper down a component hierarchy.
> 
> - E
Received on Thursday, 7 March 2013 09:44:28 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:57 GMT