The spec was updated in https://github.com/w3c/csswg-drafts/commit/a6fc16e1b65868c6f984918cc76ad9b238e7139e "Cascade layers are sorted by the order in which they first are declared, with nested layers grouped within their parent layers before any unlayered rules."
Created attachment 441189 [details] Patch
This patch modifies the imported WPT tests. Please ensure that any changes on the tests (not coming from a WPT import) are exported to WPT. Please see https://trac.webkit.org/wiki/WPTExportProcess
Created attachment 441191 [details] Patch
Committed r284182 (242999@main): <https://commits.webkit.org/242999@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 441191 [details].
<rdar://problem/84266462>