Closed Bug 1484690 Opened Last year Closed Last year

Panic when having two stylesheet <link>s with the same href in ShadowRoot.

Categories

(Core :: CSS Parsing and Computation, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla63
Tracking Status
firefox63 --- fixed

People

(Reporter: emilio, Assigned: emilio)

References

Details

Attachments

(2 files)

See the test-case. Found this while I was trying to determine whether bug 1484520 affects Shadow DOM apart from XBL too.
See Also: → 1484520
Attached file testcase
See Also: → 1484699
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 emilio@crisal.io:
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 emilio@crisal.io:
https://hg.mozilla.org/integration/autoland/rev/9bbc18da7365
followup: fixup the WPT manifest since lando overrode it with an older version. r=me
https://hg.mozilla.org/mozilla-central/rev/8abcae437121
https://hg.mozilla.org/mozilla-central/rev/9bbc18da7365
Status: NEW → RESOLVED
Closed: Last year
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
Upstream PR merged
You need to log in before you can comment on or make changes to this bug.