[Webkit-unassigned] [Bug 253814] New: Concat with a CSSStyleSheet and shadowRoot.adoptedStyleSheets returns array in array

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Mar 13 02:00:59 PDT 2023


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

            Bug ID: 253814
           Summary: Concat with a CSSStyleSheet and
                    shadowRoot.adoptedStyleSheets returns array in array
           Product: WebKit
           Version: Safari 16
          Hardware: All
                OS: All
            Status: NEW
          Severity: Major
          Priority: P2
         Component: CSS
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: mail at bramkragten.nl

In Safari 16.4, when concatting a CSSStyleSheet with the shadowRoot.adoptedStyleSheets, it returns a nested array instead of a flat one:

Correct:
> [new CSSStyleSheet].concat([])
< [CSSStyleSheet] (1)
> [new CSSStyleSheet].concat([new CSSStyleSheet])
< [CSSStyleSheet, CSSStyleSheet] (2)

Not correct:
> $0.shadowRoot.adoptedStyleSheets
< [CSSStyleSheet] (1)
> [new CSSStyleSheet].concat($0.shadowRoot.adoptedStyleSheets)
< [CSSStyleSheet, Array] (2)
Expected:
< [CSSStyleSheet, CSSStyleSheet] (2)

Correct:
> [new CSSStyleSheet, ...$0.shadowRoot.adoptedStyleSheets]
< [CSSStyleSheet, CSSStyleSheet] (2)

-- 
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/20230313/e1d9583a/attachment.htm>


More information about the webkit-unassigned mailing list