Bug 199733 - Named slot won't work if the the previous slotted element is removed before the name slot
Summary: Named slot won't work if the the previous slotted element is removed before t...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: Safari Technology Preview
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks: 148695
  Show dependency treegraph
 
Reported: 2019-07-11 16:18 PDT by Tim Guan-tin Chien [:timdream]
Modified: 2019-07-12 16:55 PDT (History)
5 users (show)

See Also:


Attachments
test.html (587 bytes, text/html)
2019-07-11 16:18 PDT, Tim Guan-tin Chien [:timdream]
no flags Details
test2.html (591 bytes, text/html)
2019-07-11 17:19 PDT, Tim Guan-tin Chien [:timdream]
no flags Details
test3-workaround.html (972 bytes, text/html)
2019-07-12 10:08 PDT, Tim Guan-tin Chien [:timdream]
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Guan-tin Chien [:timdream] 2019-07-11 16:18:52 PDT
Created attachment 373973 [details]
test.html

STR:

See test case. There is a while loop does the following twice.

1) append an element to the host and assign a slot name. The slot name is different on each run.
2) create a named slot and append it to the shadow root.
3) assert that the element created is assigned to the slot.
4) remove the element
5) remove the slot

Expected:

The element should be assigned to the slot correctly on both run.

Actual:

On the second run the element is not assigned to the slot.
Comment 1 Radar WebKit Bug Importer 2019-07-11 16:56:47 PDT
<rdar://problem/52979943>
Comment 2 Tim Guan-tin Chien [:timdream] 2019-07-11 17:19:17 PDT
Created attachment 373978 [details]
test2.html

The 2nd named slot is also broken without step 4 and 5.
Comment 3 Tim Guan-tin Chien [:timdream] 2019-07-12 10:08:05 PDT
Created attachment 374018 [details]
test3-workaround.html

Apparently removing and re-inserting the element can wake it up.