diff options
author | Tom Tromey <tom@tromey.com> | 2017-09-14 12:38:05 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2017-09-14 12:39:18 -0600 |
commit | c48226ff6fcefbd0730eae7b53ac62b2ed7b170f (patch) | |
tree | d935d898858c7fa80cf8ee7da53238ebabf5387e /components/script/stylesheet_loader.rs | |
parent | 2cbd27c83a6974f6d00ccd2873ff1914c3af0614 (diff) | |
download | servo-c48226ff6fcefbd0730eae7b53ac62b2ed7b170f.tar.gz servo-c48226ff6fcefbd0730eae7b53ac62b2ed7b170f.zip |
Preserve sourceURL comment on style sheets
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/
The devtools feature bug is here:
https://bugzilla.mozilla.org/show_bug.cgi?id=880831
This patch changes servo to preserve and expose this value for use in M-C.
Diffstat (limited to 'components/script/stylesheet_loader.rs')
-rw-r--r-- | components/script/stylesheet_loader.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/components/script/stylesheet_loader.rs b/components/script/stylesheet_loader.rs index 1e6b2470e5c..597fac81cf1 100644 --- a/components/script/stylesheet_loader.rs +++ b/components/script/stylesheet_loader.rs @@ -292,6 +292,7 @@ impl<'a> StyleStylesheetLoader for StylesheetLoader<'a> { quirks_mode: context.quirks_mode, namespaces: RwLock::new(Namespaces::default()), source_map_url: RwLock::new(None), + source_url: RwLock::new(None), }, media: media, shared_lock: lock.clone(), |