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.
Differential Revision: https://phabricator.services.mozilla.com/D3798
--HG--
extra : moz-landing-system : lando
In addition to the sourceMappingURL comment, there is a second special
comment, "sourceURL", that can be used to set the "display name" of a
style sheet for developer tools. This name is also used as the base
URL for the source-map URL resolution algorithm. sourceURL is
described here:
https://blog.getfirebug.com/2009/08/11/give-your-eval-a-name-with-sourceurl/
This patch changes Firefox to record this URL, if specified, and to
expose it (chrome-only) vai StyleSheet.webidl.
MozReview-Commit-ID: 7NwXsOf7nbY
--HG--
extra : rebase_source : bd5d25b4d44f5f220a4624db346edbc4236c9886
This changes the CSS lexer to extract sourceMappingURL directives from
comments and preserve them; then changes the parser to expose this value
as the style sheet's sourceMapURL.
MozReview-Commit-ID: LfMamJ1PsU0
--HG--
extra : rebase_source : 258827720282d415f97f1d49d870b7c2448d39f4
When loading a style sheet, if the SourceMap (or legacy X-SourceMap)
response header was seen, record it and make it available to chrome
scripts.
MozReview-Commit-ID: 3wtUADzgrI3
--HG--
extra : rebase_source : 25ed09e264d4b3a679ae970c709dedd4d50e2324
The methods are written in the same order as in StyleSheetHandle::Ptr.
MozReview-Commit-ID: 6b4311ailNj
--HG--
extra : source : 9cea4a56fc487dd21a8739d4d9be8f01d5fdc93c