[Webkit-unassigned] [Bug 196347] New: Safari doesn't render slot content if the content was appended before the slot

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Mar 28 04:45:40 PDT 2019


https://bugs.webkit.org/show_bug.cgi?id=196347

            Bug ID: 196347
           Summary: Safari doesn't render slot content if the content was
                    appended before the slot
           Product: WebKit
           Version: Safari Technology Preview
          Hardware: Unspecified
                OS: All
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: DOM
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: simon.strandman at gmail.com

Created attachment 366164

  --> https://bugs.webkit.org/attachment.cgi?id=366164&action=review

Testcase

If you create a custom element with a shadow DOM with slot elements Safari will not insert the slotted content if the content was added before the slot elements - except if it's the initial content. This works in Firefox and Chrome.

1. Create a custom element with a shadow DOM and add it to the document.
2. Append a child to the custom element with a slot property.
3. Append a slot element to the custom element shadow DOM with the same slot name.

The slotted element is properly rendered at this point.

4. Append another child to the custom element with a different slot property.
5. Append another slot element to the shadow DOM with the same slot name.

Now nothing is rendered. When looking at the DOM everything looks correct. The shadow DOM has two slot elements and the custom element has two children with matching slot attributes. However the children are not inserted into the slots and not rendered at all.

6. Append another slot element to the custom element shadow DOM with a new slot name.
7. Append another child to the custom element with the same slot name.

Now all slotted elements are rendered, including the one that was missing before.

I'm attaching a small html file that can be use to see the problem.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20190328/14d09405/attachment.html>


More information about the webkit-unassigned mailing list