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.
This commit is contained in:
Tom Tromey 2017-09-14 12:38:05 -06:00
parent 2cbd27c83a
commit c48226ff6f
19 changed files with 74 additions and 30 deletions

View file

@ -110,6 +110,7 @@ impl HTMLMetaElement {
quirks_mode: document.quirks_mode(),
url_data: RwLock::new(window_from_node(self).get_url()),
source_map_url: RwLock::new(None),
source_url: RwLock::new(None),
},
media: Arc::new(shared_lock.wrap(MediaList::empty())),
shared_lock: shared_lock.clone(),