Created attachment 427692 [details] testcase 1 STR: 1. Load attached testcase, and look at the alert() that appears. EXPECTED RESULTS: alert should say PASS (i.e. `document.styleSheets.length` should be 4) ACTUAL RESULTS: alert says FAIL, and reports that document.styleSheets.length is in fact 2. Firefox and Chromium both give expected results. Safari 14 gives actual results.
The relevant spec text here is: https://drafts.csswg.org/cssom/#add-a-css-style-sheet Note that the last two stylesheets here should be be flagged as *disabled* (which is why they don't render in any browser; i.e. it's why the document renders as cyan instead of red or pink). Chrome doesn't set the disabled flag properly, which is a bug[1], but it does treat them as disabled from a rendering perspective and it does correctly add it to the list of stylesheets. This WebKit bug here is about these sheets being missing from the document.styleSheets list. [1] https://bugs.chromium.org/p/chromium/issues/detail?id=1205488
Is this the same as bug 89297?
(In reply to Alexey Proskuryakov from comment #2) > Is this the same as bug 89297? Hmm - I'm not 100% sure, but it looks like it very well could be. (Feel free to mark as a duplicate if appropriate.)
<rdar://problem/77858309>
I am able to reproduce this issue in Safari 15.6 on macOS 12.5 and it shows "FAIL - xxx expected 2, got 4." while all other browsers (Chrome Canary 106 and Firefox Nightly 104) do show "PASS" in the test case. Just wanted to share updated testing result. Thanks!
*** This bug has been marked as a duplicate of bug 56932 ***