Closed Bug 1484690 Opened 3 years ago Closed 3 years ago
Panic when having two stylesheet <link>s with the same href in Shadow
See the test-case. Found this while I was trying to determine whether bug 1484520 affects Shadow DOM apart from XBL too.
We share the inner object across sheets from the same URL, so what happens here is that, once the sheet parses and loads, we call SetEnabled() on the first sheet, which sets the inner bit, then calls ApplicableStateChanged. That set actually turned the second sheet complete, so when inserting the sheet, we think that the second sheet is already enabled, and thus in the author data, and try to insert before it. Of course there's nothing there, so we panic. We rely on calling SetEnabled() on all the sheets already to insert them in the styleset / author data, so this makes it clearer and fixes the bug by moving the state to each individual sheet.
Comment on attachment 9002487 [details] Move the enabled state to the sheet instead of sharing it. Cameron McCormack (:heycam) (away 24 Aug) has approved the revision.
Attachment #9002487 - Flags: review+
Pushed by email@example.com: https://hg.mozilla.org/integration/autoland/rev/8abcae437121 Move the enabled state to the sheet instead of sharing it. r=heycam
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/12583 for changes under testing/web-platform/tests
Upstream web-platform-tests status checks passed, PR will merge once commit reaches central.
Pushed by firstname.lastname@example.org: https://hg.mozilla.org/integration/autoland/rev/9bbc18da7365 followup: fixup the WPT manifest since lando overrode it with an older version. r=me
Upstream PR merged
You need to log in before you can comment on or make changes to this bug.