Bug 172446

Summary: Ordered list and Shadow DOM have broken order
Product: WebKit Reporter: Mattia Astorino <astorino.design>
Component: DOMAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Major CC: cdumez, changseok, esprehn+autocc, ews-watchlist, glenn, kangil.han, koivisto, kondapallykalyan, pdr, rniwa, webkit-bug-importer, zalan
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Mac   
OS: macOS 10.12   
Bug Depends on:    
Bug Blocks: 148695    
Attachments:
Description Flags
Reproduction
none
WIP
ews-feeder: commit-queue-
WIP2 none

Description Mattia Astorino 2017-05-22 06:41:30 PDT
When an ordered list is composed by custom elements and shadow dom (open and slot) the list counter restart each <li> element, so every <li> have the 1. number:

This is the output:

1. Lorem ipsum
1. Dolor Sit amet
1. Consecutor adipiscing
   1. Lorem ipsum
   1. Dolor Sit amet
1. Dolor Sit amet

This is the source code:
<oa-list>
   <oa-list-item>Lorem ipsum</oa-list-item>
   <oa-list-item>Dolor Sit amet</oa-list-item>
   <oa-list-item>
      Consecutor adipiscing
      <oa-list>
          <oa-list-item>Lorem ipsum</oa-list-item>
          <oa-list-item>Dolor Sit amet</oa-list-item>
      </oa-list>
   </oa-list-item>
   <oa-list-item>Dolor Sit amet</oa-list-item>
</oa-list>




<oa-list> shadow root:

<ol>
  <slot></slot>
</ol>



<oa-list-item> shadow root:

<li>
  <slot></slot>
</li>
Comment 1 Mattia Astorino 2017-06-06 00:20:31 PDT
Now with the latest WebKit Nightly release the there is no bullet indicators for orderered and unordered lists. Are you working on that? This is the output, same source code:

http://i.imgur.com/aEaaMBc.png
Comment 2 Antti Koivisto 2017-11-03 05:19:58 PDT
A full test case would be helpful.
Comment 3 Radar WebKit Bug Importer 2018-08-01 22:40:47 PDT
<rdar://problem/42842990>
Comment 4 Ryosuke Niwa 2018-09-18 01:06:26 PDT
Created attachment 350010 [details]
Reproduction

This works in Chrome & Firefox but fails in Safari.
Comment 5 Ryosuke Niwa 2022-07-17 14:48:00 PDT
Created attachment 460965 [details]
WIP
Comment 6 Ryosuke Niwa 2022-07-17 23:50:20 PDT
Created attachment 460967 [details]
WIP2
Comment 7 Ryosuke Niwa 2022-07-18 14:23:14 PDT
Hm... attached patch fixes the order number issue but there is some kind of weird padding / margin added to the list. Not sure where that's coming from.