servo: Merge #18924 - Fix commonmark Markdown warnings in docs, part 1 (from mbrubeck:doc); r=Manishearth
authorMatt Brubeck <mbrubeck@limpet.net>
Tue, 17 Oct 2017 16:04:10 -0500
changeset 386843 27bc43d5d11ced40c6014d9055825993935d185e
parent 386842 99b0d3748cdae722454c26912cccdc2fdbb60e44
child 386844 30b79f7b92917a0ec18b0575239c3cfbd1904074
push id96311
push userarchaeopteryx@coole-files.de
push dateWed, 18 Oct 2017 09:52:02 +0000
treeherdermozilla-inbound@a8a1e8cc1980 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersManishearth
bugs18924, 44229
milestone58.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
servo: Merge #18924 - Fix commonmark Markdown warnings in docs, part 1 (from mbrubeck:doc); r=Manishearth Fixes warnings from rust-lang/rust#44229 when `--enable-commonmark` is passed to rustdoc. This is mostly a global find-and-replace for bare URIs on lines by themselves in doc comments. --- - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes do not require tests because they are doc formatting changes only Source-Repo: https://github.com/servo/servo Source-Revision: 0e62a5829b7c29ae2667a21a439aff1e89201bf3
servo/components/compositing/compositor.rs
servo/components/config/opts.rs
servo/components/constellation/browsingcontext.rs
servo/components/constellation/event_loop.rs
servo/components/layout/display_list_builder.rs
servo/components/layout/flex.rs
servo/components/layout/query.rs
servo/components/net/cookie.rs
servo/components/net/fetch/methods.rs
servo/components/net/http_loader.rs
servo/components/net/mime_classifier.rs
servo/components/net/subresource_integrity.rs
servo/components/net_traits/blob_url_store.rs
servo/components/net_traits/filemanager_thread.rs
servo/components/net_traits/lib.rs
servo/components/net_traits/pub_domains.rs
servo/components/net_traits/request.rs
servo/components/script/document_loader.rs
servo/components/script/dom/bindings/callback.rs
servo/components/script/dom/bindings/conversions.rs
servo/components/script/dom/bindings/interface.rs
servo/components/script/dom/bindings/root.rs
servo/components/script/dom/bindings/settings_stack.rs
servo/components/script/dom/bindings/utils.rs
servo/components/script/dom/blob.rs
servo/components/script/dom/css.rs
servo/components/script/dom/cssconditionrule.rs
servo/components/script/dom/cssmediarule.rs
servo/components/script/dom/cssstylevalue.rs
servo/components/script/dom/csssupportsrule.rs
servo/components/script/dom/customelementregistry.rs
servo/components/script/dom/document.rs
servo/components/script/dom/element.rs
servo/components/script/dom/eventsource.rs
servo/components/script/dom/eventtarget.rs
servo/components/script/dom/globalscope.rs
servo/components/script/dom/htmlanchorelement.rs
servo/components/script/dom/htmlbaseelement.rs
servo/components/script/dom/htmlbodyelement.rs
servo/components/script/dom/htmlbuttonelement.rs
servo/components/script/dom/htmlfontelement.rs
servo/components/script/dom/htmlformelement.rs
servo/components/script/dom/htmlheadelement.rs
servo/components/script/dom/htmliframeelement.rs
servo/components/script/dom/htmlimageelement.rs
servo/components/script/dom/htmlinputelement.rs
servo/components/script/dom/htmllinkelement.rs
servo/components/script/dom/htmlmediaelement.rs
servo/components/script/dom/htmlmetaelement.rs
servo/components/script/dom/htmloptionelement.rs
servo/components/script/dom/htmlscriptelement.rs
servo/components/script/dom/htmlsourceelement.rs
servo/components/script/dom/htmlstyleelement.rs
servo/components/script/dom/htmltemplateelement.rs
servo/components/script/dom/mediaquerylist.rs
servo/components/script/dom/mutationobserver.rs
servo/components/script/dom/node.rs
servo/components/script/dom/paintsize.rs
servo/components/script/dom/paintworkletglobalscope.rs
servo/components/script/dom/performance.rs
servo/components/script/dom/range.rs
servo/components/script/dom/servoparser/async_html.rs
servo/components/script/dom/servoparser/mod.rs
servo/components/script/dom/storage.rs
servo/components/script/dom/stylepropertymapreadonly.rs
servo/components/script/dom/textdecoder.rs
servo/components/script/dom/touch.rs
servo/components/script/dom/touchevent.rs
servo/components/script/dom/touchlist.rs
servo/components/script/dom/virtualmethods.rs
servo/components/script/dom/webgl_validations/tex_image_2d.rs
servo/components/script/dom/websocket.rs
servo/components/script/dom/window.rs
servo/components/script/dom/worklet.rs
servo/components/script/dom/workletglobalscope.rs
servo/components/script/microtask.rs
servo/components/script/script_thread.rs
servo/components/script/textinput.rs
servo/components/script_traits/lib.rs
servo/components/script_traits/script_msg.rs
servo/components/selectors/build.rs
servo/components/selectors/parser.rs
servo/components/servo_arc/lib.rs
servo/components/style/attr.rs
servo/components/style/counter_style/mod.rs
servo/components/style/custom_properties.rs
servo/components/style/dom_apis.rs
servo/components/style/element_state.rs
servo/components/style/font_face.rs
servo/components/style/gecko/media_queries.rs
servo/components/style/gecko/selector_parser.rs
servo/components/style/media_queries.rs
servo/components/style/properties/declaration_block.rs
servo/components/style/properties/helpers/animated_properties.mako.rs
servo/components/style/properties/properties.mako.rs
servo/components/style/servo/media_queries.rs
servo/components/style/servo/url.rs
servo/components/style/str.rs
servo/components/style/style_adjuster.rs
servo/components/style/stylesheets/document_rule.rs
servo/components/style/stylesheets/keyframes_rule.rs
servo/components/style/stylesheets/origin.rs
servo/components/style/stylesheets/rule_list.rs
servo/components/style/stylesheets/supports_rule.rs
servo/components/style/stylesheets/viewport_rule.rs
servo/components/style/values/animated/effects.rs
servo/components/style/values/animated/mod.rs
servo/components/style/values/computed/align.rs
servo/components/style/values/computed/angle.rs
servo/components/style/values/computed/image.rs
servo/components/style/values/computed/length.rs
servo/components/style/values/computed/svg.rs
servo/components/style/values/generics/basic_shape.rs
servo/components/style/values/generics/border.rs
servo/components/style/values/generics/grid.rs
servo/components/style/values/generics/image.rs
servo/components/style/values/generics/mod.rs
servo/components/style/values/generics/svg.rs
servo/components/style/values/generics/transform.rs
servo/components/style/values/mod.rs
servo/components/style/values/specified/align.rs
servo/components/style/values/specified/basic_shape.rs
servo/components/style/values/specified/calc.rs
servo/components/style/values/specified/color.rs
servo/components/style/values/specified/font.rs
servo/components/style/values/specified/gecko.rs
servo/components/style/values/specified/grid.rs
servo/components/style/values/specified/image.rs
servo/components/style/values/specified/length.rs
servo/components/style/values/specified/mod.rs
servo/components/style/values/specified/svg.rs
servo/components/style_traits/cursor.rs
servo/components/style_traits/lib.rs
servo/components/style_traits/viewport.rs
servo/components/url/origin.rs
servo/python/tidy/servo_tidy/tidy.py
servo/python/tidy/servo_tidy_tests/speclink.rs
--- a/servo/components/compositing/compositor.rs
+++ b/servo/components/compositing/compositor.rs
@@ -860,17 +860,17 @@ impl<Window: WindowMethods> IOCompositor
             let dppx = self.page_zoom * self.hidpi_factor();
             let translated_point = (point / dppx).to_untyped();
             self.send_event_to_root_pipeline(TouchpadPressureEvent(translated_point,
                                                                    pressure,
                                                                    phase));
         }
     }
 
-    /// http://w3c.github.io/touch-events/#mouse-events
+    /// <http://w3c.github.io/touch-events/#mouse-events>
     fn simulate_mouse_click(&mut self, p: TypedPoint2D<f32, DevicePixel>) {
         let button = MouseButton::Left;
         self.dispatch_mouse_window_move_event_class(p);
         self.dispatch_mouse_window_event_class(MouseWindowEvent::MouseDown(button, p));
         self.dispatch_mouse_window_event_class(MouseWindowEvent::MouseUp(button, p));
         self.dispatch_mouse_window_event_class(MouseWindowEvent::Click(button, p));
     }
 
--- a/servo/components/config/opts.rs
+++ b/servo/components/config/opts.rs
@@ -35,16 +35,17 @@ pub struct Opts {
     /// The maximum size of each tile in pixels (`-s`).
     pub tile_size: usize,
 
     /// The ratio of device pixels per px at the default scale. If unspecified, will use the
     /// platform default setting.
     pub device_pixels_per_px: Option<f32>,
 
     /// `None` to disable the time profiler or `Some` to enable it with:
+    ///
     ///  - an interval in seconds to cause it to produce output on that interval.
     ///    (`i.e. -p 5`).
     ///  - a file path to write profiling info to a TSV file upon Servo's termination.
     ///    (`i.e. -p out.tsv`).
     ///  - an InfluxDB hostname to store profiling info upon Servo's termination.
     ///    (`i.e. -p http://localhost:8086`)
     pub time_profiling: Option<OutputOptions>,
 
@@ -63,17 +64,17 @@ pub struct Opts {
     /// won't be loaded
     pub userscripts: Option<String>,
 
     pub user_stylesheets: Vec<(Vec<u8>, ServoUrl)>,
 
     pub output_file: Option<String>,
 
     /// Replace unpaires surrogates in DOM strings with U+FFFD.
-    /// See https://github.com/servo/servo/issues/6564
+    /// See <https://github.com/servo/servo/issues/6564>
     pub replace_surrogates: bool,
 
     /// Log GC passes and their durations.
     pub gc_profile: bool,
 
     /// Load web fonts synchronously to avoid non-deterministic network-driven reflows.
     pub load_webfonts_synchronously: bool,
 
@@ -291,17 +292,17 @@ pub struct DebugOptions {
 
     /// Whether to show in stdout style sharing cache stats after a restyle.
     pub style_sharing_stats: bool,
 
     /// Translate mouse input into touch events.
     pub convert_mouse_to_touch: bool,
 
     /// Replace unpaires surrogates in DOM strings with U+FFFD.
-    /// See https://github.com/servo/servo/issues/6564
+    /// See <https://github.com/servo/servo/issues/6564>
     pub replace_surrogates: bool,
 
     /// Log GC passes and their durations.
     pub gc_profile: bool,
 
     /// Load web fonts synchronously to avoid non-deterministic network-driven reflows.
     pub load_webfonts_synchronously: bool,
 
--- a/servo/components/constellation/browsingcontext.rs
+++ b/servo/components/constellation/browsingcontext.rs
@@ -104,17 +104,17 @@ impl BrowsingContext {
 }
 
 /// An entry in a browsing context's session history.
 /// Each entry stores the pipeline id for a document in the session history.
 ///
 /// When we operate on the joint session history, entries are sorted chronologically,
 /// so we timestamp the entries by when the entry was added to the session history.
 ///
-/// https://html.spec.whatwg.org/multipage/#session-history-entry
+/// <https://html.spec.whatwg.org/multipage/#session-history-entry>
 #[derive(Clone)]
 pub struct SessionHistoryEntry {
     /// The timestamp for when the session history entry was created
     pub instant: Instant,
 
     /// The pipeline for the document in the session history,
     /// None if the entry has been discarded
     pub pipeline_id: Option<PipelineId>,
--- a/servo/components/constellation/event_loop.rs
+++ b/servo/components/constellation/event_loop.rs
@@ -7,17 +7,17 @@
 //! message is sent to the script thread, asking it to shut down.
 
 use ipc_channel::Error;
 use ipc_channel::ipc::IpcSender;
 use script_traits::ConstellationControlMsg;
 use std::marker::PhantomData;
 use std::rc::Rc;
 
-/// https://html.spec.whatwg.org/multipage/#event-loop
+/// <https://html.spec.whatwg.org/multipage/#event-loop>
 pub struct EventLoop {
     script_chan: IpcSender<ConstellationControlMsg>,
     dont_send_or_sync: PhantomData<Rc<()>>,
 }
 
 impl Drop for EventLoop {
     fn drop(&mut self) {
         let _ = self.script_chan.send(ConstellationControlMsg::ExitScriptThread);
--- a/servo/components/layout/display_list_builder.rs
+++ b/servo/components/layout/display_list_builder.rs
@@ -853,17 +853,17 @@ fn get_ellipse_radius<F>(size: &Size2D<A
     where F: Fn(Au, Au) -> Au
 {
     let dist = get_distance_to_sides(size, center, cmp);
     Size2D::new(dist.width.scale_by(::std::f32::consts::FRAC_1_SQRT_2 * 2.0),
                 dist.height.scale_by(::std::f32::consts::FRAC_1_SQRT_2 * 2.0))
 }
 
 /// Determines the radius of a circle if it was not explictly provided.
-/// https://drafts.csswg.org/css-images-3/#typedef-size
+/// <https://drafts.csswg.org/css-images-3/#typedef-size>
 fn convert_circle_size_keyword(keyword: ShapeExtent,
                                size: &Size2D<Au>,
                                center: &Point2D<Au>) -> Size2D<Au> {
     let radius = match keyword {
         ShapeExtent::ClosestSide | ShapeExtent::Contain => {
             let dist = get_distance_to_sides(size, center, ::std::cmp::min);
             ::std::cmp::min(dist.width, dist.height)
         }
@@ -877,17 +877,17 @@ fn convert_circle_size_keyword(keyword: 
         ShapeExtent::FarthestCorner | ShapeExtent::Cover => {
             get_distance_to_corner(size, center, ::std::cmp::max)
         },
     };
     Size2D::new(radius, radius)
 }
 
 /// Determines the radius of an ellipse if it was not explictly provided.
-/// https://drafts.csswg.org/css-images-3/#typedef-size
+/// <https://drafts.csswg.org/css-images-3/#typedef-size>
 fn convert_ellipse_size_keyword(keyword: ShapeExtent,
                                 size: &Size2D<Au>,
                                 center: &Point2D<Au>) -> Size2D<Au> {
     match keyword {
         ShapeExtent::ClosestSide | ShapeExtent::Contain => {
             get_distance_to_sides(size, center, ::std::cmp::min)
         },
         ShapeExtent::FarthestSide => {
--- a/servo/components/layout/flex.rs
+++ b/servo/components/layout/flex.rs
@@ -259,17 +259,17 @@ impl FlexLine {
             free_space: free_space,
             cross_size: Au(0)
         }
     }
 
     /// This method implements the flexible lengths resolving algorithm.
     /// The 'collapse' parameter is used to indicate whether items with 'visibility: collapse'
     /// is included in length resolving. The result main size is stored in 'item.main_size'.
-    /// https://drafts.csswg.org/css-flexbox/#resolve-flexible-lengths
+    /// <https://drafts.csswg.org/css-flexbox/#resolve-flexible-lengths>
     pub fn flex_resolve(&mut self, items: &mut [FlexItem], collapse: bool) {
         let mut total_grow = 0.0;
         let mut total_shrink = 0.0;
         let mut total_scaled = 0.0;
         let mut active_count = 0;
         // Iterate through items, collect total factors and freeze those that have already met
         // their constraints or won't grow/shrink in corresponding scenario.
         // https://drafts.csswg.org/css-flexbox/#resolve-flexible-lengths
--- a/servo/components/layout/query.rs
+++ b/servo/components/layout/query.rs
@@ -674,17 +674,17 @@ pub fn process_node_scroll_area_request<
             let right = max(iterator.union_rect.size.width, iterator.origin_rect.size.width);
             Rect::new(Point2D::new(iterator.origin_rect.origin.x, top),
                       Size2D::new(right, iterator.origin_rect.size.height))
         }
     }
 }
 
 /// Return the resolved value of property for a given (pseudo)element.
-/// https://drafts.csswg.org/cssom/#resolved-value
+/// <https://drafts.csswg.org/cssom/#resolved-value>
 pub fn process_resolved_style_request<'a, N>(context: &LayoutContext,
                                              node: N,
                                              pseudo: &Option<PseudoElement>,
                                              property: &PropertyId,
                                              layout_root: &mut Flow) -> String
     where N: LayoutNode,
 {
     use style::stylist::RuleInclusion;
--- a/servo/components/net/cookie.rs
+++ b/servo/components/net/cookie.rs
@@ -37,17 +37,17 @@ impl Cookie {
     pub fn from_cookie_string(cookie_str: String, request: &ServoUrl,
                              source: CookieSource) -> Option<Cookie> {
         cookie_rs::Cookie::parse(cookie_str)
             .ok()
             .map(|cookie| Cookie::new_wrapped(cookie, request, source))
             .unwrap_or(None)
     }
 
-    /// http://tools.ietf.org/html/rfc6265#section-5.3
+    /// <http://tools.ietf.org/html/rfc6265#section-5.3>
     pub fn new_wrapped(mut cookie: cookie_rs::Cookie<'static>, request: &ServoUrl, source: CookieSource)
                        -> Option<Cookie> {
         // Step 3
         let (persistent, expiry_time) = match (cookie.max_age(), cookie.expires()) {
             (Some(max_age), _) => {
                 (true, Some(at(now().to_timespec() + Duration::seconds(max_age.num_seconds()))))
             }
             (_, Some(expires)) => (true, Some(expires)),
--- a/servo/components/net/fetch/methods.rs
+++ b/servo/components/net/fetch/methods.rs
@@ -489,32 +489,32 @@ fn scheme_fetch(request: &mut Request,
             debug!("ftp is not implemented");
             Response::network_error(NetworkError::Internal("Unexpected scheme".into()))
         },
 
         _ => Response::network_error(NetworkError::Internal("Unexpected scheme".into()))
     }
 }
 
-/// https://fetch.spec.whatwg.org/#cors-safelisted-request-header
+/// <https://fetch.spec.whatwg.org/#cors-safelisted-request-header>
 pub fn is_cors_safelisted_request_header(h: &HeaderView) -> bool {
     if h.is::<ContentType>() {
         match h.value() {
             Some(&ContentType(Mime(TopLevel::Text, SubLevel::Plain, _))) |
             Some(&ContentType(Mime(TopLevel::Application, SubLevel::WwwFormUrlEncoded, _))) |
             Some(&ContentType(Mime(TopLevel::Multipart, SubLevel::FormData, _))) => true,
             _ => false
 
         }
     } else {
         h.is::<Accept>() || h.is::<AcceptLanguage>() || h.is::<ContentLanguage>()
     }
 }
 
-/// https://fetch.spec.whatwg.org/#cors-safelisted-method
+/// <https://fetch.spec.whatwg.org/#cors-safelisted-method>
 pub fn is_cors_safelisted_method(m: &Method) -> bool {
     match *m {
         Method::Get | Method::Head | Method::Post => true,
         _ => false
     }
 }
 
 fn is_null_body_status(status: &Option<StatusCode>) -> bool {
@@ -523,19 +523,19 @@ fn is_null_body_status(status: &Option<S
             StatusCode::SwitchingProtocols | StatusCode::NoContent |
                 StatusCode::ResetContent | StatusCode::NotModified => true,
             _ => false
         },
         _ => false
     }
 }
 
-/// https://fetch.spec.whatwg.org/#should-response-to-request-be-blocked-due-to-nosniff?
+/// <https://fetch.spec.whatwg.org/#should-response-to-request-be-blocked-due-to-nosniff?>
 pub fn should_be_blocked_due_to_nosniff(request_type: Type, response_headers: &Headers) -> bool {
-    /// https://fetch.spec.whatwg.org/#x-content-type-options-header
+    /// <https://fetch.spec.whatwg.org/#x-content-type-options-header>
     /// This is needed to parse `X-Content-Type-Options` according to spec,
     /// which requires that we inspect only the first value.
     ///
     /// A [unit-like struct](https://doc.rust-lang.org/book/structs.html#unit-like-structs)
     /// is sufficient since a valid header implies that we use `nosniff`.
     #[derive(Clone, Copy, Debug)]
     struct XContentTypeOptions;
 
@@ -567,17 +567,17 @@ pub fn should_be_blocked_due_to_nosniff(
     if response_headers.get::<XContentTypeOptions>().is_none() {
         return false;
     }
 
     // Step 4
     // Note: an invalid MIME type will produce a `None`.
     let content_type_header = response_headers.get::<ContentType>();
 
-    /// https://html.spec.whatwg.org/multipage/#scriptingLanguages
+    /// <https://html.spec.whatwg.org/multipage/#scriptingLanguages>
     #[inline]
     fn is_javascript_mime_type(mime_type: &Mime) -> bool {
         let javascript_mime_types: [Mime; 16] = [
             mime!(Application / ("ecmascript")),
             mime!(Application / ("javascript")),
             mime!(Application / ("x-ecmascript")),
             mime!(Application / ("x-javascript")),
             mime!(Text / ("ecmascript")),
@@ -614,32 +614,32 @@ pub fn should_be_blocked_due_to_nosniff(
                 _ => true
             }
         }
         // Step 8
         _ => false
     };
 }
 
-/// https://fetch.spec.whatwg.org/#should-response-to-request-be-blocked-due-to-mime-type?
+/// <https://fetch.spec.whatwg.org/#should-response-to-request-be-blocked-due-to-mime-type?>
 fn should_be_blocked_due_to_mime_type(request_type: Type, response_headers: &Headers) -> bool {
     let mime_type = match response_headers.get::<ContentType>() {
         Some(header) => header,
         None => return false,
     };
     request_type == Type::Script && match *mime_type {
         ContentType(Mime(TopLevel::Audio, _, _)) |
         ContentType(Mime(TopLevel::Video, _, _)) |
         ContentType(Mime(TopLevel::Image, _, _)) => true,
         ContentType(Mime(TopLevel::Text, SubLevel::Ext(ref ext), _)) => ext == "csv",
         _ => false,
     }
 }
 
-/// https://fetch.spec.whatwg.org/#block-bad-port
+/// <https://fetch.spec.whatwg.org/#block-bad-port>
 pub fn should_be_blocked_due_to_bad_port(url: &ServoUrl) -> bool {
     // Step 1 is not applicable, this function just takes the URL directly.
 
     // Step 2.
     let scheme = url.scheme();
 
     // Step 3.
     // If there is no explicit port, this means the default one is used for
@@ -657,22 +657,22 @@ pub fn should_be_blocked_due_to_bad_port
     if is_network_scheme(scheme) && is_bad_port(port) {
         return true;
     }
 
     // Step 6.
     false
 }
 
-/// https://fetch.spec.whatwg.org/#network-scheme
+/// <https://fetch.spec.whatwg.org/#network-scheme>
 fn is_network_scheme(scheme: &str) -> bool {
     scheme == "ftp" || scheme == "http" || scheme == "https"
 }
 
-/// https://fetch.spec.whatwg.org/#bad-port
+/// <https://fetch.spec.whatwg.org/#bad-port>
 fn is_bad_port(port: u16) -> bool {
     static BAD_PORTS: [u16; 64] = [
         1, 7, 9, 11, 13, 15, 17, 19, 20, 21, 22, 23, 25, 37, 42,
         43, 53, 77, 79, 87, 95, 101, 102, 103, 104, 109, 110, 111,
         113, 115, 117, 119, 123, 135, 139, 143, 179, 389, 465, 512,
         513, 514, 515, 526, 530, 531, 532, 540, 556, 563, 587, 601,
         636, 993, 995, 2049, 3659, 4045, 6000, 6665, 6666, 6667,
         6668, 6669
--- a/servo/components/net/http_loader.rs
+++ b/servo/components/net/http_loader.rs
@@ -188,42 +188,42 @@ pub fn set_default_accept_language(heade
     let mut en: LanguageTag = Default::default();
     en.language = Some("en".to_owned());
     headers.set(AcceptLanguage(vec![
         qitem(en_us),
         QualityItem::new(en, Quality(500)),
     ]));
 }
 
-/// https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-state-no-referrer-when-downgrade
+/// <https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-state-no-referrer-when-downgrade>
 fn no_referrer_when_downgrade_header(referrer_url: ServoUrl, url: ServoUrl) -> Option<ServoUrl> {
     if referrer_url.scheme() == "https" && url.scheme() != "https" {
         return None;
     }
     return strip_url(referrer_url, false);
 }
 
-/// https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-strict-origin
+/// <https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-strict-origin>
 fn strict_origin(referrer_url: ServoUrl, url: ServoUrl) -> Option<ServoUrl> {
     if referrer_url.scheme() == "https" && url.scheme() != "https" {
         return None;
     }
     strip_url(referrer_url, true)
 }
 
-/// https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-strict-origin-when-cross-origin
+/// <https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-strict-origin-when-cross-origin>
 fn strict_origin_when_cross_origin(referrer_url: ServoUrl, url: ServoUrl) -> Option<ServoUrl> {
     if referrer_url.scheme() == "https" && url.scheme() != "https" {
         return None;
     }
     let cross_origin = referrer_url.origin() != url.origin();
     strip_url(referrer_url, cross_origin)
 }
 
-/// https://w3c.github.io/webappsec-referrer-policy/#strip-url
+/// <https://w3c.github.io/webappsec-referrer-policy/#strip-url>
 fn strip_url(mut referrer_url: ServoUrl, origin_only: bool) -> Option<ServoUrl> {
     if referrer_url.scheme() == "https" || referrer_url.scheme() == "http" {
         {
             let referrer = referrer_url.as_mut_url();
             referrer.set_username("").unwrap();
             referrer.set_password(None).unwrap();
             referrer.set_fragment(None);
             if origin_only {
@@ -231,17 +231,17 @@ fn strip_url(mut referrer_url: ServoUrl,
                 referrer.set_query(None);
             }
         }
         return Some(referrer_url);
     }
     return None;
 }
 
-/// https://w3c.github.io/webappsec-referrer-policy/#determine-requests-referrer
+/// <https://w3c.github.io/webappsec-referrer-policy/#determine-requests-referrer>
 /// Steps 4-6.
 pub fn determine_request_referrer(headers: &mut Headers,
                                   referrer_policy: ReferrerPolicy,
                                   referrer_source: ServoUrl,
                                   current_url: ServoUrl)
                                   -> Option<ServoUrl> {
     assert!(!headers.has::<Referer>());
     // FIXME(#14505): this does not seem to be the correct way of checking for
@@ -1371,17 +1371,17 @@ fn is_no_store_cache(headers: &Headers) 
     headers.has::<IfRange>()
 }
 
 fn response_needs_revalidation(_response: &Response) -> bool {
     // TODO this function
     false
 }
 
-/// https://fetch.spec.whatwg.org/#redirect-status
+/// <https://fetch.spec.whatwg.org/#redirect-status>
 pub fn is_redirect_status(status: StatusCode) -> bool {
     match status {
         StatusCode::MovedPermanently |
         StatusCode::Found |
         StatusCode::SeeOther |
         StatusCode::TemporaryRedirect |
         StatusCode::PermanentRedirect => true,
         _ => false,
--- a/servo/components/net/mime_classifier.rs
+++ b/servo/components/net/mime_classifier.rs
@@ -25,17 +25,17 @@ pub enum MediaType {
 }
 
 pub enum ApacheBugFlag {
     On,
     Off
 }
 
 impl ApacheBugFlag {
-    /// https://mimesniff.spec.whatwg.org/#supplied-mime-type-detection-algorithm
+    /// <https://mimesniff.spec.whatwg.org/#supplied-mime-type-detection-algorithm>
     pub fn from_content_type(last_raw_content_type: &[u8]) -> ApacheBugFlag {
         if last_raw_content_type == b"text/plain"
                || last_raw_content_type == b"text/plain; charset=ISO-8859-1"
                || last_raw_content_type == b"text/plain; charset=iso-8859-1"
                || last_raw_content_type == b"text/plain; charset=UTF-8" {
             ApacheBugFlag::On
         } else {
             ApacheBugFlag::Off
--- a/servo/components/net/subresource_integrity.rs
+++ b/servo/components/net/subresource_integrity.rs
@@ -11,17 +11,17 @@ use std::sync::MutexGuard;
 const SUPPORTED_ALGORITHM: &'static [&'static str] = &[
     "sha256",
     "sha384",
     "sha512",
 ];
 pub type StaticCharVec = &'static [char];
 /// A "space character" according to:
 ///
-/// https://html.spec.whatwg.org/multipage/#space-character
+/// <https://html.spec.whatwg.org/multipage/#space-character>
 pub static HTML_SPACE_CHARACTERS: StaticCharVec = &[
     '\u{0020}',
     '\u{0009}',
     '\u{000a}',
     '\u{000c}',
     '\u{000d}',
 ];
 #[derive(Clone)]
@@ -39,17 +39,17 @@ impl SriEntry {
         SriEntry {
             alg: alg.to_owned(),
             val: val.to_owned(),
             opt: opt,
         }
     }
 }
 
-/// https://w3c.github.io/webappsec-subresource-integrity/#parse-metadata
+/// <https://w3c.github.io/webappsec-subresource-integrity/#parse-metadata>
 pub fn parsed_metadata(integrity_metadata: &str) -> Vec<SriEntry> {
     // Step 1
     let mut result = vec![];
 
     // Step 3
     let tokens = split_html_space_chars(integrity_metadata);
     for token in tokens {
         let parsed_data: Vec<&str> = token.split("-").collect();
@@ -72,33 +72,33 @@ pub fn parsed_metadata(integrity_metadat
 
             result.push(SriEntry::new(alg, digest, opt));
         }
     }
 
     return result;
 }
 
-/// https://w3c.github.io/webappsec-subresource-integrity/#getprioritizedhashfunction
+/// <https://w3c.github.io/webappsec-subresource-integrity/#getprioritizedhashfunction>
 pub fn get_prioritized_hash_function(hash_func_left: &str, hash_func_right: &str) -> Option<String> {
     let left_priority = SUPPORTED_ALGORITHM.iter().position(|s| s.to_owned() == hash_func_left).unwrap();
     let right_priority = SUPPORTED_ALGORITHM.iter().position(|s| s.to_owned() == hash_func_right).unwrap();
 
     if left_priority == right_priority {
         return None;
     }
     if left_priority > right_priority {
         Some(hash_func_left.to_owned())
     } else {
         Some(hash_func_right.to_owned())
     }
 
 }
 
-/// https://w3c.github.io/webappsec-subresource-integrity/#get-the-strongest-metadata
+/// <https://w3c.github.io/webappsec-subresource-integrity/#get-the-strongest-metadata>
 pub fn get_strongest_metadata(integrity_metadata_list: Vec<SriEntry>) -> Vec<SriEntry> {
     let mut result: Vec<SriEntry> = vec![integrity_metadata_list[0].clone()];
     let mut current_algorithm = result[0].alg.clone();
 
     for integrity_metadata in &integrity_metadata_list[1..] {
         let prioritized_hash = get_prioritized_hash_function(&integrity_metadata.alg,
                                                                  &*current_algorithm);
         if prioritized_hash.is_none() {
@@ -109,37 +109,37 @@ pub fn get_strongest_metadata(integrity_
                 current_algorithm = algorithm;
             }
         }
     }
 
     result
 }
 
-/// https://w3c.github.io/webappsec-subresource-integrity/#apply-algorithm-to-response
+/// <https://w3c.github.io/webappsec-subresource-integrity/#apply-algorithm-to-response>
 fn apply_algorithm_to_response(body: MutexGuard<ResponseBody>,
                                message_digest: MessageDigest)
                                -> String {
     if let ResponseBody::Done(ref vec) = *body {
         let response_digest = hash2(message_digest, vec).unwrap(); //Now hash2
         base64::encode(&response_digest)
     } else {
         unreachable!("Tried to calculate digest of incomplete response body")
     }
 }
 
-/// https://w3c.github.io/webappsec-subresource-integrity/#is-response-eligible
+/// <https://w3c.github.io/webappsec-subresource-integrity/#is-response-eligible>
 fn is_eligible_for_integrity_validation(response: &Response) -> bool {
     match response.response_type {
         ResponseType::Basic | ResponseType::Default | ResponseType::Cors => true,
         _ => false,
     }
 }
 
-/// https://w3c.github.io/webappsec-subresource-integrity/#does-response-match-metadatalist
+/// <https://w3c.github.io/webappsec-subresource-integrity/#does-response-match-metadatalist>
 pub fn is_response_integrity_valid(integrity_metadata: &str, response: &Response) -> bool {
     let parsed_metadata_list: Vec<SriEntry> = parsed_metadata(integrity_metadata);
 
     // Step 2 & 4
     if parsed_metadata_list.is_empty() {
         return true;
     }
 
--- a/servo/components/net_traits/blob_url_store.rs
+++ b/servo/components/net_traits/blob_url_store.rs
@@ -29,29 +29,31 @@ pub struct BlobBuf {
     pub type_string: String,
     /// Size of content in bytes
     pub size: u64,
     /// Content of blob
     pub bytes: Vec<u8>,
 }
 
 /// Parse URL as Blob URL scheme's definition
-/// https://w3c.github.io/FileAPI/#DefinitionOfScheme
+///
+/// <https://w3c.github.io/FileAPI/#DefinitionOfScheme>
 pub fn parse_blob_url(url: &ServoUrl) -> Result<(Uuid, FileOrigin), ()> {
     let url_inner = Url::parse(url.path()).map_err(|_| ())?;
     let id = {
         let mut segs = url_inner.path_segments().ok_or(())?;
         let id = segs.nth(0).ok_or(())?;
         Uuid::from_str(id).map_err(|_| ())?
     };
     Ok((id, get_blob_origin(&ServoUrl::from_url(url_inner))))
 }
 
 /// Given an URL, returning the Origin that a Blob created under this
 /// URL should have.
+///
 /// HACK(izgzhen): Not well-specified on spec, and it is a bit a hack
 /// both due to ambiguity of spec and that we have to serialization the
 /// Origin here.
 pub fn get_blob_origin(url: &ServoUrl) -> FileOrigin {
     if url.scheme() == "file" {
         // NOTE: by default this is "null" (Opaque), which is not ideal
         "file://".to_string()
     } else {
--- a/servo/components/net_traits/filemanager_thread.rs
+++ b/servo/components/net_traits/filemanager_thread.rs
@@ -12,17 +12,17 @@ use uuid::Uuid;
 
 // HACK: Not really process-safe now, we should send Origin
 //       directly instead of this in future, blocked on #11722
 /// File manager store entry's origin
 pub type FileOrigin = String;
 
 /// Relative slice positions of a sequence,
 /// whose semantic should be consistent with (start, end) parameters in
-/// https://w3c.github.io/FileAPI/#dfn-slice
+/// <https://w3c.github.io/FileAPI/#dfn-slice>
 #[derive(Clone, Deserialize, Serialize)]
 pub struct RelativePos {
     /// Relative to first byte if non-negative,
     /// relative to one past last byte if negative,
     pub start: i64,
     /// Relative offset from first byte if Some(non-negative),
     /// relative to one past last byte if Some(negative),
     /// None if one past last byte
@@ -54,17 +54,17 @@ impl RelativePos {
                 (Some(old_end), Some(rel_end)) => Some(old_end + rel_end),
                 (old, None) => old,
                 (None, rel) => rel,
             },
         }
     }
 
     /// Compute absolute range by giving the total size
-    /// https://w3c.github.io/FileAPI/#slice-method-algo
+    /// <https://w3c.github.io/FileAPI/#slice-method-algo>
     pub fn to_abs_range(&self, size: usize) -> Range<usize> {
         let size = size as i64;
 
         let start = {
             if self.start < 0 {
                 max(size + self.start, 0)
             } else {
                 min(self.start, size)
--- a/servo/components/net_traits/lib.rs
+++ b/servo/components/net_traits/lib.rs
@@ -54,17 +54,17 @@ pub mod storage_thread;
 /// It may be surprising that this goes in the network crate as opposed to the graphics crate.
 /// However, image handling is generally very integrated with the network stack (especially where
 /// caching is involved) and as a result it must live in here.
 pub mod image {
     pub mod base;
 }
 
 /// A loading context, for context-specific sniffing, as defined in
-/// https://mimesniff.spec.whatwg.org/#context-specific-sniffing
+/// <https://mimesniff.spec.whatwg.org/#context-specific-sniffing>
 #[derive(Clone, Deserialize, HeapSizeOf, Serialize)]
 pub enum LoadContext {
     Browsing,
     Image,
     AudioVideo,
     Plugin,
     Style,
     Script,
@@ -154,35 +154,35 @@ pub enum FetchResponseMsg {
     ProcessRequestEOF,
     // todo: send more info about the response (or perhaps the entire Response)
     ProcessResponse(Result<FetchMetadata, NetworkError>),
     ProcessResponseChunk(Vec<u8>),
     ProcessResponseEOF(Result<(), NetworkError>),
 }
 
 pub trait FetchTaskTarget {
-    /// https://fetch.spec.whatwg.org/#process-request-body
+    /// <https://fetch.spec.whatwg.org/#process-request-body>
     ///
     /// Fired when a chunk of the request body is transmitted
     fn process_request_body(&mut self, request: &Request);
 
-    /// https://fetch.spec.whatwg.org/#process-request-end-of-file
+    /// <https://fetch.spec.whatwg.org/#process-request-end-of-file>
     ///
     /// Fired when the entire request finishes being transmitted
     fn process_request_eof(&mut self, request: &Request);
 
-    /// https://fetch.spec.whatwg.org/#process-response
+    /// <https://fetch.spec.whatwg.org/#process-response>
     ///
     /// Fired when headers are received
     fn process_response(&mut self, response: &Response);
 
     /// Fired when a chunk of response content is received
     fn process_response_chunk(&mut self, chunk: Vec<u8>);
 
-    /// https://fetch.spec.whatwg.org/#process-response-end-of-file
+    /// <https://fetch.spec.whatwg.org/#process-response-end-of-file>
     ///
     /// Fired when the response is fully fetched
     fn process_response_eof(&mut self, response: &Response);
 }
 
 #[derive(Clone, Deserialize, Serialize)]
 pub enum FilteredMetadata {
     Basic(Metadata),
--- a/servo/components/net_traits/pub_domains.rs
+++ b/servo/components/net_traits/pub_domains.rs
@@ -2,17 +2,17 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 //! Implementation of public domain matching.
 //!
 //! The list is a file located on the `resources` folder and loaded once on first need.
 //!
 //! The list can be updated with `./mach update-pub-domains` from this source:
-//! https://publicsuffix.org/list/
+//! <https://publicsuffix.org/list/>
 //!
 //! This implementation is not strictly following the specification of the list. Wildcards are not
 //! restricted to appear only in the leftmost position, but the current list has no such cases so
 //! we don't need to make the code more complex for it. The `mach` update command makes sure that
 //! those cases are not present.
 
 use servo_config::resource_files::read_resource_file;
 use servo_url::{Host, ImmutableOrigin, ServoUrl};
--- a/servo/components/net_traits/request.rs
+++ b/servo/components/net_traits/request.rs
@@ -196,74 +196,74 @@ impl Default for RequestInit {
         }
     }
 }
 
 /// A [Request](https://fetch.spec.whatwg.org/#concept-request) as defined by
 /// the Fetch spec.
 #[derive(Clone, HeapSizeOf)]
 pub struct Request {
-    /// https://fetch.spec.whatwg.org/#concept-request-method
+    /// <https://fetch.spec.whatwg.org/#concept-request-method>
     #[ignore_heap_size_of = "Defined in hyper"]
     pub method: Method,
-    /// https://fetch.spec.whatwg.org/#local-urls-only-flag
+    /// <https://fetch.spec.whatwg.org/#local-urls-only-flag>
     pub local_urls_only: bool,
-    /// https://fetch.spec.whatwg.org/#sandboxed-storage-area-urls-flag
+    /// <https://fetch.spec.whatwg.org/#sandboxed-storage-area-urls-flag>
     pub sandboxed_storage_area_urls: bool,
-    /// https://fetch.spec.whatwg.org/#concept-request-header-list
+    /// <https://fetch.spec.whatwg.org/#concept-request-header-list>
     #[ignore_heap_size_of = "Defined in hyper"]
     pub headers: Headers,
-    /// https://fetch.spec.whatwg.org/#unsafe-request-flag
+    /// <https://fetch.spec.whatwg.org/#unsafe-request-flag>
     pub unsafe_request: bool,
-    /// https://fetch.spec.whatwg.org/#concept-request-body
+    /// <https://fetch.spec.whatwg.org/#concept-request-body>
     pub body: Option<Vec<u8>>,
     // TODO: client object
     pub window: Window,
     // TODO: target browsing context
-    /// https://fetch.spec.whatwg.org/#request-keepalive-flag
+    /// <https://fetch.spec.whatwg.org/#request-keepalive-flag>
     pub keep_alive: bool,
-    /// https://fetch.spec.whatwg.org/#request-service-workers-mode
+    /// <https://fetch.spec.whatwg.org/#request-service-workers-mode>
     pub service_workers_mode: ServiceWorkersMode,
-    /// https://fetch.spec.whatwg.org/#concept-request-initiator
+    /// <https://fetch.spec.whatwg.org/#concept-request-initiator>
     pub initiator: Initiator,
-    /// https://fetch.spec.whatwg.org/#concept-request-type
+    /// <https://fetch.spec.whatwg.org/#concept-request-type>
     pub type_: Type,
-    /// https://fetch.spec.whatwg.org/#concept-request-destination
+    /// <https://fetch.spec.whatwg.org/#concept-request-destination>
     pub destination: Destination,
     // TODO: priority object
-    /// https://fetch.spec.whatwg.org/#concept-request-origin
+    /// <https://fetch.spec.whatwg.org/#concept-request-origin>
     pub origin: Origin,
-    /// https://fetch.spec.whatwg.org/#concept-request-referrer
+    /// <https://fetch.spec.whatwg.org/#concept-request-referrer>
     pub referrer: Referrer,
-    /// https://fetch.spec.whatwg.org/#concept-request-referrer-policy
+    /// <https://fetch.spec.whatwg.org/#concept-request-referrer-policy>
     pub referrer_policy: Option<ReferrerPolicy>,
     pub pipeline_id: Option<PipelineId>,
-    /// https://fetch.spec.whatwg.org/#synchronous-flag
+    /// <https://fetch.spec.whatwg.org/#synchronous-flag>
     pub synchronous: bool,
-    /// https://fetch.spec.whatwg.org/#concept-request-mode
+    /// <https://fetch.spec.whatwg.org/#concept-request-mode>
     pub mode: RequestMode,
-    /// https://fetch.spec.whatwg.org/#use-cors-preflight-flag
+    /// <https://fetch.spec.whatwg.org/#use-cors-preflight-flag>
     pub use_cors_preflight: bool,
-    /// https://fetch.spec.whatwg.org/#concept-request-credentials-mode
+    /// <https://fetch.spec.whatwg.org/#concept-request-credentials-mode>
     pub credentials_mode: CredentialsMode,
-    /// https://fetch.spec.whatwg.org/#concept-request-use-url-credentials-flag
+    /// <https://fetch.spec.whatwg.org/#concept-request-use-url-credentials-flag>
     pub use_url_credentials: bool,
-    /// https://fetch.spec.whatwg.org/#concept-request-cache-mode
+    /// <https://fetch.spec.whatwg.org/#concept-request-cache-mode>
     pub cache_mode: CacheMode,
-    /// https://fetch.spec.whatwg.org/#concept-request-redirect-mode
+    /// <https://fetch.spec.whatwg.org/#concept-request-redirect-mode>
     pub redirect_mode: RedirectMode,
-    /// https://fetch.spec.whatwg.org/#concept-request-integrity-metadata
+    /// <https://fetch.spec.whatwg.org/#concept-request-integrity-metadata>
     pub integrity_metadata: String,
     // Use the last method on url_list to act as spec current url field, and
     // first method to act as spec url field
-    /// https://fetch.spec.whatwg.org/#concept-request-url-list
+    /// <https://fetch.spec.whatwg.org/#concept-request-url-list>
     pub url_list: Vec<ServoUrl>,
-    /// https://fetch.spec.whatwg.org/#concept-request-redirect-count
+    /// <https://fetch.spec.whatwg.org/#concept-request-redirect-count>
     pub redirect_count: u32,
-    /// https://fetch.spec.whatwg.org/#concept-request-response-tainting
+    /// <https://fetch.spec.whatwg.org/#concept-request-response-tainting>
     pub response_tainting: ResponseTainting,
 }
 
 impl Request {
     pub fn new(url: ServoUrl,
                origin: Option<Origin>,
                pipeline_id: Option<PipelineId>)
                -> Request {
@@ -328,37 +328,37 @@ impl Request {
             url_list.push(init.url);
         }
         req.redirect_count = url_list.len() as u32 - 1;
         req.url_list = url_list;
         req.integrity_metadata = init.integrity_metadata;
         req
     }
 
-    /// https://fetch.spec.whatwg.org/#concept-request-url
+    /// <https://fetch.spec.whatwg.org/#concept-request-url>
     pub fn url(&self) -> ServoUrl {
         self.url_list.first().unwrap().clone()
     }
 
-    /// https://fetch.spec.whatwg.org/#concept-request-current-url
+    /// <https://fetch.spec.whatwg.org/#concept-request-current-url>
     pub fn current_url(&self) -> ServoUrl {
         self.url_list.last().unwrap().clone()
     }
 
-    /// https://fetch.spec.whatwg.org/#concept-request-current-url
+    /// <https://fetch.spec.whatwg.org/#concept-request-current-url>
     pub fn current_url_mut(&mut self) -> &mut ServoUrl {
         self.url_list.last_mut().unwrap()
     }
 
-    /// https://fetch.spec.whatwg.org/#navigation-request
+    /// <https://fetch.spec.whatwg.org/#navigation-request>
     pub fn is_navigation_request(&self) -> bool {
         self.destination == Destination::Document
     }
 
-    /// https://fetch.spec.whatwg.org/#subresource-request
+    /// <https://fetch.spec.whatwg.org/#subresource-request>
     pub fn is_subresource_request(&self) -> bool {
         match self.destination {
             Destination::Font | Destination::Image | Destination::Manifest | Destination::Media |
             Destination::Script | Destination::Style | Destination::XSLT | Destination::None => true,
             _ => false,
         }
     }
 }
--- a/servo/components/script/document_loader.rs
+++ b/servo/components/script/document_loader.rs
@@ -1,14 +1,15 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 //! Tracking of pending loads in a document.
-//! https://html.spec.whatwg.org/multipage/#the-end
+//!
+//! <https://html.spec.whatwg.org/multipage/#the-end>
 
 use dom::bindings::root::Dom;
 use dom::document::Document;
 use ipc_channel::ipc::IpcSender;
 use net_traits::{CoreResourceMsg, FetchResponseMsg, ResourceThreads, IpcSend};
 use net_traits::request::RequestInit;
 use servo_url::ServoUrl;
 use std::thread;
--- a/servo/components/script/dom/bindings/callback.rs
+++ b/servo/components/script/dom/bindings/callback.rs
@@ -225,20 +225,20 @@ pub struct CallSetup {
     /// (possibly wrapped) callback object.
     exception_global: DomRoot<GlobalScope>,
     /// The `JSContext` used for the call.
     cx: *mut JSContext,
     /// The compartment we were in before the call.
     old_compartment: *mut JSCompartment,
     /// The exception handling used for the call.
     handling: ExceptionHandling,
-    /// https://heycam.github.io/webidl/#es-invoking-callback-functions
+    /// <https://heycam.github.io/webidl/#es-invoking-callback-functions>
     /// steps 8 and 18.2.
     entry_script: Option<AutoEntryScript>,
-    /// https://heycam.github.io/webidl/#es-invoking-callback-functions
+    /// <https://heycam.github.io/webidl/#es-invoking-callback-functions>
     /// steps 9 and 18.1.
     incumbent_script: Option<AutoIncumbentScript>,
 }
 
 impl CallSetup {
     /// Performs the setup needed to make a call.
     #[allow(unrooted_must_root)]
     pub fn new<T: CallbackContainer>(callback: &T,
--- a/servo/components/script/dom/bindings/conversions.rs
+++ b/servo/components/script/dom/bindings/conversions.rs
@@ -1,41 +1,41 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 //! Conversions of Rust values to and from `JSVal`.
 //!
 //! | IDL type                | Argument type   | Return type    |
 //! |-------------------------|-----------------|----------------|
-//! | any                     | `JSVal`                          |
-//! | boolean                 | `bool`                           |
-//! | byte                    | `i8`                             |
-//! | octet                   | `u8`                             |
-//! | short                   | `i16`                            |
-//! | unsigned short          | `u16`                            |
-//! | long                    | `i32`                            |
-//! | unsigned long           | `u32`                            |
-//! | long long               | `i64`                            |
-//! | unsigned long long      | `u64`                            |
-//! | unrestricted float      | `f32`                            |
-//! | float                   | `Finite<f32>`                    |
-//! | unrestricted double     | `f64`                            |
-//! | double                  | `Finite<f64>`                    |
-//! | DOMString               | `DOMString`                      |
-//! | USVString               | `USVString`                      |
-//! | ByteString              | `ByteString`                     |
-//! | object                  | `*mut JSObject`                  |
+//! | any                     | `JSVal`         |                |
+//! | boolean                 | `bool`          |                |
+//! | byte                    | `i8`            |                |
+//! | octet                   | `u8`            |                |
+//! | short                   | `i16`           |                |
+//! | unsigned short          | `u16`           |                |
+//! | long                    | `i32`           |                |
+//! | unsigned long           | `u32`           |                |
+//! | long long               | `i64`           |                |
+//! | unsigned long long      | `u64`           |                |
+//! | unrestricted float      | `f32`           |                |
+//! | float                   | `Finite<f32>`   |                |
+//! | unrestricted double     | `f64`           |                |
+//! | double                  | `Finite<f64>`   |                |
+//! | DOMString               | `DOMString`     |                |
+//! | USVString               | `USVString`     |                |
+//! | ByteString              | `ByteString`    |                |
+//! | object                  | `*mut JSObject` |                |
 //! | interface types         | `&T`            | `DomRoot<T>`   |
 //! | dictionary types        | `&T`            | *unsupported*  |
-//! | enumeration types       | `T`                              |
-//! | callback function types | `Rc<T>`                          |
-//! | nullable types          | `Option<T>`                      |
-//! | sequences               | `Vec<T>`                         |
-//! | union types             | `T`                              |
+//! | enumeration types       | `T`             |                |
+//! | callback function types | `Rc<T>`         |                |
+//! | nullable types          | `Option<T>`     |                |
+//! | sequences               | `Vec<T>`        |                |
+//! | union types             | `T`             |                |
 
 use dom::bindings::error::{Error, Fallible};
 use dom::bindings::inheritance::Castable;
 use dom::bindings::nonnull::NonNullJSObjectPtr;
 use dom::bindings::num::Finite;
 use dom::bindings::reflector::{DomObject, Reflector};
 use dom::bindings::root::DomRoot;
 use dom::bindings::str::{ByteString, DOMString, USVString};
--- a/servo/components/script/dom/bindings/interface.rs
+++ b/servo/components/script/dom/bindings/interface.rs
@@ -543,17 +543,17 @@ unsafe extern "C" fn has_instance_hook(c
             *rval = result;
             true
         }
         Err(()) => false,
     }
 }
 
 /// Return whether a value is an instance of a given prototype.
-/// http://heycam.github.io/webidl/#es-interface-hasinstance
+/// <http://heycam.github.io/webidl/#es-interface-hasinstance>
 unsafe fn has_instance(
         cx: *mut JSContext,
         interface_object: HandleObject,
         value: HandleValue)
         -> Result<bool, ()> {
     if !value.is_object() {
         // Step 1.
         return Ok(false);
--- a/servo/components/script/dom/bindings/root.rs
+++ b/servo/components/script/dom/bindings/root.rs
@@ -707,17 +707,17 @@ impl<T: DomObject> LayoutDom<T> {
     /// safe to call because it originates from the layout thread, and it cannot
     /// mutate DOM nodes.
     pub fn get_for_script(&self) -> &T {
         debug_assert!(thread_state::get().is_script());
         unsafe { &*self.ptr.get() }
     }
 }
 
-/// Helper trait for safer manipulations of Option<Heap<T>> values.
+/// Helper trait for safer manipulations of `Option<Heap<T>>` values.
 pub trait OptionalHeapSetter {
     type Value;
     /// Update this optional heap value with a new value.
     fn set(&mut self, v: Option<Self::Value>);
 }
 
 impl<T: GCMethods + Copy> OptionalHeapSetter for Option<Heap<T>> where Heap<T>: Default {
     type Value = T;
--- a/servo/components/script/dom/bindings/settings_stack.rs
+++ b/servo/components/script/dom/bindings/settings_stack.rs
@@ -36,34 +36,34 @@ pub unsafe fn trace(tracer: *mut JSTrace
 }
 
 /// RAII struct that pushes and pops entries from the script settings stack.
 pub struct AutoEntryScript {
     global: DomRoot<GlobalScope>,
 }
 
 impl AutoEntryScript {
-    /// https://html.spec.whatwg.org/multipage/#prepare-to-run-script
+    /// <https://html.spec.whatwg.org/multipage/#prepare-to-run-script>
     pub fn new(global: &GlobalScope) -> Self {
         STACK.with(|stack| {
             trace!("Prepare to run script with {:p}", global);
             let mut stack = stack.borrow_mut();
             stack.push(StackEntry {
                 global: Dom::from_ref(global),
                 kind: StackEntryKind::Entry,
             });
             AutoEntryScript {
                 global: DomRoot::from_ref(global),
             }
         })
     }
 }
 
 impl Drop for AutoEntryScript {
-    /// https://html.spec.whatwg.org/multipage/#clean-up-after-running-script
+    /// <https://html.spec.whatwg.org/multipage/#clean-up-after-running-script>
     fn drop(&mut self) {
         STACK.with(|stack| {
             let mut stack = stack.borrow_mut();
             let entry = stack.pop().unwrap();
             assert_eq!(&*entry.global as *const GlobalScope,
                        &*self.global as *const GlobalScope,
                        "Dropped AutoEntryScript out of order.");
             assert_eq!(entry.kind, StackEntryKind::Entry);
@@ -91,17 +91,17 @@ pub fn entry_global() -> DomRoot<GlobalS
 }
 
 /// RAII struct that pushes and pops entries from the script settings stack.
 pub struct AutoIncumbentScript {
     global: usize,
 }
 
 impl AutoIncumbentScript {
-    /// https://html.spec.whatwg.org/multipage/#prepare-to-run-a-callback
+    /// <https://html.spec.whatwg.org/multipage/#prepare-to-run-a-callback>
     pub fn new(global: &GlobalScope) -> Self {
         // Step 2-3.
         unsafe {
             let cx = Runtime::get();
             assert!(!cx.is_null());
             HideScriptedCaller(cx);
         }
         STACK.with(|stack| {
@@ -115,17 +115,17 @@ impl AutoIncumbentScript {
             AutoIncumbentScript {
                 global: global as *const _ as usize,
             }
         })
     }
 }
 
 impl Drop for AutoIncumbentScript {
-    /// https://html.spec.whatwg.org/multipage/#clean-up-after-running-a-callback
+    /// <https://html.spec.whatwg.org/multipage/#clean-up-after-running-a-callback>
     fn drop(&mut self) {
         STACK.with(|stack| {
             // Step 4.
             let mut stack = stack.borrow_mut();
             let entry = stack.pop().unwrap();
             // Step 3.
             assert_eq!(&*entry.global as *const GlobalScope as usize,
                        self.global,
--- a/servo/components/script/dom/bindings/utils.rs
+++ b/servo/components/script/dom/bindings/utils.rs
@@ -189,17 +189,17 @@ pub unsafe fn find_enum_value<'a, T>(cx:
         return Err(());
     }
 
     let search = jsstring_to_str(cx, jsstr);
     Ok((pairs.iter().find(|&&(key, _)| search == *key).map(|&(_, ref ev)| ev), search))
 }
 
 /// Returns wether `obj` is a platform object
-/// https://heycam.github.io/webidl/#dfn-platform-object
+/// <https://heycam.github.io/webidl/#dfn-platform-object>
 pub fn is_platform_object(obj: *mut JSObject) -> bool {
     unsafe {
         // Fast-path the common case
         let mut clasp = get_object_class(obj);
         if is_dom_class(&*clasp) {
             return true;
         }
         // Now for simplicity check for security wrappers before anything else
--- a/servo/components/script/dom/blob.rs
+++ b/servo/components/script/dom/blob.rs
@@ -324,17 +324,17 @@ fn read_file(global: &GlobalScope, id: U
                 return Ok(bytes);
             }
             Err(_) => return Err(()),
         }
     }
 }
 
 /// Extract bytes from BlobParts, used by Blob and File constructor
-/// https://w3c.github.io/FileAPI/#constructorBlob
+/// <https://w3c.github.io/FileAPI/#constructorBlob>
 pub fn blob_parts_to_bytes(blobparts: Vec<BlobOrString>) -> Result<Vec<u8>, ()> {
     let mut ret = vec![];
 
     for blobpart in &blobparts {
         match blobpart {
             &BlobOrString::String(ref s) => {
                 ret.extend(s.as_bytes());
             },
@@ -371,17 +371,17 @@ impl BlobMethods for Blob {
              content_type: Option<DOMString>)
              -> DomRoot<Blob> {
         let rel_pos = RelativePos::from_opts(start, end);
         Blob::new_sliced(self, rel_pos, content_type.unwrap_or(DOMString::from("")))
     }
 }
 
 /// Get the normalized, MIME-parsable type string
-/// https://w3c.github.io/FileAPI/#dfn-type
+/// <https://w3c.github.io/FileAPI/#dfn-type>
 /// XXX: We will relax the restriction here,
 /// since the spec has some problem over this part.
 /// see https://github.com/w3c/FileAPI/issues/43
 fn normalize_type_string(s: &str) -> String {
     if is_ascii_printable(s) {
         let s_lower = s.to_ascii_lowercase();
         // match s_lower.parse() as Result<Mime, ()> {
             // Ok(_) => s_lower,
--- a/servo/components/script/dom/css.rs
+++ b/servo/components/script/dom/css.rs
@@ -16,41 +16,41 @@ use style::stylesheets::supports_rule::{
 use style_traits::PARSING_MODE_DEFAULT;
 
 #[dom_struct]
 pub struct CSS {
     reflector_: Reflector,
 }
 
 impl CSS {
-    /// http://dev.w3.org/csswg/cssom/#serialize-an-identifier
+    /// <http://dev.w3.org/csswg/cssom/#serialize-an-identifier>
     pub fn Escape(_: &Window, ident: DOMString) -> Fallible<DOMString> {
         let mut escaped = String::new();
         serialize_identifier(&ident, &mut escaped).unwrap();
         Ok(DOMString::from(escaped))
     }
 
-    /// https://drafts.csswg.org/css-conditional/#dom-css-supports
+    /// <https://drafts.csswg.org/css-conditional/#dom-css-supports>
     pub fn Supports(win: &Window, property: DOMString, value: DOMString) -> bool {
         let mut decl = String::new();
         serialize_identifier(&property, &mut decl).unwrap();
         decl.push_str(": ");
         decl.push_str(&value);
         let decl = Declaration(decl);
         let url = win.Document().url();
         let context = ParserContext::new_for_cssom(
             &url,
             Some(CssRuleType::Style),
             PARSING_MODE_DEFAULT,
             QuirksMode::NoQuirks
         );
         decl.eval(&context)
     }
 
-    /// https://drafts.csswg.org/css-conditional/#dom-css-supports
+    /// <https://drafts.csswg.org/css-conditional/#dom-css-supports>
     pub fn Supports_(win: &Window, condition: DOMString) -> bool {
         let mut input = ParserInput::new(&condition);
         let mut input = Parser::new(&mut input);
         let cond = parse_condition_or_declaration(&mut input);
         if let Ok(cond) = cond {
             let url = win.Document().url();
             let context = ParserContext::new_for_cssom(
                 &url,
--- a/servo/components/script/dom/cssconditionrule.rs
+++ b/servo/components/script/dom/cssconditionrule.rs
@@ -32,28 +32,28 @@ impl CSSConditionRule {
     }
 
     pub fn shared_lock(&self) -> &SharedRwLock {
         self.cssgroupingrule.shared_lock()
     }
 }
 
 impl CSSConditionRuleMethods for CSSConditionRule {
-    /// https://drafts.csswg.org/css-conditional-3/#dom-cssconditionrule-conditiontext
+    /// <https://drafts.csswg.org/css-conditional-3/#dom-cssconditionrule-conditiontext>
     fn ConditionText(&self) -> DOMString {
         if let Some(rule) = self.downcast::<CSSMediaRule>() {
             rule.get_condition_text()
         } else if let Some(rule) = self.downcast::<CSSSupportsRule>() {
             rule.get_condition_text()
         } else {
             unreachable!()
         }
     }
 
-    /// https://drafts.csswg.org/css-conditional-3/#dom-cssconditionrule-conditiontext
+    /// <https://drafts.csswg.org/css-conditional-3/#dom-cssconditionrule-conditiontext>
     fn SetConditionText(&self, text: DOMString) {
         if let Some(rule) = self.downcast::<CSSMediaRule>() {
             rule.set_condition_text(text)
         } else if let Some(rule) = self.downcast::<CSSSupportsRule>() {
             rule.set_condition_text(text)
         } else {
             unreachable!()
         }
--- a/servo/components/script/dom/cssmediarule.rs
+++ b/servo/components/script/dom/cssmediarule.rs
@@ -54,25 +54,25 @@ impl CSSMediaRule {
         self.medialist.or_init(|| {
             let guard = self.cssconditionrule.shared_lock().read();
             MediaList::new(self.global().as_window(),
                            self.cssconditionrule.parent_stylesheet(),
                            self.mediarule.read_with(&guard).media_queries.clone())
         })
     }
 
-    /// https://drafts.csswg.org/css-conditional-3/#the-cssmediarule-interface
+    /// <https://drafts.csswg.org/css-conditional-3/#the-cssmediarule-interface>
     pub fn get_condition_text(&self) -> DOMString {
         let guard = self.cssconditionrule.shared_lock().read();
         let rule = self.mediarule.read_with(&guard);
         let list = rule.media_queries.read_with(&guard);
         list.to_css_string().into()
     }
 
-    /// https://drafts.csswg.org/css-conditional-3/#the-cssmediarule-interface
+    /// <https://drafts.csswg.org/css-conditional-3/#the-cssmediarule-interface>
     pub fn set_condition_text(&self, text: DOMString) {
         let mut input = ParserInput::new(&text);
         let mut input = Parser::new(&mut input);
         let global = self.global();
         let window = global.as_window();
         let url = window.get_url();
         let quirks_mode = window.Document().quirks_mode();
         let context = ParserContext::new_for_cssom(&url, Some(CssRuleType::Media),
--- a/servo/components/script/dom/cssstylevalue.rs
+++ b/servo/components/script/dom/cssstylevalue.rs
@@ -29,26 +29,26 @@ impl CSSStyleValue {
     }
 
     pub fn new(global: &GlobalScope, value: String) -> DomRoot<CSSStyleValue> {
         reflect_dom_object(Box::new(CSSStyleValue::new_inherited(value)), global, Wrap)
     }
 }
 
 impl CSSStyleValueMethods for CSSStyleValue {
-    /// https://drafts.css-houdini.org/css-typed-om-1/#CSSStyleValue-stringification-behavior
+    /// <https://drafts.css-houdini.org/css-typed-om-1/#CSSStyleValue-stringification-behavior>
     fn Stringifier(&self) -> DOMString {
         DOMString::from(&*self.value)
     }
 }
 
 impl CSSStyleValue {
     /// Parse the value as a `url()`.
     /// TODO: This should really always be an absolute URL, but we currently
     /// return relative URLs for computed values, so we pass in a base.
-    /// https://github.com/servo/servo/issues/17625
+    /// <https://github.com/servo/servo/issues/17625>
     pub fn get_url(&self, base_url: ServoUrl) -> Option<ServoUrl> {
         let mut input = ParserInput::new(&*self.value);
         let mut parser = Parser::new(&mut input);
         parser.expect_url().ok()
             .and_then(|string| base_url.join(&*string).ok())
     }
 }
--- a/servo/components/script/dom/csssupportsrule.rs
+++ b/servo/components/script/dom/csssupportsrule.rs
@@ -41,24 +41,24 @@ impl CSSSupportsRule {
     #[allow(unrooted_must_root)]
     pub fn new(window: &Window, parent_stylesheet: &CSSStyleSheet,
                supportsrule: Arc<Locked<SupportsRule>>) -> DomRoot<CSSSupportsRule> {
         reflect_dom_object(Box::new(CSSSupportsRule::new_inherited(parent_stylesheet, supportsrule)),
                            window,
                            CSSSupportsRuleBinding::Wrap)
     }
 
-    /// https://drafts.csswg.org/css-conditional-3/#the-csssupportsrule-interface
+    /// <https://drafts.csswg.org/css-conditional-3/#the-csssupportsrule-interface>
     pub fn get_condition_text(&self) -> DOMString {
         let guard = self.cssconditionrule.shared_lock().read();
         let rule = self.supportsrule.read_with(&guard);
         rule.condition.to_css_string().into()
     }
 
-    /// https://drafts.csswg.org/css-conditional-3/#the-csssupportsrule-interface
+    /// <https://drafts.csswg.org/css-conditional-3/#the-csssupportsrule-interface>
     pub fn set_condition_text(&self, text: DOMString) {
         let mut input = ParserInput::new(&text);
         let mut input = Parser::new(&mut input);
         let cond = SupportsCondition::parse(&mut input);
         if let Ok(cond) = cond {
             let global = self.global();
             let win = global.as_window();
             let url = win.Document().url();
--- a/servo/components/script/dom/customelementregistry.rs
+++ b/servo/components/script/dom/customelementregistry.rs
@@ -35,17 +35,17 @@ use microtask::Microtask;
 use script_thread::ScriptThread;
 use std::cell::Cell;
 use std::collections::{HashMap, VecDeque};
 use std::mem;
 use std::ops::Deref;
 use std::ptr;
 use std::rc::Rc;
 
-/// https://html.spec.whatwg.org/multipage/#customelementregistry
+/// <https://html.spec.whatwg.org/multipage/#customelementregistry>
 #[dom_struct]
 pub struct CustomElementRegistry {
     reflector_: Reflector,
 
     window: Dom<Window>,
 
     #[ignore_heap_size_of = "Rc"]
     when_defined: DomRefCell<HashMap<LocalName, Rc<Promise>>>,
@@ -69,22 +69,22 @@ impl CustomElementRegistry {
 
     pub fn new(window: &Window) -> DomRoot<CustomElementRegistry> {
         reflect_dom_object(Box::new(CustomElementRegistry::new_inherited(window)),
                            window,
                            CustomElementRegistryBinding::Wrap)
     }
 
     /// Cleans up any active promises
-    /// https://github.com/servo/servo/issues/15318
+    /// <https://github.com/servo/servo/issues/15318>
     pub fn teardown(&self) {
         self.when_defined.borrow_mut().clear()
     }
 
-    /// https://html.spec.whatwg.org/multipage/#look-up-a-custom-element-definition
+    /// <https://html.spec.whatwg.org/multipage/#look-up-a-custom-element-definition>
     pub fn lookup_definition(&self,
                              local_name: &LocalName,
                              is: Option<&LocalName>)
                              -> Option<Rc<CustomElementDefinition>> {
         self.definitions.borrow().values().find(|definition| {
             // Step 4-5
             definition.local_name == *local_name &&
                 (definition.name == *local_name || Some(&definition.name) == is)
@@ -92,17 +92,17 @@ impl CustomElementRegistry {
     }
 
     pub fn lookup_definition_by_constructor(&self, constructor: HandleObject) -> Option<Rc<CustomElementDefinition>> {
         self.definitions.borrow().values().find(|definition| {
             definition.constructor.callback() == constructor.get()
         }).cloned()
     }
 
-    /// https://html.spec.whatwg.org/multipage/#dom-customelementregistry-define
+    /// <https://html.spec.whatwg.org/multipage/#dom-customelementregistry-define>
     /// Steps 10.1, 10.2
     #[allow(unsafe_code)]
     fn check_prototype(&self, constructor: HandleObject, prototype: MutableHandleValue) -> ErrorResult {
         let global_scope = self.window.upcast::<GlobalScope>();
         unsafe {
             // Step 10.1
             if !JS_GetProperty(global_scope.get_cx(),
                                constructor,
@@ -114,31 +114,31 @@ impl CustomElementRegistry {
             // Step 10.2
             if !prototype.is_object() {
                 return Err(Error::Type("constructor.prototype is not an object".to_owned()));
             }
         }
         Ok(())
     }
 
-    /// https://html.spec.whatwg.org/multipage/#dom-customelementregistry-define
+    /// <https://html.spec.whatwg.org/multipage/#dom-customelementregistry-define>
     /// Steps 10.3, 10.4
     fn get_callbacks(&self, prototype: HandleObject) -> Fallible<LifecycleCallbacks> {
         let cx = self.window.get_cx();
 
         // Step 4
         Ok(LifecycleCallbacks {
             connected_callback: get_callback(cx, prototype, b"connectedCallback\0")?,
             disconnected_callback: get_callback(cx, prototype, b"disconnectedCallback\0")?,
             adopted_callback: get_callback(cx, prototype, b"adoptedCallback\0")?,
             attribute_changed_callback: get_callback(cx, prototype, b"attributeChangedCallback\0")?,
         })
     }
 
-    /// https://html.spec.whatwg.org/multipage/#dom-customelementregistry-define
+    /// <https://html.spec.whatwg.org/multipage/#dom-customelementregistry-define>
     /// Step 10.6
     #[allow(unsafe_code)]
     fn get_observed_attributes(&self, constructor: HandleObject) -> Fallible<Vec<DOMString>> {
         let cx = self.window.get_cx();
         rooted!(in(cx) let mut observed_attributes = UndefinedValue());
         if unsafe { !JS_GetProperty(cx,
                                     constructor,
                                     b"observedAttributes\0".as_ptr() as *const _,
@@ -156,17 +156,17 @@ impl CustomElementRegistry {
         match conversion {
             Ok(ConversionResult::Success(attributes)) => Ok(attributes),
             Ok(ConversionResult::Failure(error)) => Err(Error::Type(error.into())),
             _ => Err(Error::JSFailed),
         }
     }
 }
 
-/// https://html.spec.whatwg.org/multipage/#dom-customelementregistry-define
+/// <https://html.spec.whatwg.org/multipage/#dom-customelementregistry-define>
 /// Step 10.4
 #[allow(unsafe_code)]
 fn get_callback(cx: *mut JSContext, prototype: HandleObject, name: &[u8]) -> Fallible<Option<Rc<Function>>> {
     rooted!(in(cx) let mut callback = UndefinedValue());
 
     // Step 10.4.1
     if unsafe { !JS_GetProperty(cx,
                                 prototype,
@@ -183,17 +183,17 @@ fn get_callback(cx: *mut JSContext, prot
         Ok(Some(Function::new(cx, callback.to_object())))
     } else {
         Ok(None)
     }
 }
 
 impl CustomElementRegistryMethods for CustomElementRegistry {
     #[allow(unsafe_code, unrooted_must_root)]
-    /// https://html.spec.whatwg.org/multipage/#dom-customelementregistry-define
+    /// <https://html.spec.whatwg.org/multipage/#dom-customelementregistry-define>
     fn Define(&self, name: DOMString, constructor_: Rc<Function>, options: &ElementDefinitionOptions) -> ErrorResult {
         let cx = self.window.get_cx();
         rooted!(in(cx) let constructor = constructor_.callback());
         let name = LocalName::from(&*name);
 
         // Step 1
         // We must unwrap the constructor as all wrappers are constructable if they are callable.
         rooted!(in(cx) let unwrapped_constructor = unsafe { UnwrapObject(constructor.get(), 1) });
@@ -316,30 +316,30 @@ impl CustomElementRegistryMethods for Cu
 
         // Step 16, 16.3
         if let Some(promise) = self.when_defined.borrow_mut().remove(&name) {
             promise.resolve_native(&UndefinedValue());
         }
         Ok(())
     }
 
-    /// https://html.spec.whatwg.org/multipage/#dom-customelementregistry-get
+    /// <https://html.spec.whatwg.org/multipage/#dom-customelementregistry-get>
     #[allow(unsafe_code)]
     unsafe fn Get(&self, cx: *mut JSContext, name: DOMString) -> JSVal {
         match self.definitions.borrow().get(&LocalName::from(&*name)) {
             Some(definition) => {
                 rooted!(in(cx) let mut constructor = UndefinedValue());
                 definition.constructor.to_jsval(cx, constructor.handle_mut());
                 constructor.get()
             },
             None => UndefinedValue(),
         }
     }
 
-    /// https://html.spec.whatwg.org/multipage/#dom-customelementregistry-whendefined
+    /// <https://html.spec.whatwg.org/multipage/#dom-customelementregistry-whendefined>
     #[allow(unrooted_must_root)]
     fn WhenDefined(&self, name: DOMString) -> Rc<Promise> {
         let global_scope = self.window.upcast::<GlobalScope>();
         let name = LocalName::from(&*name);
 
         // Step 1
         if !is_valid_custom_element_name(&name) {
             let promise = Promise::new(global_scope);
@@ -385,17 +385,17 @@ pub struct LifecycleCallbacks {
 }
 
 #[derive(Clone, HeapSizeOf, JSTraceable)]
 pub enum ConstructionStackEntry {
     Element(DomRoot<Element>),
     AlreadyConstructedMarker,
 }
 
-/// https://html.spec.whatwg.org/multipage/#custom-element-definition
+/// <https://html.spec.whatwg.org/multipage/#custom-element-definition>
 #[derive(Clone, HeapSizeOf, JSTraceable)]
 pub struct CustomElementDefinition {
     pub name: LocalName,
 
     pub local_name: LocalName,
 
     #[ignore_heap_size_of = "Rc"]
     pub constructor: Rc<Function>,
@@ -419,17 +419,17 @@ impl CustomElementDefinition {
             local_name: local_name,
             constructor: constructor,
             observed_attributes: observed_attributes,
             callbacks: callbacks,
             construction_stack: Default::default(),
         }
     }
 
-    /// https://html.spec.whatwg.org/multipage/#autonomous-custom-element
+    /// <https://html.spec.whatwg.org/multipage/#autonomous-custom-element>
     pub fn is_autonomous(&self) -> bool {
         self.name == self.local_name
     }
 
     /// https://dom.spec.whatwg.org/#concept-create-element Step 6.1
     #[allow(unsafe_code)]
     pub fn create_element(&self, document: &Document, prefix: Option<Prefix>) -> Fallible<DomRoot<Element>> {
         let window = document.window();
@@ -475,17 +475,17 @@ impl CustomElementDefinition {
 
         // Step 11
         // Element's `is` is None by default
 
         Ok(element)
     }
 }
 
-/// https://html.spec.whatwg.org/multipage/#concept-upgrade-an-element
+/// <https://html.spec.whatwg.org/multipage/#concept-upgrade-an-element>
 #[allow(unsafe_code)]
 pub fn upgrade_element(definition: Rc<CustomElementDefinition>, element: &Element) {
     // Steps 1-2
     let state = element.get_custom_element_state();
     if state == CustomElementState::Custom || state == CustomElementState::Failed {
         return;
     }
 
@@ -531,17 +531,17 @@ pub fn upgrade_element(definition: Rc<Cu
 
     // Step 8
     element.set_custom_element_state(CustomElementState::Custom);
 
     // Step 9
     element.set_custom_element_definition(definition);
 }
 
-/// https://html.spec.whatwg.org/multipage/#concept-upgrade-an-element
+/// <https://html.spec.whatwg.org/multipage/#concept-upgrade-an-element>
 /// Steps 7.1-7.2
 #[allow(unsafe_code)]
 fn run_upgrade_constructor(constructor: &Rc<Function>, element: &Element) -> ErrorResult {
     let window = window_from_node(element);
     let cx = window.get_cx();
     rooted!(in(cx) let constructor_val = ObjectValue(constructor.callback()));
     rooted!(in(cx) let mut element_val = UndefinedValue());
     unsafe { element.to_jsval(cx, element_val.handle_mut()); }
@@ -562,17 +562,17 @@ fn run_upgrade_constructor(constructor: 
         }
         if !same {
             return Err(Error::InvalidState);
         }
     }
     Ok(())
 }
 
-/// https://html.spec.whatwg.org/multipage/#concept-try-upgrade
+/// <https://html.spec.whatwg.org/multipage/#concept-try-upgrade>
 pub fn try_upgrade_element(element: &Element) {
     // Step 1
     let document = document_from_node(element);
     let namespace = element.namespace();
     let local_name = element.local_name();
     let is = element.get_is();
     if let Some(definition) = document.lookup_custom_element_definition(namespace, local_name, is.as_ref()) {
         // Step 2
@@ -590,17 +590,17 @@ pub enum CustomElementReaction {
     Callback(
         #[ignore_heap_size_of = "Rc"]
         Rc<Function>,
         Box<[Heap<JSVal>]>
     ),
 }
 
 impl CustomElementReaction {
-    /// https://html.spec.whatwg.org/multipage/#invoke-custom-element-reactions
+    /// <https://html.spec.whatwg.org/multipage/#invoke-custom-element-reactions>
     #[allow(unsafe_code)]
     pub fn invoke(&self, element: &Element) {
         // Step 2.1
         match *self {
             CustomElementReaction::Upgrade(ref definition) => upgrade_element(definition.clone(), element),
             CustomElementReaction::Callback(ref callback, ref arguments) => {
                 let arguments = arguments.iter().map(|arg| arg.handle()).collect();
                 let _ = callback.Call_(&*element, arguments, ExceptionHandling::Report);
@@ -611,24 +611,24 @@ impl CustomElementReaction {
 
 pub enum CallbackReaction {
     Connected,
     Disconnected,
     Adopted(DomRoot<Document>, DomRoot<Document>),
     AttributeChanged(LocalName, Option<DOMString>, Option<DOMString>, Namespace),
 }
 
-/// https://html.spec.whatwg.org/multipage/#processing-the-backup-element-queue
+/// <https://html.spec.whatwg.org/multipage/#processing-the-backup-element-queue>
 #[derive(Clone, Copy, Eq, HeapSizeOf, JSTraceable, PartialEq)]
 enum BackupElementQueueFlag {
     Processing,
     NotProcessing,
 }
 
-/// https://html.spec.whatwg.org/multipage/#custom-element-reactions-stack
+/// <https://html.spec.whatwg.org/multipage/#custom-element-reactions-stack>
 #[derive(HeapSizeOf, JSTraceable)]
 #[must_root]
 pub struct CustomElementReactionStack {
     stack: DomRefCell<Vec<ElementQueue>>,
     backup_queue: ElementQueue,
     processing_backup_element_queue: Cell<BackupElementQueueFlag>,
 }
 
@@ -653,27 +653,27 @@ impl CustomElementReactionStack {
             current_queue.invoke_reactions();
         }
         stack.pop();
 
         mem::swap(&mut *self.stack.borrow_mut(), &mut *stack);
         self.stack.borrow_mut().append(&mut *stack);
     }
 
-    /// https://html.spec.whatwg.org/multipage/#enqueue-an-element-on-the-appropriate-element-queue
+    /// <https://html.spec.whatwg.org/multipage/#enqueue-an-element-on-the-appropriate-element-queue>
     /// Step 4
     pub fn invoke_backup_element_queue(&self) {
         // Step 4.1
         self.backup_queue.invoke_reactions();
 
         // Step 4.2
         self.processing_backup_element_queue.set(BackupElementQueueFlag::NotProcessing);
     }
 
-    /// https://html.spec.whatwg.org/multipage/#enqueue-an-element-on-the-appropriate-element-queue
+    /// <https://html.spec.whatwg.org/multipage/#enqueue-an-element-on-the-appropriate-element-queue>
     pub fn enqueue_element(&self, element: &Element) {
         if let Some(current_queue) = self.stack.borrow().last() {
             // Step 2
             current_queue.append_element(element);
         } else {
             // Step 1.1
             self.backup_queue.append_element(element);
 
@@ -685,17 +685,17 @@ impl CustomElementReactionStack {
             // Step 1.3
             self.processing_backup_element_queue.set(BackupElementQueueFlag::Processing);
 
             // Step 4
             ScriptThread::enqueue_microtask(Microtask::CustomElementReaction);
         }
     }
 
-    /// https://html.spec.whatwg.org/multipage/#enqueue-a-custom-element-callback-reaction
+    /// <https://html.spec.whatwg.org/multipage/#enqueue-a-custom-element-callback-reaction>
     #[allow(unsafe_code)]
     pub fn enqueue_callback_reaction(&self,
                                      element: &Element,
                                      reaction: CallbackReaction,
                                      definition: Option<Rc<CustomElementDefinition>>) {
         // Step 1
         let definition = match definition.or_else(|| element.get_custom_element_definition()) {
             Some(definition) => definition,
@@ -758,40 +758,40 @@ impl CustomElementReactionStack {
 
         // Step 5
         element.push_callback_reaction(callback, args.into_boxed_slice());
 
         // Step 6
         self.enqueue_element(element);
     }
 
-    /// https://html.spec.whatwg.org/multipage/#enqueue-a-custom-element-upgrade-reaction
+    /// <https://html.spec.whatwg.org/multipage/#enqueue-a-custom-element-upgrade-reaction>
     pub fn enqueue_upgrade_reaction(&self, element: &Element, definition: Rc<CustomElementDefinition>) {
         // Step 1
         element.push_upgrade_reaction(definition);
         // Step 2
         self.enqueue_element(element);
     }
 }
 
-/// https://html.spec.whatwg.org/multipage/#element-queue
+/// <https://html.spec.whatwg.org/multipage/#element-queue>
 #[derive(HeapSizeOf, JSTraceable)]
 #[must_root]
 struct ElementQueue {
     queue: DomRefCell<VecDeque<Dom<Element>>>,
 }
 
 impl ElementQueue {
     fn new() -> ElementQueue {
         ElementQueue {
             queue: Default::default(),
         }
     }
 
-    /// https://html.spec.whatwg.org/multipage/#invoke-custom-element-reactions
+    /// <https://html.spec.whatwg.org/multipage/#invoke-custom-element-reactions>
     fn invoke_reactions(&self) {
         // Steps 1-2
         while let Some(element) = self.next_element() {
             element.invoke_reactions()
         }
         self.queue.borrow_mut().clear();
     }
 
@@ -799,17 +799,17 @@ impl ElementQueue {
         self.queue.borrow_mut().pop_front().as_ref().map(Dom::deref).map(DomRoot::from_ref)
     }
 
     fn append_element(&self, element: &Element) {
         self.queue.borrow_mut().push_back(Dom::from_ref(element));
     }
 }
 
-/// https://html.spec.whatwg.org/multipage/#valid-custom-element-name
+/// <https://html.spec.whatwg.org/multipage/#valid-custom-element-name>
 pub fn is_valid_custom_element_name(name: &str) -> bool {
     // Custom elment names must match:
     // PotentialCustomElementName ::= [a-z] (PCENChar)* '-' (PCENChar)*
 
     let mut chars = name.chars();
     if !chars.next().map_or(false, |c| c >= 'a' && c <= 'z') {
         return false;
     }
@@ -842,17 +842,17 @@ pub fn is_valid_custom_element_name(name
     {
         return false;
     }
 
     true
 }
 
 /// Check if this character is a PCENChar
-/// https://html.spec.whatwg.org/multipage/#prod-pcenchar
+/// <https://html.spec.whatwg.org/multipage/#prod-pcenchar>
 fn is_potential_custom_element_char(c: char) -> bool {
     c == '-' || c == '.' || c == '_' || c == '\u{B7}' ||
     (c >= '0' && c <= '9') ||
     (c >= 'a' && c <= 'z') ||
     (c >= '\u{C0}' && c <= '\u{D6}') ||
     (c >= '\u{D8}' && c <= '\u{F6}') ||
     (c >= '\u{F8}' && c <= '\u{37D}') ||
     (c >= '\u{37F}' && c <= '\u{1FFF}') ||
--- a/servo/components/script/dom/document.rs
+++ b/servo/components/script/dom/document.rs
@@ -214,17 +214,17 @@ impl ::style::stylesheets::StylesheetInD
         self.sheet.media(guard)
     }
 
     fn enabled(&self) -> bool {
         self.sheet.enabled()
     }
 }
 
-/// https://dom.spec.whatwg.org/#document
+/// <https://dom.spec.whatwg.org/#document>
 #[dom_struct]
 pub struct Document {
     node: Node,
     window: Dom<Window>,
     implementation: MutNullableDom<DOMImplementation>,
     content_type: DOMString,
     last_modified: Option<String>,
     encoding: Cell<EncodingRef>,
@@ -256,83 +256,83 @@ pub struct Document {
     /// Whether the DOMContentLoaded event has already been dispatched.
     domcontentloaded_dispatched: Cell<bool>,
     /// The element that has most recently requested focus for itself.
     possibly_focused: MutNullableDom<Element>,
     /// The element that currently has the document focus context.
     focused: MutNullableDom<Element>,
     /// The script element that is currently executing.
     current_script: MutNullableDom<HTMLScriptElement>,
-    /// https://html.spec.whatwg.org/multipage/#pending-parsing-blocking-script
+    /// <https://html.spec.whatwg.org/multipage/#pending-parsing-blocking-script>
     pending_parsing_blocking_script: DomRefCell<Option<PendingScript>>,
     /// Number of stylesheets that block executing the next parser-inserted script
     script_blocking_stylesheets_count: Cell<u32>,
     /// https://html.spec.whatwg.org/multipage/#list-of-scripts-that-will-execute-when-the-document-has-finished-parsing
     deferred_scripts: PendingInOrderScriptVec,
-    /// https://html.spec.whatwg.org/multipage/#list-of-scripts-that-will-execute-in-order-as-soon-as-possible
+    /// <https://html.spec.whatwg.org/multipage/#list-of-scripts-that-will-execute-in-order-as-soon-as-possible>
     asap_in_order_scripts_list: PendingInOrderScriptVec,
-    /// https://html.spec.whatwg.org/multipage/#set-of-scripts-that-will-execute-as-soon-as-possible
+    /// <https://html.spec.whatwg.org/multipage/#set-of-scripts-that-will-execute-as-soon-as-possible>
     asap_scripts_set: DomRefCell<Vec<Dom<HTMLScriptElement>>>,
-    /// https://html.spec.whatwg.org/multipage/#concept-n-noscript
+    /// <https://html.spec.whatwg.org/multipage/#concept-n-noscript>
     /// True if scripting is enabled for all scripts in this document
     scripting_enabled: bool,
-    /// https://html.spec.whatwg.org/multipage/#animation-frame-callback-identifier
+    /// <https://html.spec.whatwg.org/multipage/#animation-frame-callback-identifier>
     /// Current identifier of animation frame callback
     animation_frame_ident: Cell<u32>,
-    /// https://html.spec.whatwg.org/multipage/#list-of-animation-frame-callbacks
+    /// <https://html.spec.whatwg.org/multipage/#list-of-animation-frame-callbacks>
     /// List of animation frame callbacks
     animation_frame_list: DomRefCell<Vec<(u32, Option<AnimationFrameCallback>)>>,
     /// Whether we're in the process of running animation callbacks.
     ///
     /// Tracking this is not necessary for correctness. Instead, it is an optimization to avoid
     /// sending needless `ChangeRunningAnimationsState` messages to the compositor.
     running_animation_callbacks: Cell<bool>,
     /// Tracks all outstanding loads related to this document.
     loader: DomRefCell<DocumentLoader>,
     /// The current active HTML parser, to allow resuming after interruptions.
     current_parser: MutNullableDom<ServoParser>,
     /// When we should kick off a reflow. This happens during parsing.
     reflow_timeout: Cell<Option<u64>>,
     /// The cached first `base` element with an `href` attribute.
     base_element: MutNullableDom<HTMLBaseElement>,
     /// This field is set to the document itself for inert documents.
-    /// https://html.spec.whatwg.org/multipage/#appropriate-template-contents-owner-document
+    /// <https://html.spec.whatwg.org/multipage/#appropriate-template-contents-owner-document>
     appropriate_template_contents_owner_document: MutNullableDom<Document>,
     /// Information on elements needing restyle to ship over to the layout thread when the
     /// time comes.
     pending_restyles: DomRefCell<HashMap<Dom<Element>, PendingRestyle>>,
     /// This flag will be true if layout suppressed a reflow attempt that was
     /// needed in order for the page to be painted.
     needs_paint: Cell<bool>,
-    /// http://w3c.github.io/touch-events/#dfn-active-touch-point
+    /// <http://w3c.github.io/touch-events/#dfn-active-touch-point>
     active_touch_points: DomRefCell<Vec<Dom<Touch>>>,
     /// Navigation Timing properties:
-    /// https://w3c.github.io/navigation-timing/#sec-PerformanceNavigationTiming
+    /// <https://w3c.github.io/navigation-timing/#sec-PerformanceNavigationTiming>
     dom_loading: Cell<u64>,
     dom_interactive: Cell<u64>,
     dom_content_loaded_event_start: Cell<u64>,
     dom_content_loaded_event_end: Cell<u64>,
     dom_complete: Cell<u64>,
     load_event_start: Cell<u64>,
     load_event_end: Cell<u64>,
-    /// https://html.spec.whatwg.org/multipage/#concept-document-https-state
+    /// <https://html.spec.whatwg.org/multipage/#concept-document-https-state>
     https_state: Cell<HttpsState>,
     touchpad_pressure_phase: Cell<TouchpadPressurePhase>,
     /// The document's origin.
     origin: MutableOrigin,
     ///  https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-states
     referrer_policy: Cell<Option<ReferrerPolicy>>,
-    /// https://html.spec.whatwg.org/multipage/#dom-document-referrer
+    /// <https://html.spec.whatwg.org/multipage/#dom-document-referrer>
     referrer: Option<String>,
-    /// https://html.spec.whatwg.org/multipage/#target-element
+    /// <https://html.spec.whatwg.org/multipage/#target-element>
     target_element: MutNullableDom<Element>,
-    /// https://w3c.github.io/uievents/#event-type-dblclick
+    /// <https://w3c.github.io/uievents/#event-type-dblclick>
     #[ignore_heap_size_of = "Defined in std"]
     last_click_info: DomRefCell<Option<(Instant, Point2D<f32>)>>,
-    /// https://html.spec.whatwg.org/multipage/#ignore-destructive-writes-counter
+    /// <https://html.spec.whatwg.org/multipage/#ignore-destructive-writes-counter>
     ignore_destructive_writes_counter: Cell<u32>,
     /// The number of spurious `requestAnimationFrame()` requests we've received.
     ///
     /// A rAF request is considered spurious if nothing was actually reflowed.
     spurious_animation_frames: Cell<u8>,
 
     /// Track the total number of elements in this DOM's tree.
     /// This is sent to the layout thread every time a reflow is done;
@@ -416,17 +416,17 @@ impl Document {
     #[inline]
     pub fn loader_mut(&self) -> RefMut<DocumentLoader> {
         self.loader.borrow_mut()
     }
 
     #[inline]
     pub fn has_browsing_context(&self) -> bool { self.has_browsing_context }
 
-    /// https://html.spec.whatwg.org/multipage/#concept-document-bc
+    /// <https://html.spec.whatwg.org/multipage/#concept-document-bc>
     #[inline]
     pub fn browsing_context(&self) -> Option<DomRoot<WindowProxy>> {
         if self.has_browsing_context {
             self.window.undiscarded_window_proxy()
         } else {
             None
         }
     }
@@ -519,17 +519,17 @@ impl Document {
     }
 
     /// Returns the first `base` element in the DOM that has an `href` attribute.
     pub fn base_element(&self) -> Option<DomRoot<HTMLBaseElement>> {
         self.base_element.get()
     }
 
     /// Refresh the cached first base element in the DOM.
-    /// https://github.com/w3c/web-platform-tests/issues/2122
+    /// <https://github.com/w3c/web-platform-tests/issues/2122>
     pub fn refresh_base_element(&self) {
         let base = self.upcast::<Node>()
                        .traverse_preorder()
                        .filter_map(DomRoot::downcast::<HTMLBaseElement>)
                        .find(|element| element.upcast::<Element>().has_attribute(&local_name!("href")));
         self.base_element.set(base.r());
     }
 
@@ -662,32 +662,32 @@ impl Document {
             entry.get_mut().remove(&Dom::from_ref(listener.to_element()));
             if entry.get().is_empty() {
                 entry.remove();
             }
         }
     }
 
     /// Attempt to find a named element in this page's document.
-    /// https://html.spec.whatwg.org/multipage/#the-indicated-part-of-the-document
+    /// <https://html.spec.whatwg.org/multipage/#the-indicated-part-of-the-document>
     pub fn find_fragment_node(&self, fragid: &str) -> Option<DomRoot<Element>> {
         // Step 1 is not handled here; the fragid is already obtained by the calling function
         // Step 2: Simply use None to indicate the top of the document.
         // Step 3 & 4
         percent_decode(fragid.as_bytes()).decode_utf8().ok()
         // Step 5
             .and_then(|decoded_fragid| self.get_element_by_id(&Atom::from(decoded_fragid)))
         // Step 6
             .or_else(|| self.get_anchor_by_name(fragid))
         // Step 7 & 8
     }
 
     /// Scroll to the target element, and when we do not find a target
     /// and the fragment is empty or "top", scroll to the top.
-    /// https://html.spec.whatwg.org/multipage/#scroll-to-the-fragment-identifier
+    /// <https://html.spec.whatwg.org/multipage/#scroll-to-the-fragment-identifier>
     pub fn check_and_scroll_fragment(&self, fragment: &str) {
         let target = self.find_fragment_node(fragment);
 
         // Step 1
         self.set_target_element(target.r());
 
         let point = target.r().map(|element| {
             // FIXME(#8275, pcwalton): This is pretty bogus when multiple layers are involved.
@@ -1517,17 +1517,17 @@ impl Document {
         if PREFS.is_mozbrowser_enabled() {
             if let Some((parent_pipeline_id, _)) = self.window.parent_info() {
                 let event = ScriptMsg::MozBrowserEvent(parent_pipeline_id, event);
                 self.send_to_constellation(event);
             }
         }
     }
 
-    /// https://html.spec.whatwg.org/multipage/#dom-window-requestanimationframe
+    /// <https://html.spec.whatwg.org/multipage/#dom-window-requestanimationframe>
     pub fn request_animation_frame(&self, callback: AnimationFrameCallback) -> u32 {
         let ident = self.animation_frame_ident.get() + 1;
 
         self.animation_frame_ident.set(ident);
         self.animation_frame_list.borrow_mut().push((ident, Some(callback)));
 
         // TODO: Should tick animation only when document is visible
 
@@ -1549,25 +1549,25 @@ impl Document {
 
             let event = ScriptMsg::ChangeRunningAnimationsState(AnimationState::AnimationCallbacksPresent);
             self.send_to_constellation(event);
         }
 
         ident
     }
 
-    /// https://html.spec.whatwg.org/multipage/#dom-window-cancelanimationframe
+    /// <https://html.spec.whatwg.org/multipage/#dom-window-cancelanimationframe>
     pub fn cancel_animation_frame(&self, ident: u32) {
         let mut list = self.animation_frame_list.borrow_mut();
         if let Some(pair) = list.iter_mut().find(|pair| pair.0 == ident) {
             pair.1 = None;
         }
     }
 
-    /// https://html.spec.whatwg.org/multipage/#run-the-animation-frame-callbacks
+    /// <https://html.spec.whatwg.org/multipage/#run-the-animation-frame-callbacks>
     pub fn run_the_animation_frame_callbacks(&self) {
         rooted_vec!(let mut animation_frame_list);
         mem::swap(
             &mut *animation_frame_list,
             &mut *self.animation_frame_list.borrow_mut());
 
         self.running_animation_callbacks.set(true);
         let was_faking_animation_frames = self.is_faking_animation_frames();
@@ -1995,30 +1995,30 @@ impl Document {
                                     0i32,
                                     related_target);
         let event = event.upcast::<Event>();
         event.set_trusted(true);
         let target = node.upcast();
         event.fire(target);
     }
 
-    /// https://html.spec.whatwg.org/multipage/#cookie-averse-document-object
+    /// <https://html.spec.whatwg.org/multipage/#cookie-averse-document-object>
     pub fn is_cookie_averse(&self) -> bool {
         !self.has_browsing_context || !url_has_network_scheme(&self.url())
     }
 
     pub fn nodes_from_point(&self, client_point: &Point2D<f32>) -> Vec<UntrustedNodeAddress> {
         if !self.window.reflow(ReflowGoal::NodesFromPoint(*client_point), ReflowReason::Query) {
             return vec!();
         };
 
         self.window.layout().nodes_from_point_response()
     }
 
-    /// https://html.spec.whatwg.org/multipage/#look-up-a-custom-element-definition
+    /// <https://html.spec.whatwg.org/multipage/#look-up-a-custom-element-definition>
     pub fn lookup_custom_element_definition(&self,
                                             namespace: &Namespace,
                                             local_name: &LocalName,
                                             is: Option<&LocalName>)
                                             -> Option<Rc<CustomElementDefinition>> {
         if !PREFS.get("dom.customelements.enabled").as_boolean().unwrap_or(false) {
             return None;
         }
@@ -2146,17 +2146,17 @@ fn get_registrable_domain_suffix_of_or_i
             return None;
         }
     }
 
     // Step 5
     Some(host)
 }
 
-/// https://url.spec.whatwg.org/#network-scheme
+/// <https://url.spec.whatwg.org/#network-scheme>
 fn url_has_network_scheme(url: &ServoUrl) -> bool {
     match url.scheme() {
         "ftp" | "http" | "https" => true,
         _ => false,
     }
 }
 
 #[derive(Clone, Copy, Eq, HeapSizeOf, JSTraceable, PartialEq)]
@@ -2220,17 +2220,17 @@ impl Document {
             scripts: Default::default(),
             anchors: Default::default(),
             applets: Default::default(),
             style_shared_lock: {
                 lazy_static! {
                     /// Per-process shared lock for author-origin stylesheets
                     ///
                     /// FIXME: make it per-document or per-pipeline instead:
-                    /// https://github.com/servo/servo/issues/16027
+                    /// <https://github.com/servo/servo/issues/16027>
                     /// (Need to figure out what to do with the style attribute
                     /// of elements adopted into another document.)
                     static ref PER_PROCESS_AUTHOR_SHARED_LOCK: StyleSharedRwLock = {
                         StyleSharedRwLock::new()
                     };
                 }
                 PER_PROCESS_AUTHOR_SHARED_LOCK.clone()
                 //StyleSharedRwLock::new()
@@ -2461,17 +2461,17 @@ impl Document {
     pub fn stylesheet_at(&self, index: usize) -> Option<DomRoot<CSSStyleSheet>> {
         let stylesheets = self.stylesheets.borrow();
 
         stylesheets.get(Origin::Author, index).and_then(|s| {
             s.owner.upcast::<Node>().get_cssom_stylesheet()
         })
     }
 
-    /// https://html.spec.whatwg.org/multipage/#appropriate-template-contents-owner-document
+    /// <https://html.spec.whatwg.org/multipage/#appropriate-template-contents-owner-document>
     pub fn appropriate_template_contents_owner_document(&self) -> DomRoot<Document> {
         self.appropriate_template_contents_owner_document.or_init(|| {
             let doctype = if self.is_html_document {
                 IsHTMLDocument::HTMLDocument
             } else {
                 IsHTMLDocument::NonHTMLDocument
             };
             let new_doc = Document::new(self.window(),
@@ -3972,17 +3972,17 @@ impl DocumentMethods for Document {
 fn update_with_current_time_ms(marker: &Cell<u64>) {
     if marker.get() == Default::default() {
         let time = time::get_time();
         let current_time_ms = time.sec * 1000 + time.nsec as i64 / 1000000;
         marker.set(current_time_ms as u64);
     }
 }
 
-/// https://w3c.github.io/webappsec-referrer-policy/#determine-policy-for-token
+/// <https://w3c.github.io/webappsec-referrer-policy/#determine-policy-for-token>
 pub fn determine_policy_for_token(token: &str) -> Option<ReferrerPolicy> {
     match_ignore_ascii_case! { token,
         "never" | "no-referrer" => Some(ReferrerPolicy::NoReferrer),
         "default" | "no-referrer-when-downgrade" => Some(ReferrerPolicy::NoReferrerWhenDowngrade),
         "origin" => Some(ReferrerPolicy::Origin),
         "same-origin" => Some(ReferrerPolicy::SameOrigin),
         "strict-origin" => Some(ReferrerPolicy::StrictOrigin),
         "strict-origin-when-cross-origin" => Some(ReferrerPolicy::StrictOriginWhenCrossOrigin),
--- a/servo/components/script/dom/element.rs
+++ b/servo/components/script/dom/element.rs
@@ -146,22 +146,22 @@ pub struct Element {
     class_list: MutNullableDom<DOMTokenList>,
     state: Cell<ElementState>,
     /// These flags are set by the style system to indicate the that certain
     /// operations may require restyling this element or its descendants. The
     /// flags are not atomic, so the style system takes care of only set them
     /// when it has exclusive access to the element.
     #[ignore_heap_size_of = "bitflags defined in rust-selectors"]
     selector_flags: Cell<ElementSelectorFlags>,
-    /// https://html.spec.whatwg.org/multipage/#custom-element-reaction-queue
+    /// <https://html.spec.whatwg.org/multipage/#custom-element-reaction-queue>
     custom_element_reaction_queue: DomRefCell<Vec<CustomElementReaction>>,
-    /// https://dom.spec.whatwg.org/#concept-element-custom-element-definition
+    /// <https://dom.spec.whatwg.org/#concept-element-custom-element-definition>
     #[ignore_heap_size_of = "Rc"]
     custom_element_definition: DomRefCell<Option<Rc<CustomElementDefinition>>>,
-    /// https://dom.spec.whatwg.org/#concept-element-custom-element-state
+    /// <https://dom.spec.whatwg.org/#concept-element-custom-element-state>
     custom_element_state: Cell<CustomElementState>,
 }
 
 impl fmt::Debug for Element {
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
         write!(f, "<{}", self.local_name)?;
         if let Some(ref id) = *self.id_attribute.borrow() {
             write!(f, " id={}", id)?;
@@ -182,17 +182,17 @@ pub enum ElementCreator {
     ScriptCreated,
 }
 
 pub enum CustomElementCreationMode {
     Synchronous,
     Asynchronous,
 }
 
-/// https://dom.spec.whatwg.org/#concept-element-custom-element-state
+/// <https://dom.spec.whatwg.org/#concept-element-custom-element-state>
 #[derive(Clone, Copy, Eq, HeapSizeOf, JSTraceable, PartialEq)]
 pub enum CustomElementState {
     Undefined,
     Failed,
     Uncustomized,
     Custom,
 }
 
@@ -2058,29 +2058,29 @@ impl ElementMethods for Element {
         self.upcast::<Node>().client_rect().size.width
     }
 
     // https://drafts.csswg.org/cssom-view/#dom-element-clientheight
     fn ClientHeight(&self) -> i32 {
         self.upcast::<Node>().client_rect().size.height
     }
 
-    /// https://w3c.github.io/DOM-Parsing/#widl-Element-innerHTML
+    /// <https://w3c.github.io/DOM-Parsing/#widl-Element-innerHTML>
     fn GetInnerHTML(&self) -> Fallible<DOMString> {
         let qname = QualName::new(self.prefix().clone(),
                                   self.namespace().clone(),
                                   self.local_name().clone());
         if document_from_node(self).is_html_document() {
             return self.serialize(ChildrenOnly(Some(qname)));
         } else {
             return self.xmlSerialize(XmlChildrenOnly(Some(qname)));
         }
     }
 
-    /// https://w3c.github.io/DOM-Parsing/#widl-Element-innerHTML
+    /// <https://w3c.github.io/DOM-Parsing/#widl-Element-innerHTML>
     fn SetInnerHTML(&self, value: DOMString) -> ErrorResult {
         // Step 1.
         let frag = self.parse_fragment(value)?;
         // Step 2.
         // https://github.com/w3c/DOM-Parsing/issues/1
         let target = if let Some(template) = self.downcast::<HTMLTemplateElement>() {
             DomRoot::upcast(template.Content())
         } else {
@@ -2774,17 +2774,17 @@ impl Element {
                 }
                 None
             }
         }
     }
 
     /// Please call this method *only* for real click events
     ///
-    /// https://html.spec.whatwg.org/multipage/#run-authentic-click-activation-steps
+    /// <https://html.spec.whatwg.org/multipage/#run-authentic-click-activation-steps>
     ///
     /// Use an element's synthetic click activation (or handle_event) for any script-triggered clicks.
     /// If the spec says otherwise, check with Manishearth first
     pub fn authentic_click_activation(&self, event: &Event) {
         // Not explicitly part of the spec, however this helps enforce the invariants
         // required to save state between pre-activation and post-activation
         // since we cannot nest authentic clicks (unlike synthetic click activation, where
         // the script can generate more click events from the handler)
@@ -2854,17 +2854,17 @@ impl Element {
         }
         self.state.set(state);
     }
 
     pub fn active_state(&self) -> bool {
         self.state.get().contains(IN_ACTIVE_STATE)
     }
 
-    /// https://html.spec.whatwg.org/multipage/#concept-selector-active
+    /// <https://html.spec.whatwg.org/multipage/#concept-selector-active>
     pub fn set_active_state(&self, value: bool) {
         self.set_state(IN_ACTIVE_STATE, value);
 
         if let Some(parent) = self.upcast::<Node>().GetParentElement() {
             parent.set_active_state(value);
         }
     }
 
@@ -2931,17 +2931,17 @@ impl Element {
     pub fn fullscreen_state(&self) -> bool {
         self.state.get().contains(IN_FULLSCREEN_STATE)
     }
 
     pub fn set_fullscreen_state(&self, value: bool) {
         self.set_state(IN_FULLSCREEN_STATE, value)
     }
 
-    /// https://dom.spec.whatwg.org/#connected
+    /// <https://dom.spec.whatwg.org/#connected>
     pub fn is_connected(&self) -> bool {
         let node = self.upcast::<Node>();
         let root = node.GetRootNode();
         root.is::<Document>()
     }
 }
 
 impl Element {
@@ -2993,21 +2993,21 @@ impl Element {
         self.set_disabled_state(has_disabled_attrib);
         self.set_enabled_state(!has_disabled_attrib);
     }
 }
 
 #[derive(Clone, Copy)]
 pub enum AttributeMutation<'a> {
     /// The attribute is set, keep track of old value.
-    /// https://dom.spec.whatwg.org/#attribute-is-set
+    /// <https://dom.spec.whatwg.org/#attribute-is-set>
     Set(Option<&'a AttrValue>),
 
     /// The attribute is removed.
-    /// https://dom.spec.whatwg.org/#attribute-is-removed
+    /// <https://dom.spec.whatwg.org/#attribute-is-removed>
     Removed,
 }
 
 impl<'a> AttributeMutation<'a> {
     pub fn is_removal(&self) -> bool {
         match *self {
             AttributeMutation::Removed => true,
             AttributeMutation::Set(..) => false,
--- a/servo/components/script/dom/eventsource.rs
+++ b/servo/components/script/dom/eventsource.rs
@@ -40,17 +40,17 @@ use utf8;
 header! { (LastEventId, "Last-Event-ID") => [String] }
 
 const DEFAULT_RECONNECTION_TIME: u64 = 5000;
 
 #[derive(Clone, Copy, Debug, HeapSizeOf, JSTraceable, PartialEq)]
 struct GenerationId(u32);
 
 #[derive(Clone, Copy, Debug, HeapSizeOf, JSTraceable, PartialEq)]
-/// https://html.spec.whatwg.org/multipage/#dom-eventsource-readystate
+/// <https://html.spec.whatwg.org/multipage/#dom-eventsource-readystate>
 enum ReadyState {
     Connecting = 0,
     Open = 1,
     Closed = 2
 }
 
 #[dom_struct]
 pub struct EventSource {
@@ -85,17 +85,17 @@ struct EventSourceContext {
     origin: String,
 
     event_type: String,
     data: String,
     last_event_id: String,
 }
 
 impl EventSourceContext {
-    /// https://html.spec.whatwg.org/multipage/#announce-the-connection
+    /// <https://html.spec.whatwg.org/multipage/#announce-the-connection>
     fn announce_the_connection(&self) {
         let event_source = self.event_source.root();
         if self.gen_id != event_source.generation_id.get() {
             return;
         }
         let global = event_source.global();
         let event_source = self.event_source.clone();
         // FIXME(nox): Why are errors silenced here?
@@ -106,17 +106,17 @@ impl EventSourceContext {
                     event_source.ready_state.set(ReadyState::Open);
                     event_source.upcast::<EventTarget>().fire_event(atom!("open"));
                 }
             }),
             &global,
         );
     }
 
-    /// https://html.spec.whatwg.org/multipage/#fail-the-connection
+    /// <https://html.spec.whatwg.org/multipage/#fail-the-connection>
     fn fail_the_connection(&self) {
         let event_source = self.event_source.root();
         if self.gen_id != event_source.generation_id.get() {
             return;
         }
         let global = event_source.global();
         let event_source = self.event_source.clone();
         // FIXME(nox): Why are errors silenced here?
--- a/servo/components/script/dom/eventtarget.rs
+++ b/servo/components/script/dom/eventtarget.rs
@@ -66,17 +66,17 @@ impl CommonEventHandler {
 }
 
 #[derive(Clone, Copy, HeapSizeOf, JSTraceable, PartialEq)]
 pub enum ListenerPhase {
     Capturing,
     Bubbling,
 }
 
-/// https://html.spec.whatwg.org/multipage/#internal-raw-uncompiled-handler
+/// <https://html.spec.whatwg.org/multipage/#internal-raw-uncompiled-handler>
 #[derive(Clone, JSTraceable, PartialEq)]
 struct InternalRawUncompiledHandler {
     source: DOMString,
     url: ServoUrl,
     line: usize,
 }
 
 /// A representation of an event handler, either compiled or uncompiled raw source, or null.
@@ -85,17 +85,17 @@ enum InlineEventListener {
     Uncompiled(InternalRawUncompiledHandler),
     Compiled(CommonEventHandler),
     Null,
 }
 
 impl InlineEventListener {
     /// Get a compiled representation of this event handler, compiling it from its
     /// raw source if necessary.
-    /// https://html.spec.whatwg.org/multipage/#getting-the-current-value-of-the-event-handler
+    /// <https://html.spec.whatwg.org/multipage/#getting-the-current-value-of-the-event-handler>
     fn get_compiled_handler(&mut self, owner: &EventTarget, ty: &Atom)
                             -> Option<CommonEventHandler> {
         match mem::replace(self, InlineEventListener::Null) {
             InlineEventListener::Null => None,
             InlineEventListener::Uncompiled(handler) => {
                 let result = owner.get_compiled_event_handler(handler, ty);
                 if let Some(ref compiled) = result {
                     *self = InlineEventListener::Compiled(compiled.clone());
@@ -309,17 +309,17 @@ impl EventTarget {
     pub fn dispatch_event(&self, event: &Event) -> EventStatus {
         event.dispatch(self, None)
     }
 
     pub fn remove_all_listeners(&self) {
         *self.handlers.borrow_mut() = Default::default();
     }
 
-    /// https://html.spec.whatwg.org/multipage/#event-handler-attributes:event-handlers-11
+    /// <https://html.spec.whatwg.org/multipage/#event-handler-attributes:event-handlers-11>
     fn set_inline_event_listener(&self,
                                  ty: Atom,
                                  listener: Option<InlineEventListener>) {
         let mut handlers = self.handlers.borrow_mut();
         let entries = match handlers.entry(ty) {
             Occupied(entry) => entry.into_mut(),
             Vacant(entry) => entry.insert(EventListeners(vec!())),
         };
@@ -348,17 +348,17 @@ impl EventTarget {
     }
 
     fn get_inline_event_listener(&self, ty: &Atom) -> Option<CommonEventHandler> {
         let mut handlers = self.handlers.borrow_mut();
         handlers.get_mut(ty).and_then(|entry| entry.get_inline_listener(self, ty))
     }
 
     /// Store the raw uncompiled event handler for on-demand compilation later.
-    /// https://html.spec.whatwg.org/multipage/#event-handler-attributes:event-handler-content-attributes-3
+    /// <https://html.spec.whatwg.org/multipage/#event-handler-attributes:event-handler-content-attributes-3>
     pub fn set_event_handler_uncompiled(&self,
                                         url: ServoUrl,
                                         line: usize,
                                         ty: &str,
                                         source: DOMString) {
         let handler = InternalRawUncompiledHandler {
             source: source,
             line: line,
--- a/servo/components/script/dom/globalscope.rs
+++ b/servo/components/script/dom/globalscope.rs
@@ -85,34 +85,34 @@ pub struct GlobalScope {
 
     /// A handle for communicating messages to the constellation thread.
     #[ignore_heap_size_of = "channels are hard"]
     script_to_constellation_chan: ScriptToConstellationChan,
 
     #[ignore_heap_size_of = "channels are hard"]
     scheduler_chan: IpcSender<TimerSchedulerMsg>,
 
-    /// https://html.spec.whatwg.org/multipage/#in-error-reporting-mode
+    /// <https://html.spec.whatwg.org/multipage/#in-error-reporting-mode>
     in_error_reporting_mode: Cell<bool>,
 
     /// Associated resource threads for use by DOM objects like XMLHttpRequest,
     /// including resource_thread, filemanager_thread and storage_thread
     resource_threads: ResourceThreads,
 
     timers: OneshotTimers,
 
     /// The origin of the globalscope
     origin: MutableOrigin,
 
     /// The microtask queue associated with this global.
     ///
     /// It is refcounted because windows in the same script thread share the
     /// same microtask queue.
     ///
-    /// https://html.spec.whatwg.org/multipage/#microtask-queue
+    /// <https://html.spec.whatwg.org/multipage/#microtask-queue>
     #[ignore_heap_size_of = "Rc<T> is hard"]
     microtask_queue: Rc<MicrotaskQueue>,
 }
 
 impl GlobalScope {
     pub fn new_inherited(
         pipeline_id: PipelineId,
         devtools_chan: Option<IpcSender<ScriptToDevtoolsControlMsg>>,
@@ -298,17 +298,17 @@ impl GlobalScope {
         unreachable!();
     }
 
     /// Extract a `Window`, panic if the global object is not a `Window`.
     pub fn as_window(&self) -> &Window {
         self.downcast::<Window>().expect("expected a Window scope")
     }
 
-    /// https://html.spec.whatwg.org/multipage/#report-the-error
+    /// <https://html.spec.whatwg.org/multipage/#report-the-error>
     pub fn report_an_error(&self, error_info: ErrorInfo, value: HandleValue) {
         // Step 1.
         if self.in_error_reporting_mode.get() {
             return;
         }
 
         // Step 2.
         self.in_error_reporting_mode.set(true);
--- a/servo/components/script/dom/htmlanchorelement.rs
+++ b/servo/components/script/dom/htmlanchorelement.rs
@@ -571,22 +571,22 @@ impl Activatable for HTMLAnchorElement {
         follow_hyperlink(element, ismap_suffix, referrer_policy);
     }
 
     //TODO:https://html.spec.whatwg.org/multipage/#the-a-element
     fn implicit_submission(&self, _ctrl_key: bool, _shift_key: bool, _alt_key: bool, _meta_key: bool) {
     }
 }
 
-/// https://html.spec.whatwg.org/multipage/#the-rules-for-choosing-a-browsing-context-given-a-browsing-context-name
+/// <https://html.spec.whatwg.org/multipage/#the-rules-for-choosing-a-browsing-context-given-a-browsing-context-name>
 fn is_current_browsing_context(target: DOMString) -> bool {
     target.is_empty() || target == "_self"
 }
 
-/// https://html.spec.whatwg.org/multipage/#following-hyperlinks-2
+/// <https://html.spec.whatwg.org/multipage/#following-hyperlinks-2>
 pub fn follow_hyperlink(subject: &Element, hyperlink_suffix: Option<String>, referrer_policy: Option<ReferrerPolicy>) {
     // Step 1: replace.
     // Step 2: source browsing context.
     // Step 3: target browsing context.
     let target = subject.get_attribute(&ns!(), &local_name!("target"));
 
     // Step 4: disown target's opener if needed.
     let attribute = subject.get_attribute(&ns!(), &local_name!("href")).unwrap();
--- a/servo/components/script/dom/htmlbaseelement.rs
+++ b/servo/components/script/dom/htmlbaseelement.rs
@@ -33,17 +33,17 @@ impl HTMLBaseElement {
     pub fn new(local_name: LocalName,
                prefix: Option<Prefix>,
                document: &Document) -> DomRoot<HTMLBaseElement> {
         Node::reflect_node(Box::new(HTMLBaseElement::new_inherited(local_name, prefix, document)),
                            document,
                            HTMLBaseElementBinding::Wrap)
     }
 
-    /// https://html.spec.whatwg.org/multipage/#frozen-base-url
+    /// <https://html.spec.whatwg.org/multipage/#frozen-base-url>
     pub fn frozen_base_url(&self) -> ServoUrl {
         let href = self.upcast::<Element>().get_attribute(&ns!(), &local_name!("href"))
             .expect("The frozen base url is only defined for base elements \
                      that have a base url.");
         let document = document_from_node(self);
         let base = document.fallback_base_url();
         let parsed = base.join(&href.value());
         parsed.unwrap_or(base)
--- a/servo/components/script/dom/htmlbodyelement.rs
+++ b/servo/components/script/dom/htmlbodyelement.rs
@@ -43,17 +43,17 @@ impl HTMLBodyElement {
     #[allow(unrooted_must_root)]
     pub fn new(local_name: LocalName, prefix: Option<Prefix>, document: &Document)
                -> DomRoot<HTMLBodyElement> {
         Node::reflect_node(Box::new(HTMLBodyElement::new_inherited(local_name, prefix, document)),
                            document,
                            HTMLBodyElementBinding::Wrap)
     }
 
-    /// https://drafts.csswg.org/cssom-view/#the-html-body-element
+    /// <https://drafts.csswg.org/cssom-view/#the-html-body-element>
     pub fn is_the_html_body_element(&self) -> bool {
         let self_node = self.upcast::<Node>();
         let root_elem = self.upcast::<Element>().root_element();
         let root_node = root_elem.upcast::<Node>();
         root_node.is_parent_of(self_node) &&
             self_node.preceding_siblings().all(|n| !n.is::<HTMLBodyElement>())
     }
 
--- a/servo/components/script/dom/htmlbuttonelement.rs
+++ b/servo/components/script/dom/htmlbuttonelement.rs
@@ -139,17 +139,17 @@ impl HTMLButtonElementMethods for HTMLBu
 
     // https://html.spec.whatwg.org/multipage/#dom-lfe-labels
     fn Labels(&self) -> DomRoot<NodeList> {
         self.upcast::<HTMLElement>().labels()
     }
 }
 
 impl HTMLButtonElement {
-    /// https://html.spec.whatwg.org/multipage/#constructing-the-form-data-set
+    /// <https://html.spec.whatwg.org/multipage/#constructing-the-form-data-set>
     /// Steps range from 3.1 to 3.7 (specific to HTMLButtonElement)
     pub fn form_datum(&self, submitter: Option<FormSubmitter>) -> Option<FormDatum> {
         // Step 3.1: disabled state check is in get_unclean_dataset
 
         // Step 3.1: only run steps if this is the submitter
         if let Some(FormSubmitter::ButtonElement(submitter)) = submitter {
             if submitter != self {
                 return None
--- a/servo/components/script/dom/htmlfontelement.rs
+++ b/servo/components/script/dom/htmlfontelement.rs
@@ -125,17 +125,17 @@ impl HTMLFontElementLayoutHelpers for La
         };
         match size {
             Some(&AttrValue::UInt(_, s)) => Some(s),
             _ => None,
         }
     }
 }
 
-/// https://html.spec.whatwg.org/multipage/#rules-for-parsing-a-legacy-font-size
+/// <https://html.spec.whatwg.org/multipage/#rules-for-parsing-a-legacy-font-size>
 fn parse_size(mut input: &str) -> AttrValue {
     let original_input = input;
     // Steps 1 & 2 are not relevant
 
     // Step 3
     input = input.trim_matches(HTML_SPACE_CHARACTERS);
 
     enum ParseMode {
--- a/servo/components/script/dom/htmlformelement.rs
+++ b/servo/components/script/dom/htmlformelement.rs
@@ -447,31 +447,31 @@ impl HTMLFormElement {
             )).unwrap();
         });
 
         // Step 3.
         window.dom_manipulation_task_source().queue(task, window.upcast()).unwrap();
     }
 
     /// Interactively validate the constraints of form elements
-    /// https://html.spec.whatwg.org/multipage/#interactively-validate-the-constraints
+    /// <https://html.spec.whatwg.org/multipage/#interactively-validate-the-constraints>
     fn interactive_validation(&self) -> Result<(), ()> {
         // Step 1-3
         let _unhandled_invalid_controls = match self.static_validation() {
             Ok(()) => return Ok(()),
             Err(err) => err
         };
         // TODO: Report the problems with the constraints of at least one of
         //       the elements given in unhandled invalid controls to the user
         // Step 4
         Err(())
     }
 
     /// Statitically validate the constraints of form elements
-    /// https://html.spec.whatwg.org/multipage/#statically-validate-the-constraints
+    /// <https://html.spec.whatwg.org/multipage/#statically-validate-the-constraints>
     fn static_validation(&self) -> Result<(), Vec<FormSubmittableElement>> {
         let node = self.upcast::<Node>();
         // FIXME(#3553): This is an incorrect way of getting controls owned by the
         //               form, refactor this when html5ever's form owner PR lands
         // Step 1-3
         let invalid_controls = node.traverse_preorder().filter_map(|field| {
             if let Some(el) = field.downcast::<Element>() {
                 if el.disabled_state() {
@@ -501,17 +501,17 @@ impl HTMLFormElement {
                 .fire_cancelable_event(atom!("invalid"));
             if !event.DefaultPrevented() { return Some(field); }
             None
         }).collect::<Vec<FormSubmittableElement>>();
         // Step 7
         Err(unhandled_invalid_controls)
     }
 
-    /// https://html.spec.whatwg.org/multipage/#constructing-the-form-data-set
+    /// <https://html.spec.whatwg.org/multipage/#constructing-the-form-data-set>
     /// Steps range from 1 to 3
     fn get_unclean_dataset(&self, submitter: Option<FormSubmitter>) -> Vec<FormDatum> {
         let controls = self.controls.borrow();
         let mut data_set = Vec::new();
         for child in controls.iter() {
             // Step 3.1: The field element is disabled.
             if child.disabled_state() {
                 continue;
@@ -559,17 +559,17 @@ impl HTMLFormElement {
                 }
             }
         }
         data_set
         // TODO: Handle `dirnames` (needs directionality support)
         //       https://html.spec.whatwg.org/multipage/#the-directionality
     }
 
-    /// https://html.spec.whatwg.org/multipage/#constructing-the-form-data-set
+    /// <https://html.spec.whatwg.org/multipage/#constructing-the-form-data-set>
     pub fn get_form_dataset(&self, submitter: Option<FormSubmitter>) -> Vec<FormDatum> {
         fn clean_crlf(s: &str) -> DOMString {
             // Step 4
             let mut buf = "".to_owned();
             let mut prev = ' ';
             for ch in s.chars() {
                 match ch {
                     '\n' if prev != '\r' => {
--- a/servo/components/script/dom/htmlheadelement.rs
+++ b/servo/components/script/dom/htmlheadelement.rs
@@ -34,17 +34,17 @@ impl HTMLHeadElement {
     pub fn new(local_name: LocalName,
                prefix: Option<Prefix>,
                document: &Document) -> DomRoot<HTMLHeadElement> {
         Node::reflect_node(Box::new(HTMLHeadElement::new_inherited(local_name, prefix, document)),
                            document,
                            HTMLHeadElementBinding::Wrap)
     }
 
-    /// https://html.spec.whatwg.org/multipage/#meta-referrer
+    /// <https://html.spec.whatwg.org/multipage/#meta-referrer>
     pub fn set_document_referrer(&self) {
         let doc = document_from_node(self);
 
         if doc.GetHead().r() != Some(self) {
             return;
         }
 
         let node = self.upcast::<Node>();
--- a/servo/components/script/dom/htmliframeelement.rs
+++ b/servo/components/script/dom/htmliframeelement.rs
@@ -218,17 +218,17 @@ impl HTMLIFrameElement {
         }
 
         if PREFS.is_mozbrowser_enabled() {
             // https://developer.mozilla.org/en-US/docs/Web/Events/mozbrowserloadstart
             self.dispatch_mozbrowser_event(MozBrowserEvent::LoadStart);
         }
     }
 
-    /// https://html.spec.whatwg.org/multipage/#process-the-iframe-attributes
+    /// <https://html.spec.whatwg.org/multipage/#process-the-iframe-attributes>
     fn process_the_iframe_attributes(&self, mode: ProcessingMode) {
         // TODO: srcdoc
 
         let window = window_from_node(self);
 
         // https://github.com/whatwg/html/issues/490
         if mode == ProcessingMode::FirstTime && !self.upcast::<Element>().has_attribute(&local_name!("src")) {
             let this = Trusted::new(self);
--- a/servo/components/script/dom/htmlimageelement.rs
+++ b/servo/components/script/dom/htmlimageelement.rs
@@ -352,40 +352,40 @@ impl HTMLImageElement {
             self.upcast::<EventTarget>().fire_event(atom!("loadend"));
         }
 
         // Trigger reflow
         let window = window_from_node(self);
         window.add_pending_reflow();
     }
 
-    /// https://html.spec.whatwg.org/multipage/#abort-the-image-request
+    /// <https://html.spec.whatwg.org/multipage/#abort-the-image-request>
     fn abort_request(&self, state: State, request: ImageRequestPhase) {
         let mut request = match request {
             ImageRequestPhase::Current => self.current_request.borrow_mut(),
             ImageRequestPhase::Pending => self.pending_request.borrow_mut(),
         };
         LoadBlocker::terminate(&mut request.blocker);
         request.state = state;
         request.image = None;
         request.metadata = None;
     }
 
-    /// https://html.spec.whatwg.org/multipage/#update-the-source-set
+    /// <https://html.spec.whatwg.org/multipage/#update-the-source-set>
     fn update_source_set(&self) -> Vec<DOMString> {
         let elem = self.upcast::<Element>();
         // TODO: follow the algorithm
         let src = elem.get_string_attribute(&local_name!("src"));
         if src.is_empty() {
             return vec![]
         }
         vec![src]
     }
 
-    /// https://html.spec.whatwg.org/multipage/#select-an-image-source
+    /// <https://html.spec.whatwg.org/multipage/#select-an-image-source>
     fn select_image_source(&self) -> Option<DOMString> {
         // TODO: select an image source from source set
         self.update_source_set().first().cloned()
     }
 
     fn init_image_request(&self,
                           request: &mut RefMut<ImageRequest>,
                           url: &ServoUrl,
@@ -531,17 +531,17 @@ impl HTMLImageElement {
                         this.abort_request(State::Broken, ImageRequestPhase::Pending);
                     }),
                     window.upcast(),
                 );
             }
         }
     }
 
-    /// https://html.spec.whatwg.org/multipage/#update-the-image-data
+    /// <https://html.spec.whatwg.org/multipage/#update-the-image-data>
     fn update_the_image_data(&self) {
         let document = document_from_node(self);
         let window = document.window();
         let elem = self.upcast::<Element>();
         let src = elem.get_string_attribute(&local_name!("src"));
         let base_url = document.base_url();
 
         // https://html.spec.whatwg.org/multipage/#reacting-to-dom-mutations
--- a/servo/components/script/dom/htmlinputelement.rs
+++ b/servo/components/script/dom/htmlinputelement.rs
@@ -664,17 +664,17 @@ fn in_same_group(other: &HTMLInputElemen
 
 impl HTMLInputElement {
     fn radio_group_updated(&self, group: Option<&Atom>) {
         if self.Checked() {
             broadcast_radio_checked(self, group);
         }
     }
 
-    /// https://html.spec.whatwg.org/multipage/#constructing-the-form-data-set
+    /// <https://html.spec.whatwg.org/multipage/#constructing-the-form-data-set>
     /// Steps range from 3.1 to 3.7 (specific to HTMLInputElement)
     pub fn form_datums(&self, submitter: Option<FormSubmitter>) -> Vec<FormDatum> {
         // 3.1: disabled state check is in get_unclean_dataset
 
         // Step 3.2
         let ty = self.type_();
         // Step 3.4
         let name = self.Name();
--- a/servo/components/script/dom/htmllinkelement.rs
+++ b/servo/components/script/dom/htmllinkelement.rs
@@ -50,17 +50,17 @@ impl RequestGenerationId {
 #[dom_struct]
 pub struct HTMLLinkElement {
     htmlelement: HTMLElement,
     rel_list: MutNullableDom<DOMTokenList>,
     #[ignore_heap_size_of = "Arc"]
     stylesheet: DomRefCell<Option<Arc<Stylesheet>>>,
     cssom_stylesheet: MutNullableDom<CSSStyleSheet>,
 
-    /// https://html.spec.whatwg.org/multipage/#a-style-sheet-that-is-blocking-scripts
+    /// <https://html.spec.whatwg.org/multipage/#a-style-sheet-that-is-blocking-scripts>
     parser_inserted: Cell<bool>,
     /// The number of loads that this link element has triggered (could be more
     /// than one because of imports) and have not yet finished.
     pending_loads: Cell<u32>,
     /// Whether any of the loads have failed.
     any_failed_load: Cell<bool>,
     /// A monotonically increasing counter that keeps track of which stylesheet to apply.
     request_generation_id: Cell<RequestGenerationId>,
@@ -151,17 +151,17 @@ fn string_is_stylesheet(value: &Option<S
                 .any(|s| s.eq_ignore_ascii_case("stylesheet"))
         },
         None => false,
     }
 }
 
 /// Favicon spec usage in accordance with CEF implementation:
 /// only url of icon is required/used
-/// https://html.spec.whatwg.org/multipage/#rel-icon
+/// <https://html.spec.whatwg.org/multipage/#rel-icon>
 fn is_favicon(value: &Option<String>) -> bool {
     match *value {
         Some(ref value) => {
             value.split(HTML_SPACE_CHARACTERS)
                 .any(|s| s.eq_ignore_ascii_case("icon") || s.eq_ignore_ascii_case("apple-touch-icon"))
         },
         None => false,
     }
@@ -245,17 +245,17 @@ impl VirtualMethods for HTMLLinkElement 
         if let Some(s) = self.stylesheet.borrow_mut().take() {
             document_from_node(self).remove_stylesheet(self.upcast(), &s);
         }
     }
 }
 
 
 impl HTMLLinkElement {
-    /// https://html.spec.whatwg.org/multipage/#concept-link-obtain
+    /// <https://html.spec.whatwg.org/multipage/#concept-link-obtain>
     fn handle_stylesheet_url(&self, href: &str) {
         let document = document_from_node(self);
         if document.browsing_context().is_none() {
             return;
         }
 
         // Step 1.
         if href.is_empty() {
--- a/servo/components/script/dom/htmlmediaelement.rs
+++ b/servo/components/script/dom/htmlmediaelement.rs
@@ -49,57 +49,57 @@ use std::sync::{Arc, Mutex};
 use task_source::TaskSource;
 use time::{self, Timespec, Duration};
 
 #[dom_struct]
 // FIXME(nox): A lot of tasks queued for this element should probably be in the
 // media element event task source.
 pub struct HTMLMediaElement {
     htmlelement: HTMLElement,
-    /// https://html.spec.whatwg.org/multipage/#dom-media-networkstate
+    /// <https://html.spec.whatwg.org/multipage/#dom-media-networkstate>
     network_state: Cell<NetworkState>,
-    /// https://html.spec.whatwg.org/multipage/#dom-media-readystate
+    /// <https://html.spec.whatwg.org/multipage/#dom-media-readystate>
     ready_state: Cell<ReadyState>,
-    /// https://html.spec.whatwg.org/multipage/#dom-media-srcobject
+    /// <https://html.spec.whatwg.org/multipage/#dom-media-srcobject>
     src_object: MutNullableDom<Blob>,
-    /// https://html.spec.whatwg.org/multipage/#dom-media-currentsrc
+    /// <https://html.spec.whatwg.org/multipage/#dom-media-currentsrc>
     current_src: DomRefCell<String>,
     /// Incremented whenever tasks associated with this element are cancelled.
     generation_id: Cell<u32>,
-    /// https://html.spec.whatwg.org/multipage/#fire-loadeddata
+    /// <https://html.spec.whatwg.org/multipage/#fire-loadeddata>
     ///
     /// Reset to false every time the load algorithm is invoked.
     fired_loadeddata_event: Cell<bool>,
-    /// https://html.spec.whatwg.org/multipage/#dom-media-error
+    /// <https://html.spec.whatwg.org/multipage/#dom-media-error>
     error: MutNullableDom<MediaError>,
-    /// https://html.spec.whatwg.org/multipage/#dom-media-paused
+    /// <https://html.spec.whatwg.org/multipage/#dom-media-paused>
     paused: Cell<bool>,
-    /// https://html.spec.whatwg.org/multipage/#attr-media-autoplay
+    /// <https://html.spec.whatwg.org/multipage/#attr-media-autoplay>
     autoplaying: Cell<bool>,
-    /// https://html.spec.whatwg.org/multipage/#delaying-the-load-event-flag
+    /// <https://html.spec.whatwg.org/multipage/#delaying-the-load-event-flag>
     delaying_the_load_event_flag: DomRefCell<Option<LoadBlocker>>,
-    /// https://html.spec.whatwg.org/multipage/#list-of-pending-play-promises
+    /// <https://html.spec.whatwg.org/multipage/#list-of-pending-play-promises>
     #[ignore_heap_size_of = "promises are hard"]
     pending_play_promises: DomRefCell<Vec<Rc<Promise>>>,
     /// Play promises which are soon to be fulfilled by a queued task.
     #[ignore_heap_size_of = "promises are hard"]
     in_flight_play_promises_queue: DomRefCell<VecDeque<(Box<[Rc<Promise>]>, ErrorResult)>>,
 }
 
-/// https://html.spec.whatwg.org/multipage/#dom-media-networkstate
+/// <https://html.spec.whatwg.org/multipage/#dom-media-networkstate>
 #[derive(Clone, Copy, HeapSizeOf, JSTraceable, PartialEq)]
 #[repr(u8)]
 pub enum NetworkState {
     Empty = HTMLMediaElementConstants::NETWORK_EMPTY as u8,
     Idle = HTMLMediaElementConstants::NETWORK_IDLE as u8,
     Loading = HTMLMediaElementConstants::NETWORK_LOADING as u8,
     NoSource = HTMLMediaElementConstants::NETWORK_NO_SOURCE as u8,
 }
 
-/// https://html.spec.whatwg.org/multipage/#dom-media-readystate
+/// <https://html.spec.whatwg.org/multipage/#dom-media-readystate>
 #[derive(Clone, Copy, HeapSizeOf, JSTraceable, PartialEq, PartialOrd)]
 #[repr(u8)]
 enum ReadyState {
     HaveNothing = HTMLMediaElementConstants::HAVE_NOTHING as u8,
     HaveMetadata = HTMLMediaElementConstants::HAVE_METADATA as u8,
     HaveCurrentData = HTMLMediaElementConstants::HAVE_CURRENT_DATA as u8,
     HaveFutureData = HTMLMediaElementConstants::HAVE_FUTURE_DATA as u8,
     HaveEnoughData = HTMLMediaElementConstants::HAVE_ENOUGH_DATA as u8,
@@ -140,27 +140,27 @@ impl HTMLMediaElement {
         }
     }
 
     /// Marks that element as delaying the load event or not.
     ///
     /// Nothing happens if the element was already delaying the load event and
     /// we pass true to that method again.
     ///
-    /// https://html.spec.whatwg.org/multipage/#delaying-the-load-event-flag
+    /// <https://html.spec.whatwg.org/multipage/#delaying-the-load-event-flag>
     fn delay_load_event(&self, delay: bool) {
         let mut blocker = self.delaying_the_load_event_flag.borrow_mut();
         if delay && blocker.is_none() {
             *blocker = Some(LoadBlocker::new(&document_from_node(self), LoadType::Media));
         } else if !delay && blocker.is_some() {
             LoadBlocker::terminate(&mut *blocker);
         }
     }
 
-    /// https://html.spec.whatwg.org/multipage/#dom-media-play
+    /// <https://html.spec.whatwg.org/multipage/#dom-media-play>
     // FIXME(nox): Move this back to HTMLMediaElementMethods::Play once
     // Rc<Promise> doesn't require #[allow(unrooted_must_root)] anymore.
     fn play(&self, promise: &Rc<Promise>) {
         // Step 1.
         // FIXME(nox): Reject promise if not allowed to play.
 
         // Step 2.
         if self.error.get().map_or(false, |e| e.Code() == MEDIA_ERR_SRC_NOT_SUPPORTED) {
@@ -231,17 +231,17 @@ impl HTMLMediaElement {
 
         // Step 8.
         self.autoplaying.set(false);
 
         // Step 9.
         // Not applicable here, the promise is returned from Play.
     }
 
-    /// https://html.spec.whatwg.org/multipage/#internal-pause-steps
+    /// <https://html.spec.whatwg.org/multipage/#internal-pause-steps>
     fn internal_pause_steps(&self) {
         // Step 1.
         self.autoplaying.set(false);
 
         // Step 2.
         if !self.Paused() {
             // Step 2.1.
             self.paused.set(true);
@@ -802,17 +802,17 @@ impl HTMLMediaElement {
                 Ok(ref value) => promise.resolve_native(value),
                 Err(ref error) => promise.reject_error(error.clone()),
             }
         }
     }
 
     /// Handles insertion of `source` children.
     ///
-    /// https://html.spec.whatwg.org/multipage/#the-source-element:nodes-are-inserted
+    /// <https://html.spec.whatwg.org/multipage/#the-source-element:nodes-are-inserted>
     pub fn handle_source_child_insertion(&self) {
         if self.upcast::<Element>().has_attribute(&local_name!("src")) {
             return;
         }
         if self.network_state.get() != NetworkState::Empty {
             return;
         }
         self.media_element_load_algorithm();
--- a/servo/components/script/dom/htmlmetaelement.rs
+++ b/servo/components/script/dom/htmlmetaelement.rs
@@ -130,17 +130,17 @@ impl HTMLMetaElement {
             let name = name.trim_matches(HTML_SPACE_CHARACTERS);
 
             if name == "referrer" {
                 self.apply_referrer();
             }
         }
     }
 
-    /// https://html.spec.whatwg.org/multipage/#meta-referrer
+    /// <https://html.spec.whatwg.org/multipage/#meta-referrer>
     fn apply_referrer(&self) {
         if let Some(parent) = self.upcast::<Node>().GetParentElement() {
             if let Some(head) = parent.downcast::<HTMLHeadElement>() {
                 head.set_document_referrer();
             }
         }
     }
 }
--- a/servo/components/script/dom/htmloptionelement.rs
+++ b/servo/components/script/dom/htmloptionelement.rs
@@ -27,20 +27,20 @@ use html5ever::{LocalName, Prefix};
 use std::cell::Cell;
 use style::element_state::*;
 use style::str::{split_html_space_chars, str_join};
 
 #[dom_struct]
 pub struct HTMLOptionElement {
     htmlelement: HTMLElement,
 
-    /// https://html.spec.whatwg.org/multipage/#attr-option-selected
+    /// <https://html.spec.whatwg.org/multipage/#attr-option-selected>
     selectedness: Cell<bool>,
 
-    /// https://html.spec.whatwg.org/multipage/#concept-option-dirtiness
+    /// <https://html.spec.whatwg.org/multipage/#concept-option-dirtiness>
     dirtiness: Cell<bool>,
 }
 
 impl HTMLOptionElement {
     fn new_inherited(local_name: LocalName,
                      prefix: Option<Prefix>,
                      document: &Document) -> HTMLOptionElement {
         HTMLOptionElement {
--- a/servo/components/script/dom/htmlscriptelement.rs
+++ b/servo/components/script/dom/htmlscriptelement.rs
@@ -44,23 +44,23 @@ use std::process::{Command, Stdio};
 use std::sync::{Arc, Mutex};
 use style::str::{HTML_SPACE_CHARACTERS, StaticStringVec};
 use uuid::Uuid;
 
 #[dom_struct]
 pub struct HTMLScriptElement {
     htmlelement: HTMLElement,
 
-    /// https://html.spec.whatwg.org/multipage/#already-started
+    /// <https://html.spec.whatwg.org/multipage/#already-started>
     already_started: Cell<bool>,
 
-    /// https://html.spec.whatwg.org/multipage/#parser-inserted
+    /// <https://html.spec.whatwg.org/multipage/#parser-inserted>
     parser_inserted: Cell<bool>,
 
-    /// https://html.spec.whatwg.org/multipage/#non-blocking
+    /// <https://html.spec.whatwg.org/multipage/#non-blocking>
     ///
     /// (currently unused)
     non_blocking: Cell<bool>,
 
     /// Document of the parser that created this element
     parser_document: Dom<Document>,
 
     /// Track line line_number
@@ -185,17 +185,17 @@ impl FetchResponseListener for ScriptCon
     }
 
     fn process_response_chunk(&mut self, mut chunk: Vec<u8>) {
         if self.status.is_ok() {
             self.data.append(&mut chunk);
         }
     }
 
-    /// https://html.spec.whatwg.org/multipage/#fetch-a-classic-script
+    /// <https://html.spec.whatwg.org/multipage/#fetch-a-classic-script>
     /// step 4-9
     fn process_response_eof(&mut self, response: Result<(), NetworkError>) {
         // Step 5.
         let load = response.and(self.status.clone()).map(|_| {
             let metadata = self.metadata.take().unwrap();
 
             // Step 6.
             let encoding = metadata.charset
@@ -221,17 +221,17 @@ impl FetchResponseListener for ScriptCon
         }
 
         document.finish_load(LoadType::Script(self.url.clone()));
     }
 }
 
 impl PreInvoke for ScriptContext {}
 
-/// https://html.spec.whatwg.org/multipage/#fetch-a-classic-script
+/// <https://html.spec.whatwg.org/multipage/#fetch-a-classic-script>
 fn fetch_a_classic_script(script: &HTMLScriptElement,
                           kind: ExternalScriptKind,
                           url: ServoUrl,
                           cors_setting: Option<CorsSettings>,
                           integrity_metadata: String,
                           character_encoding: EncodingRef) {
     let doc = document_from_node(script);
 
@@ -281,17 +281,17 @@ fn fetch_a_classic_script(script: &HTMLS
 
     ROUTER.add_route(action_receiver.to_opaque(), Box::new(move |message| {
         listener.notify_fetch(message.to().unwrap());
     }));
     doc.fetch_async(LoadType::Script(url), request, action_sender);
 }
 
 impl HTMLScriptElement {
-    /// https://html.spec.whatwg.org/multipage/#prepare-a-script
+    /// <https://html.spec.whatwg.org/multipage/#prepare-a-script>
     pub fn prepare(&self) {
         // Step 1.
         if self.already_started.get() {
             return;
         }
 
         // Step 2.
         let was_parser_inserted = self.parser_inserted.get();
@@ -495,17 +495,17 @@ impl HTMLScriptElement {
         debug!("script will be stored in {:?}", path);
 
         match File::create(&path) {
             Ok(mut file) => file.write_all(script.text.as_bytes()).unwrap(),
             Err(why) => warn!("Could not store script {:?}", why),
         }
     }
 
-    /// https://html.spec.whatwg.org/multipage/#execute-the-script-block
+    /// <https://html.spec.whatwg.org/multipage/#execute-the-script-block>
     pub fn execute(&self, result: Result<ClassicScript, NetworkError>) {
         // Step 1.
         let doc = document_from_node(self);
         if self.parser_inserted.get() && &*doc != &*self.parser_document {
             return;
         }
 
         let mut script = match result {
--- a/servo/components/script/dom/htmlsourceelement.rs
+++ b/servo/components/script/dom/htmlsourceelement.rs
@@ -39,17 +39,17 @@ impl HTMLSourceElement {
     }
 }
 
 impl VirtualMethods for HTMLSourceElement {
     fn super_type(&self) -> Option<&VirtualMethods> {
         Some(self.upcast::<HTMLElement>() as &VirtualMethods)
     }
 
-    /// https://html.spec.whatwg.org/multipage/#the-source-element:nodes-are-inserted
+    /// <https://html.spec.whatwg.org/multipage/#the-source-element:nodes-are-inserted>
     fn bind_to_tree(&self, tree_in_doc: bool) {
         self.super_type().unwrap().bind_to_tree(tree_in_doc);
         let parent = self.upcast::<Node>().GetParentNode().unwrap();
         if let Some(media) = parent.downcast::<HTMLMediaElement>() {
             media.handle_source_child_insertion();
         }
     }
 }
--- a/servo/components/script/dom/htmlstyleelement.rs
+++ b/servo/components/script/dom/htmlstyleelement.rs
@@ -29,17 +29,17 @@ use style_traits::PARSING_MODE_DEFAULT;
 use stylesheet_loader::{StylesheetLoader, StylesheetOwner};
 
 #[dom_struct]
 pub struct HTMLStyleElement {
     htmlelement: HTMLElement,
     #[ignore_heap_size_of = "Arc"]
     stylesheet: DomRefCell<Option<Arc<Stylesheet>>>,
     cssom_stylesheet: MutNullableDom<CSSStyleSheet>,
-    /// https://html.spec.whatwg.org/multipage/#a-style-sheet-that-is-blocking-scripts
+    /// <https://html.spec.whatwg.org/multipage/#a-style-sheet-that-is-blocking-scripts>
     parser_inserted: Cell<bool>,
     in_stack_of_open_elements: Cell<bool>,
     pending_loads: Cell<u32>,
     any_failed_load: Cell<bool>,
     line_number: u64,
 }
 
 impl HTMLStyleElement {
--- a/servo/components/script/dom/htmltemplateelement.rs
+++ b/servo/components/script/dom/htmltemplateelement.rs
@@ -15,17 +15,17 @@ use dom::node::{CloneChildrenFlag, Node,
 use dom::virtualmethods::VirtualMethods;
 use dom_struct::dom_struct;
 use html5ever::{LocalName, Prefix};
 
 #[dom_struct]
 pub struct HTMLTemplateElement {
     htmlelement: HTMLElement,
 
-    /// https://html.spec.whatwg.org/multipage/#template-contents
+    /// <https://html.spec.whatwg.org/multipage/#template-contents>
     contents: MutNullableDom<DocumentFragment>,
 }
 
 impl HTMLTemplateElement {
     fn new_inherited(local_name: LocalName,
                      prefix: Option<Prefix>,
                      document: &Document) -> HTMLTemplateElement {
         HTMLTemplateElement {
@@ -41,40 +41,40 @@ impl HTMLTemplateElement {
                document: &Document) -> DomRoot<HTMLTemplateElement> {
         Node::reflect_node(Box::new(HTMLTemplateElement::new_inherited(local_name, prefix, document)),
                            document,
                            HTMLTemplateElementBinding::Wrap)
     }
 }
 
 impl HTMLTemplateElementMethods for HTMLTemplateElement {
-    /// https://html.spec.whatwg.org/multipage/#dom-template-content
+    /// <https://html.spec.whatwg.org/multipage/#dom-template-content>
     fn Content(&self) -> DomRoot<DocumentFragment> {
         self.contents.or_init(|| {
             let doc = document_from_node(self);
             doc.appropriate_template_contents_owner_document().CreateDocumentFragment()
         })
     }
 }
 
 impl VirtualMethods for HTMLTemplateElement {
     fn super_type(&self) -> Option<&VirtualMethods> {
         Some(self.upcast::<HTMLElement>() as &VirtualMethods)
     }
 
-    /// https://html.spec.whatwg.org/multipage/#template-adopting-steps
+    /// <https://html.spec.whatwg.org/multipage/#template-adopting-steps>
     fn adopting_steps(&self, old_doc: &Document) {
         self.super_type().unwrap().adopting_steps(old_doc);
         // Step 1.
         let doc = document_from_node(self).appropriate_template_contents_owner_document();
         // Step 2.
         Node::adopt(self.Content().upcast(), &doc);
     }
 
-    /// https://html.spec.whatwg.org/multipage/#the-template-element:concept-node-clone-ext
+    /// <https://html.spec.whatwg.org/multipage/#the-template-element:concept-node-clone-ext>
     fn cloning_steps(&self, copy: &Node, maybe_doc: Option<&Document>,
                      clone_children: CloneChildrenFlag) {
         self.super_type().unwrap().cloning_steps(copy, maybe_doc, clone_children);
         if clone_children == CloneChildrenFlag::DoNotCloneChildren {
             // Step 1.
             return;
         }
         let copy = copy.downcast::<HTMLTemplateElement>().unwrap();
--- a/servo/components/script/dom/mediaquerylist.rs
+++ b/servo/components/script/dom/mediaquerylist.rs
@@ -129,17 +129,17 @@ impl WeakMediaQueryListVec {
         WeakMediaQueryListVec { cell: DomRefCell::new(WeakRefVec::new()) }
     }
 
     pub fn push(&self, mql: &MediaQueryList) {
         self.cell.borrow_mut().push(WeakRef::new(mql));
     }
 
     /// Evaluate media query lists and report changes
-    /// https://drafts.csswg.org/cssom-view/#evaluate-media-queries-and-report-changes
+    /// <https://drafts.csswg.org/cssom-view/#evaluate-media-queries-and-report-changes>
     pub fn evaluate_and_report_changes(&self) {
         rooted_vec!(let mut mql_list);
         self.cell.borrow_mut().update(|mql| {
             let mql = mql.root().unwrap();
             if let MediaQueryListMatchState::Changed(_) = mql.evaluate_changes() {
                 // Recording list of changed Media Queries
                 mql_list.push(Dom::from_ref(&*mql));
             }
--- a/servo/components/script/dom/mutationobserver.rs
+++ b/servo/components/script/dom/mutationobserver.rs
@@ -67,29 +67,29 @@ impl MutationObserver {
     }
 
     pub fn Constructor(global: &Window, callback: Rc<MutationCallback>) -> Fallible<DomRoot<MutationObserver>> {
         let observer = MutationObserver::new(global, callback);
         ScriptThread::add_mutation_observer(&*observer);
         Ok(observer)
     }
 
-    /// https://dom.spec.whatwg.org/#queue-a-mutation-observer-compound-microtask
+    /// <https://dom.spec.whatwg.org/#queue-a-mutation-observer-compound-microtask>
     pub fn queue_mutation_observer_compound_microtask() {
         // Step 1
         if ScriptThread::is_mutation_observer_compound_microtask_queued() {
             return;
         }
         // Step 2
         ScriptThread::set_mutation_observer_compound_microtask_queued(true);
         // Step 3
         ScriptThread::enqueue_microtask(Microtask::NotifyMutationObservers);
     }
 
-    /// https://dom.spec.whatwg.org/#notify-mutation-observers
+    /// <https://dom.spec.whatwg.org/#notify-mutation-observers>
     pub fn notify_mutation_observers() {
         // Step 1
         ScriptThread::set_mutation_observer_compound_microtask_queued(false);
         // Step 2
         let notify_list = ScriptThread::get_mutation_observers();
         // TODO: steps 3-4 (slots)
         // Step 5
         for mo in &notify_list {
@@ -98,17 +98,17 @@ impl MutationObserver {
             // TODO: Step 5.3 Remove all transient registered observers whose observer is mo.
             if !queue.is_empty() {
                 let _ = mo.callback.Call_(&**mo, queue, &**mo, ExceptionHandling::Report);
             }
         }
         // TODO: Step 6 (slot signals)
     }
 
-    /// https://dom.spec.whatwg.org/#queueing-a-mutation-record
+    /// <https://dom.spec.whatwg.org/#queueing-a-mutation-record>
     pub fn queue_a_mutation_record(target: &Node, attr_type: Mutation) {
         // Step 1
         let mut interestedObservers: Vec<(DomRoot<MutationObserver>, Option<DOMString>)> = vec![];
         // Step 2 & 3
         for node in target.inclusive_ancestors() {
             for registered in &*node.registered_mutation_observers() {
                 if &*node != target && !registered.options.subtree {
                     continue;
@@ -177,17 +177,17 @@ impl MutationObserver {
 
         // Step 5
         MutationObserver::queue_mutation_observer_compound_microtask();
     }
 
 }
 
 impl MutationObserverMethods for MutationObserver {
-    /// https://dom.spec.whatwg.org/#dom-mutationobserver-observe
+    /// <https://dom.spec.whatwg.org/#dom-mutationobserver-observe>
     fn Observe(&self, target: &Node, options: &MutationObserverInit) -> Fallible<()> {
         let attribute_filter = options.attributeFilter.clone().unwrap_or(vec![]);
         let attribute_old_value = options.attributeOldValue.unwrap_or(false);
         let mut attributes = options.attributes.unwrap_or(false);
         let mut character_data = options.characterData.unwrap_or(false);
         let character_data_old_value = options.characterDataOldValue.unwrap_or(false);
         let child_list = options.childList;
         let subtree = options.subtree;
--- a/servo/components/script/dom/node.rs
+++ b/servo/components/script/dom/node.rs
@@ -193,18 +193,18 @@ impl NodeFlags {
 impl Drop for Node {
     #[allow(unsafe_code)]
     fn drop(&mut self) {
         self.style_and_layout_data.get().map(|d| self.dispose(d));
     }
 }
 
 /// suppress observers flag
-/// https://dom.spec.whatwg.org/#concept-node-insert
-/// https://dom.spec.whatwg.org/#concept-node-remove
+/// <https://dom.spec.whatwg.org/#concept-node-insert>
+/// <https://dom.spec.whatwg.org/#concept-node-remove>
 #[derive(Clone, Copy, HeapSizeOf)]
 enum SuppressObserver {
     Suppressed,
     Unsuppressed
 }
 
 impl Node {
     /// Sends the style and layout data, if any, back to the layout thread to be destroyed.
@@ -759,17 +759,17 @@ impl Node {
                                                    self.owner_doc().quirks_mode());
                 Ok(self.traverse_preorder().filter_map(DomRoot::downcast).find(|element| {
                     matches_selector_list(&selectors, element, &mut ctx)
                 }))
             }
         }
     }
 
-    /// https://dom.spec.whatwg.org/#scope-match-a-selectors-string
+    /// <https://dom.spec.whatwg.org/#scope-match-a-selectors-string>
     /// Get an iterator over all nodes which match a set of selectors
     /// Be careful not to do anything which may manipulate the DOM tree
     /// whilst iterating, otherwise the iterator may be invalidated.
     pub fn query_selector_iter(&self, selectors: DOMString)
                                   -> Fallible<QuerySelectorIterator> {
         // Step 1.
         match SelectorParser::parse_author_origin_no_namespace(&selectors) {
             // Step 2.
@@ -1882,17 +1882,17 @@ impl Node {
                 let _inserted_node = Node::pre_insert(&child_copy, &copy, None);
             }
         }
 
         // Step 7.
         copy
     }
 
-    /// https://html.spec.whatwg.org/multipage/#child-text-content
+    /// <https://html.spec.whatwg.org/multipage/#child-text-content>
     pub fn child_text_content(&self) -> DOMString {
         Node::collect_text_contents(self.children())
     }
 
     pub fn collect_text_contents<T: Iterator<Item=DomRoot<Node>>>(iterator: T) -> DOMString {
         let mut content = String::new();
         for node in iterator {
             if let Some(ref text) = node.downcast::<Text>() {
--- a/servo/components/script/dom/paintsize.rs
+++ b/servo/components/script/dom/paintsize.rs
@@ -30,18 +30,18 @@ impl PaintSize {
     }
 
     pub fn new(global: &PaintWorkletGlobalScope, size: TypedSize2D<f32, CSSPixel>) -> DomRoot<PaintSize> {
         reflect_dom_object(Box::new(PaintSize::new_inherited(size)), global, PaintSizeBinding::Wrap)
     }
 }
 
 impl PaintSizeMethods for PaintSize {
-    /// https://drafts.css-houdini.org/css-paint-api/#paintsize
+    /// <https://drafts.css-houdini.org/css-paint-api/#paintsize>
     fn Width(&self) -> Finite<f64> {
         self.width
     }
 
-    /// https://drafts.css-houdini.org/css-paint-api/#paintsize
+    /// <https://drafts.css-houdini.org/css-paint-api/#paintsize>
     fn Height(&self) -> Finite<f64> {
         self.height
     }
 }
--- a/servo/components/script/dom/paintworkletglobalscope.rs
+++ b/servo/components/script/dom/paintworkletglobalscope.rs
@@ -57,27 +57,27 @@ use std::rc::Rc;
 use std::sync::Arc;
 use std::sync::Mutex;
 use std::sync::mpsc;
 use std::sync::mpsc::Sender;
 use style_traits::CSSPixel;
 use style_traits::DevicePixel;
 use style_traits::SpeculativePainter;
 
-/// https://drafts.css-houdini.org/css-paint-api/#paintworkletglobalscope
+/// <https://drafts.css-houdini.org/css-paint-api/#paintworkletglobalscope>
 #[dom_struct]
 pub struct PaintWorkletGlobalScope {
     /// The worklet global for this object
     worklet_global: WorkletGlobalScope,
     /// The image cache
     #[ignore_heap_size_of = "Arc"]
     image_cache: Arc<ImageCache>,
-    /// https://drafts.css-houdini.org/css-paint-api/#paint-definitions
+    /// <https://drafts.css-houdini.org/css-paint-api/#paint-definitions>
     paint_definitions: DomRefCell<HashMap<Atom, Box<PaintDefinition>>>,
-    /// https://drafts.css-houdini.org/css-paint-api/#paint-class-instances
+    /// <https://drafts.css-houdini.org/css-paint-api/#paint-class-instances>
     paint_class_instances: DomRefCell<HashMap<Atom, Box<Heap<JSVal>>>>,
     /// The most recent name the worklet was called with
     cached_name: DomRefCell<Atom>,
     /// The most recent size the worklet was drawn at
     cached_size: Cell<TypedSize2D<f32, CSSPixel>>,
     /// The most recent device pixel ratio the worklet was drawn at
     cached_device_pixel_ratio: Cell<ScaleFactor<f32, CSSPixel, DevicePixel>>,
     /// The most recent properties the worklet was drawn at
@@ -164,17 +164,17 @@ impl PaintWorkletGlobalScope {
                         *self.cached_arguments.borrow_mut() = arguments;
                         *self.cached_result.borrow_mut() = result;
                     }
                 }
             }
         }
     }
 
-    /// https://drafts.css-houdini.org/css-paint-api/#draw-a-paint-image
+    /// <https://drafts.css-houdini.org/css-paint-api/#draw-a-paint-image>
     fn draw_a_paint_image(&self,
                           name: &Atom,
                           size_in_px: TypedSize2D<f32, CSSPixel>,
                           device_pixel_ratio: ScaleFactor<f32, CSSPixel, DevicePixel>,
                           properties: &StylePropertyMapReadOnly,
                           arguments: &[String])
                           -> DrawAPaintImageResult
     {
@@ -182,17 +182,17 @@ impl PaintWorkletGlobalScope {
         let size_in_dpx = TypedSize2D::new(size_in_dpx.width.abs() as u32, size_in_dpx.height.abs() as u32);
 
         // TODO: Steps 1-5.
 
         // TODO: document paint definitions.
         self.invoke_a_paint_callback(name, size_in_px, size_in_dpx, device_pixel_ratio, properties, arguments)
     }
 
-    /// https://drafts.css-houdini.org/css-paint-api/#invoke-a-paint-callback
+    /// <https://drafts.css-houdini.org/css-paint-api/#invoke-a-paint-callback>
     #[allow(unsafe_code)]
     fn invoke_a_paint_callback(&self,
                                name: &Atom,
                                size_in_px: TypedSize2D<f32, CSSPixel>,
                                size_in_dpx: TypedSize2D<u32, DevicePixel>,
                                device_pixel_ratio: ScaleFactor<f32, CSSPixel, DevicePixel>,
                                properties: &StylePropertyMapReadOnly,
                                arguments: &[String])
@@ -362,17 +362,17 @@ impl PaintWorkletGlobalScope {
             executor: Mutex::new(self.worklet_global.executor()),
         })
     }
 }
 
 impl PaintWorkletGlobalScopeMethods for PaintWorkletGlobalScope {
     #[allow(unsafe_code)]
     #[allow(unrooted_must_root)]
-    /// https://drafts.css-houdini.org/css-paint-api/#dom-paintworkletglobalscope-registerpaint
+    /// <https://drafts.css-houdini.org/css-paint-api/#dom-paintworkletglobalscope-registerpaint>
     fn RegisterPaint(&self, name: DOMString, paint_ctor: Rc<VoidFunction>) -> Fallible<()> {
         let name = Atom::from(name);
         let cx = self.worklet_global.get_cx();
         rooted!(in(cx) let paint_obj = paint_ctor.callback_holder().get());
         rooted!(in(cx) let paint_val = ObjectValue(paint_obj.get()));
 
         debug!("Registering paint image name {}.", name);
 
@@ -456,17 +456,17 @@ pub enum PaintWorkletTask {
                     Vec<String>,
                     Sender<DrawAPaintImageResult>),
     SpeculativelyDrawAPaintImage(Atom,
                                  Vec<(Atom, String)>,
                                  Vec<String>),
 }
 
 /// A paint definition
-/// https://drafts.css-houdini.org/css-paint-api/#paint-definition
+/// <https://drafts.css-houdini.org/css-paint-api/#paint-definition>
 /// This type is dangerous, because it contains uboxed `Heap<JSVal>` values,
 /// which can't be moved.
 #[derive(HeapSizeOf, JSTraceable)]
 #[must_root]
 struct PaintDefinition {
     class_constructor: Heap<JSVal>,
     paint_function: Heap<JSVal>,
     constructor_valid_flag: Cell<bool>,
--- a/servo/components/script/dom/performance.rs
+++ b/servo/components/script/dom/performance.rs
@@ -194,17 +194,17 @@ impl Performance {
         observers.remove(index);
     }
 
     /// Queue a notification for each performance observer interested in
     /// this type of performance entry and queue a low priority task to
     /// notify the observers if no other notification task is already queued.
     ///
     /// Algorithm spec:
-    /// https://w3c.github.io/performance-timeline/#queue-a-performanceentry
+    /// <https://w3c.github.io/performance-timeline/#queue-a-performanceentry>
     pub fn queue_entry(&self, entry: &PerformanceEntry,
                        add_to_performance_entries_buffer: bool) {
         // Steps 1-3.
         // Add the performance entry to the list of performance entries that have not
         // been notified to each performance observer owner, filtering the ones it's
         // interested in.
         for o in self.observers.borrow().iter().filter(|o| o.entry_types.contains(entry.entry_type())) {
             o.observer.queue_entry(entry);
@@ -228,17 +228,17 @@ impl Performance {
         self.pending_notification_observers_task.set(true);
         let task_source = self.global().performance_timeline_task_source();
         task_source.queue_notification(&self.global());
     }
 
     /// Observers notifications task.
     ///
     /// Algorithm spec (step 7):
-    /// https://w3c.github.io/performance-timeline/#queue-a-performanceentry
+    /// <https://w3c.github.io/performance-timeline/#queue-a-performanceentry>
     pub fn notify_observers(&self) {
         // Step 7.1.
         self.pending_notification_observers_task.set(false);
 
         // Step 7.2.
         // We have to operate over a copy of the performance observers to avoid
         // the risk of an observer's callback modifying the list of registered
         // observers.
--- a/servo/components/script/dom/range.rs
+++ b/servo/components/script/dom/range.rs
@@ -1026,29 +1026,29 @@ impl WeakRangeVec {
     }
 
     /// Whether that vector of ranges is empty.
     pub fn is_empty(&self) -> bool {
         unsafe { (*self.cell.get()).is_empty() }
     }
 
     /// Used for steps 2.1-2. when inserting a node.
-    /// https://dom.spec.whatwg.org/#concept-node-insert
+    /// <https://dom.spec.whatwg.org/#concept-node-insert>
     pub fn increase_above(&self, node: &Node, offset: u32, delta: u32) {
         self.map_offset_above(node, offset, |offset| offset + delta);
     }
 
     /// Used for steps 4-5. when removing a node.
-    /// https://dom.spec.whatwg.org/#concept-node-remove
+    /// <https://dom.spec.whatwg.org/#concept-node-remove>
     pub fn decrease_above(&self, node: &Node, offset: u32, delta: u32) {
         self.map_offset_above(node, offset, |offset| offset - delta);
     }
 
     /// Used for steps 2-3. when removing a node.
-    /// https://dom.spec.whatwg.org/#concept-node-remove
+    /// <https://dom.spec.whatwg.org/#concept-node-remove>
     pub fn drain_to_parent(&self, context: &UnbindContext, child: &Node) {
         if self.is_empty() {
             return;
         }
 
         let offset = context.index();
         let parent = context.parent;
         unsafe {
@@ -1067,17 +1067,17 @@ impl WeakRangeVec {
                 }
             });
 
             (*context.parent.ranges().cell.get()).extend(ranges.drain(..));
         }
     }
 
     /// Used for steps 7.1-2. when normalizing a node.
-    /// https://dom.spec.whatwg.org/#dom-node-normalize
+    /// <https://dom.spec.whatwg.org/#dom-node-normalize>
     pub fn drain_to_preceding_text_sibling(&self, node: &Node, sibling: &Node, length: u32) {
         if self.is_empty() {
             return;
         }
 
         unsafe {
             let ranges = &mut *self.cell.get();
 
@@ -1094,17 +1094,17 @@ impl WeakRangeVec {
                 }
             });
 
             (*sibling.ranges().cell.get()).extend(ranges.drain(..));
         }
     }
 
     /// Used for steps 7.3-4. when normalizing a node.
-    /// https://dom.spec.whatwg.org/#dom-node-normalize
+    /// <https://dom.spec.whatwg.org/#dom-node-normalize>
     pub fn move_to_text_child_at(&self,
                                  node: &Node, offset: u32,
                                  child: &Node, new_offset: u32) {
         unsafe {
             let child_ranges = &mut *child.ranges().cell.get();
 
             (*self.cell.get()).update(|entry| {
                 let range = entry.root().unwrap();
@@ -1137,31 +1137,31 @@ impl WeakRangeVec {
                 if move_end {
                     range.end.set(child, new_offset);
                 }
             });
         }
     }
 
     /// Used for steps 8-11. when replacing character data.
-    /// https://dom.spec.whatwg.org/#concept-cd-replace
+    /// <https://dom.spec.whatwg.org/#concept-cd-replace>
     pub fn replace_code_units(&self,
                               node: &Node, offset: u32,
                               removed_code_units: u32, added_code_units: u32) {
         self.map_offset_above(node, offset, |range_offset| {
             if range_offset <= offset + removed_code_units {
                 offset
             } else {
                 range_offset + added_code_units - removed_code_units
             }
         });
     }
 
     /// Used for steps 7.2-3. when splitting a text node.
-    /// https://dom.spec.whatwg.org/#concept-text-split
+    /// <https://dom.spec.whatwg.org/#concept-text-split>
     pub fn move_to_following_text_sibling_above(&self,
                                                 node: &Node, offset: u32,
                                                 sibling: &Node) {
         unsafe {
             let sibling_ranges = &mut *sibling.ranges().cell.get();
 
             (*self.cell.get()).update(|entry| {
                 let range = entry.root().unwrap();
@@ -1197,17 +1197,17 @@ impl WeakRangeVec {
                 if move_end {
                     range.end.set(sibling, end_offset - offset);
                 }
             });
         }
     }
 
     /// Used for steps 7.4-5. when splitting a text node.
-    /// https://dom.spec.whatwg.org/#concept-text-split
+    /// <https://dom.spec.whatwg.org/#concept-text-split>
     pub fn increment_at(&self, node: &Node, offset: u32) {
         unsafe {
             (*self.cell.get()).update(|entry| {
                 let range = entry.root().unwrap();
                 if &range.start.node == node && offset == range.StartOffset() {
                     range.start.set_offset(offset + 1);
                 }
                 if &range.end.node == node && offset == range.EndOffset() {
--- a/servo/components/script/dom/servoparser/async_html.rs
+++ b/servo/components/script/dom/servoparser/async_html.rs
@@ -725,17 +725,17 @@ impl TreeSink for Sink {
     fn complete_script(&mut self, _: &Self::Handle) -> NextParserState {
         panic!("complete_script should not be called here!");
     }
 
     fn reparent_children(&mut self, parent: &Self::Handle, new_parent: &Self::Handle) {
         self.send_op(ParseOperation::ReparentChildren { parent: parent.id, new_parent: new_parent.id });
     }
 
-    /// https://html.spec.whatwg.org/multipage/#html-integration-point
+    /// <https://html.spec.whatwg.org/multipage/#html-integration-point>
     /// Specifically, the <annotation-xml> cases.
     fn is_mathml_annotation_xml_integration_point(&self, handle: &Self::Handle) -> bool {
         let node_data = self.get_parse_node_data(&handle.id);
         node_data.is_integration_point
     }
 
     fn set_current_line(&mut self, line_number: u64) {
         self.current_line = line_number;
--- a/servo/components/script/dom/servoparser/mod.rs
+++ b/servo/components/script/dom/servoparser/mod.rs
@@ -83,21 +83,21 @@ pub struct ServoParser {
     #[ignore_heap_size_of = "Defined in html5ever"]
     script_input: DomRefCell<BufferQueue>,
     /// The tokenizer of this parser.
     tokenizer: DomRefCell<Tokenizer>,
     /// Whether to expect any further input from the associated network request.
     last_chunk_received: Cell<bool>,
     /// Whether this parser should avoid passing any further data to the tokenizer.
     suspended: Cell<bool>,
-    /// https://html.spec.whatwg.org/multipage/#script-nesting-level
+    /// <https://html.spec.whatwg.org/multipage/#script-nesting-level>
     script_nesting_level: Cell<usize>,
-    /// https://html.spec.whatwg.org/multipage/#abort-a-parser
+    /// <https://html.spec.whatwg.org/multipage/#abort-a-parser>
     aborted: Cell<bool>,
-    /// https://html.spec.whatwg.org/multipage/#script-created-parser
+    /// <https://html.spec.whatwg.org/multipage/#script-created-parser>
     script_created_parser: bool,
 }
 
 #[derive(PartialEq)]
 enum LastChunkState {
     Received,
     NotReceived,
 }
@@ -193,17 +193,17 @@ impl ServoParser {
     }
 
     pub fn is_script_created(&self) -> bool {
         self.script_created_parser
     }
 
     /// Corresponds to the latter part of the "Otherwise" branch of the 'An end
     /// tag whose tag name is "script"' of
-    /// https://html.spec.whatwg.org/multipage/#parsing-main-incdata
+    /// <https://html.spec.whatwg.org/multipage/#parsing-main-incdata>
     ///
     /// This first moves everything from the script input to the beginning of
     /// the network input, effectively resetting the insertion point to just
     /// before the next character to be consumed.
     ///
     ///
     /// ```text
     ///     | ... script input ... network input ...
@@ -925,17 +925,17 @@ impl TreeSink for Sink {
     }
 
     fn reparent_children(&mut self, node: &Dom<Node>, new_parent: &Dom<Node>) {
         while let Some(ref child) = node.GetFirstChild() {
             new_parent.AppendChild(&child).unwrap();
         }
     }
 
-    /// https://html.spec.whatwg.org/multipage/#html-integration-point
+    /// <https://html.spec.whatwg.org/multipage/#html-integration-point>
     /// Specifically, the <annotation-xml> cases.
     fn is_mathml_annotation_xml_integration_point(&self, handle: &Dom<Node>) -> bool {
         let elem = handle.downcast::<Element>().unwrap();
         elem.get_attribute(&ns!(), &local_name!("encoding")).map_or(false, |attr| {
             attr.value().eq_ignore_ascii_case("text/html")
                 || attr.value().eq_ignore_ascii_case("application/xhtml+xml")
         })
     }
--- a/servo/components/script/dom/storage.rs
+++ b/servo/components/script/dom/storage.rs
@@ -142,26 +142,26 @@ impl StorageMethods for Storage {
 
     fn NamedDeleter(&self, name: DOMString) {
         self.RemoveItem(name);
     }
 }
 
 
 impl Storage {
-    /// https://html.spec.whatwg.org/multipage/#send-a-storage-notification
+    /// <https://html.spec.whatwg.org/multipage/#send-a-storage-notification>
     fn broadcast_change_notification(&self, key: Option<String>, old_value: Option<String>,
                                      new_value: Option<String>) {
         let storage = self.storage_type;
         let url = self.get_url();
         let msg = ScriptMsg::BroadcastStorageEvent(storage, url, key, old_value, new_value);
         self.global().script_to_constellation_chan().send(msg).unwrap();
     }
 
-    /// https://html.spec.whatwg.org/multipage/#send-a-storage-notification
+    /// <https://html.spec.whatwg.org/multipage/#send-a-storage-notification>
     pub fn queue_storage_event(
         &self,
         url: ServoUrl,
         key: Option<String>,
         old_value: Option<String>,
         new_value: Option<String>,
     ) {
         let global = self.global();
--- a/servo/components/script/dom/stylepropertymapreadonly.rs
+++ b/servo/components/script/dom/stylepropertymapreadonly.rs
@@ -48,29 +48,29 @@ impl StylePropertyMapReadOnly {
             values.push(Dom::from_ref(&*value));
         }
         let iter = keys.drain(..).zip(values.iter().cloned());
         reflect_dom_object(Box::new(StylePropertyMapReadOnly::new_inherited(iter)), global, Wrap)
     }
 }
 
 impl StylePropertyMapReadOnlyMethods for StylePropertyMapReadOnly {
-    /// https://drafts.css-houdini.org/css-typed-om-1/#dom-stylepropertymapreadonly-get
+    /// <https://drafts.css-houdini.org/css-typed-om-1/#dom-stylepropertymapreadonly-get>
     fn Get(&self, property: DOMString) -> Option<DomRoot<CSSStyleValue>> {
         // TODO: avoid constructing an Atom
         self.entries.get(&Atom::from(property)).map(|value| DomRoot::from_ref(&**value))
     }
 
-    /// https://drafts.css-houdini.org/css-typed-om-1/#dom-stylepropertymapreadonly-has
+    /// <https://drafts.css-houdini.org/css-typed-om-1/#dom-stylepropertymapreadonly-has>
     fn Has(&self, property: DOMString) -> bool {
         // TODO: avoid constructing an Atom
         self.entries.contains_key(&Atom::from(property))
     }
 
-    /// https://drafts.css-houdini.org/css-typed-om-1/#dom-stylepropertymapreadonly-getproperties
+    /// <https://drafts.css-houdini.org/css-typed-om-1/#dom-stylepropertymapreadonly-getproperties>
     fn GetProperties(&self) -> Vec<DOMString> {
         let mut result: Vec<DOMString> = self.entries.keys()
             .map(|key| DOMString::from(&**key))
             .collect();
         // https://drafts.css-houdini.org/css-typed-om-1/#dom-stylepropertymap-getproperties
         // requires this sort order
         result.sort_by(|key1, key2| {
             if let Ok(key1) = custom_properties::parse_name(key1) {
--- a/servo/components/script/dom/textdecoder.rs
+++ b/servo/components/script/dom/textdecoder.rs
@@ -37,17 +37,17 @@ impl TextDecoder {
     }
 
     pub fn new(global: &GlobalScope, encoding: EncodingRef, fatal: bool) -> DomRoot<TextDecoder> {
         reflect_dom_object(Box::new(TextDecoder::new_inherited(encoding, fatal)),
                            global,
                            TextDecoderBinding::Wrap)
     }
 
-    /// https://encoding.spec.whatwg.org/#dom-textdecoder
+    /// <https://encoding.spec.whatwg.org/#dom-textdecoder>
     pub fn Constructor(global: &GlobalScope,
                        label: DOMString,
                        options: &TextDecoderBinding::TextDecoderOptions)
                             -> Fallible<DomRoot<TextDecoder>> {
         let encoding = match encoding_from_whatwg_label(&label) {
             None => return TextDecoder::make_range_error(),
             Some(enc) => enc
         };
--- a/servo/components/script/dom/touch.rs
+++ b/servo/components/script/dom/touch.rs
@@ -55,48 +55,48 @@ impl Touch {
             )),
             window,
             TouchBinding::Wrap
         )
     }
 }
 
 impl TouchMethods for Touch {
-    /// https://w3c.github.io/touch-events/#widl-Touch-identifier
+    /// <https://w3c.github.io/touch-events/#widl-Touch-identifier>
     fn Identifier(&self) -> i32 {
         self.identifier
     }
 
-    /// https://w3c.github.io/touch-events/#widl-Touch-target
+    /// <https://w3c.github.io/touch-events/#widl-Touch-target>
     fn Target(&self) -> DomRoot<EventTarget> {
         self.target.get()
     }
 
-    /// https://w3c.github.io/touch-events/#widl-Touch-screenX
+    /// <https://w3c.github.io/touch-events/#widl-Touch-screenX>
     fn ScreenX(&self) -> Finite<f64> {
         Finite::wrap(self.screen_x)
     }
 
-    /// https://w3c.github.io/touch-events/#widl-Touch-screenY
+    /// <https://w3c.github.io/touch-events/#widl-Touch-screenY>
     fn ScreenY(&self) -> Finite<f64> {
         Finite::wrap(self.screen_y)
     }
 
-    /// https://w3c.github.io/touch-events/#widl-Touch-clientX
+    /// <https://w3c.github.io/touch-events/#widl-Touch-clientX>
     fn ClientX(&self) -> Finite<f64> {
         Finite::wrap(self.client_x)
     }
 
-    /// https://w3c.github.io/touch-events/#widl-Touch-clientY
+    /// <https://w3c.github.io/touch-events/#widl-Touch-clientY>
     fn ClientY(&self) -> Finite<f64> {
         Finite::wrap(self.client_y)
     }
 
-    /// https://w3c.github.io/touch-events/#widl-Touch-clientX
+    /// <https://w3c.github.io/touch-events/#widl-Touch-clientX>
     fn PageX(&self) -> Finite<f64> {
         Finite::wrap(self.page_x)
     }
 
-    /// https://w3c.github.io/touch-events/#widl-Touch-clientY
+    /// <https://w3c.github.io/touch-events/#widl-Touch-clientY>
     fn PageY(&self) -> Finite<f64> {
         Finite::wrap(self.page_y)
     }
 }
--- a/servo/components/script/dom/touchevent.rs
+++ b/servo/components/script/dom/touchevent.rs
@@ -75,48 +75,48 @@ impl TouchEvent {
         ev.alt_key.set(alt_key);
         ev.shift_key.set(shift_key);
         ev.meta_key.set(meta_key);
         ev
     }
 }
 
 impl<'a> TouchEventMethods for &'a TouchEvent {
-    /// https://w3c.github.io/touch-events/#widl-TouchEvent-ctrlKey
+    /// <https://w3c.github.io/touch-events/#widl-TouchEvent-ctrlKey>
     fn CtrlKey(&self) -> bool {
         self.ctrl_key.get()
     }
 
-    /// https://w3c.github.io/touch-events/#widl-TouchEvent-shiftKey
+    /// <https://w3c.github.io/touch-events/#widl-TouchEvent-shiftKey>
     fn ShiftKey(&self) -> bool {
         self.shift_key.get()
     }
 
-    /// https://w3c.github.io/touch-events/#widl-TouchEvent-altKey
+    /// <https://w3c.github.io/touch-events/#widl-TouchEvent-altKey>
     fn AltKey(&self) -> bool {
         self.alt_key.get()
     }
 
-    /// https://w3c.github.io/touch-events/#widl-TouchEvent-metaKey
+    /// <https://w3c.github.io/touch-events/#widl-TouchEvent-metaKey>
     fn MetaKey(&self) -> bool {
         self.meta_key.get()
     }
 
-    /// https://w3c.github.io/touch-events/#widl-TouchEventInit-touches
+    /// <https://w3c.github.io/touch-events/#widl-TouchEventInit-touches>
     fn Touches(&self) -> DomRoot<TouchList> {
         self.touches.get()
     }
 
-    /// https://w3c.github.io/touch-events/#widl-TouchEvent-targetTouches
+    /// <https://w3c.github.io/touch-events/#widl-TouchEvent-targetTouches>
     fn TargetTouches(&self) -> DomRoot<TouchList> {
         self.target_touches.get()
     }
 
-    /// https://w3c.github.io/touch-events/#widl-TouchEvent-changedTouches
+    /// <https://w3c.github.io/touch-events/#widl-TouchEvent-changedTouches>
     fn ChangedTouches(&self) -> DomRoot<TouchList> {
         self.changed_touches.get()
     }
 
-    /// https://dom.spec.whatwg.org/#dom-event-istrusted
+    /// <https://dom.spec.whatwg.org/#dom-event-istrusted>
     fn IsTrusted(&self) -> bool {
         self.uievent.IsTrusted()
     }
 }
--- a/servo/components/script/dom/touchlist.rs
+++ b/servo/components/script/dom/touchlist.rs
@@ -26,23 +26,23 @@ impl TouchList {
 
     pub fn new(window: &Window, touches: &[&Touch]) -> DomRoot<TouchList> {
         reflect_dom_object(Box::new(TouchList::new_inherited(touches)),
                            window, TouchListBinding::Wrap)
     }
 }
 
 impl TouchListMethods for TouchList {
-    /// https://w3c.github.io/touch-events/#widl-TouchList-length
+    /// <https://w3c.github.io/touch-events/#widl-TouchList-length>
     fn Length(&self) -> u32 {
         self.touches.len() as u32
     }
 
-    /// https://w3c.github.io/touch-events/#widl-TouchList-item-getter-Touch-unsigned-long-index
+    /// <https://w3c.github.io/touch-events/#widl-TouchList-item-getter-Touch-unsigned-long-index>
     fn Item(&self, index: u32) -> Option<DomRoot<Touch>> {
         self.touches.get(index as usize).map(|js| DomRoot::from_ref(&**js))
     }
 
-    /// https://w3c.github.io/touch-events/#widl-TouchList-item-getter-Touch-unsigned-long-index
+    /// <https://w3c.github.io/touch-events/#widl-TouchList-item-getter-Touch-unsigned-long-index>
     fn IndexedGetter(&self, index: u32) -> Option<DomRoot<Touch>> {
         self.Item(index)
     }
 }
--- a/servo/components/script/dom/virtualmethods.rs
+++ b/servo/components/script/dom/virtualmethods.rs
@@ -58,18 +58,18 @@ use style::attr::AttrValue;
 /// Trait to allow DOM nodes to opt-in to overriding (or adding to) common
 /// behaviours. Replicates the effect of C++ virtual methods.
 pub trait VirtualMethods {
     /// Returns self as the superclass of the implementation for this trait,
     /// if any.
     fn super_type(&self) -> Option<&VirtualMethods>;
 
     /// Called when attributes of a node are mutated.
-    /// https://dom.spec.whatwg.org/#attribute-is-set
-    /// https://dom.spec.whatwg.org/#attribute-is-removed
+    /// <https://dom.spec.whatwg.org/#attribute-is-set>
+    /// <https://dom.spec.whatwg.org/#attribute-is-removed>
     fn attribute_mutated(&self, attr: &Attr, mutation: AttributeMutation) {
         if let Some(s) = self.super_type() {
             s.attribute_mutated(attr, mutation);
         }
     }
 
     /// Returns `true` if given attribute `attr` affects style of the
     /// given element.
@@ -95,17 +95,17 @@ pub trait VirtualMethods {
         if let Some(ref s) = self.super_type() {
             s.bind_to_tree(tree_in_doc);
         }
     }
 
     /// Called when a Node is removed from a tree, where 'tree_in_doc'
     /// indicates whether the tree is part of a Document.
     /// Implements removing steps:
-    /// https://dom.spec.whatwg.org/#concept-node-remove-ext
+    /// <https://dom.spec.whatwg.org/#concept-node-remove-ext>
     fn unbind_from_tree(&self, context: &UnbindContext) {
         if let Some(ref s) = self.super_type() {
             s.unbind_from_tree(context);
         }
     }
 
     /// Called on the parent when its children are changed.
     fn children_changed(&self, mutation: &ChildrenMutation) {
@@ -116,24 +116,24 @@ pub trait VirtualMethods {
 
     /// Called during event dispatch after the bubbling phase completes.
     fn handle_event(&self, event: &Event) {
         if let Some(s) = self.super_type() {
             s.handle_event(event);
         }
     }
 
-    /// https://dom.spec.whatwg.org/#concept-node-adopt-ext
+    /// <https://dom.spec.whatwg.org/#concept-node-adopt-ext>
     fn adopting_steps(&self, old_doc: &Document) {
         if let Some(ref s) = self.super_type() {
             s.adopting_steps(old_doc);
         }
     }
 
-    /// https://dom.spec.whatwg.org/#concept-node-clone-ext
+    /// <https://dom.spec.whatwg.org/#concept-node-clone-ext>
     fn cloning_steps(&self, copy: &Node, maybe_doc: Option<&Document>,
                      clone_children: CloneChildrenFlag) {
         if let Some(ref s) = self.super_type() {
             s.cloning_steps(copy, maybe_doc, clone_children);
         }
     }
 
     /// Called on an element when it is popped off the stack of open elements
--- a/servo/components/script/dom/webgl_validations/tex_image_2d.rs
+++ b/servo/components/script/dom/webgl_validations/tex_image_2d.rs
@@ -265,17 +265,17 @@ pub struct TexImage2DValidatorResult {
     pub border: u32,
     pub texture: DomRoot<WebGLTexture>,
     pub target: TexImageTarget,
     pub format: TexFormat,
     pub data_type: TexDataType,
 }
 
 /// TexImage2d validator as per
-/// https://www.khronos.org/opengles/sdk/docs/man/xhtml/glTexImage2D.xml
+/// <https://www.khronos.org/opengles/sdk/docs/man/xhtml/glTexImage2D.xml>
 impl<'a> WebGLValidator for TexImage2DValidator<'a> {
     type ValidatedOutput = TexImage2DValidatorResult;
     type Error = TexImageValidationError;
 
     fn validate(self) -> Result<Self::ValidatedOutput, TexImageValidationError> {
         let context = self.common_validator.context;
         let CommonTexImage2DValidatorResult {
             texture,
--- a/servo/components/script/dom/websocket.rs
+++ b/servo/components/script/dom/websocket.rs
@@ -124,17 +124,17 @@ impl WebSocket {
         }
     }
 
     fn new(global: &GlobalScope, url: ServoUrl) -> DomRoot<WebSocket> {
         reflect_dom_object(Box::new(WebSocket::new_inherited(url)),
                            global, WebSocketBinding::Wrap)
     }
 
-    /// https://html.spec.whatwg.org/multipage/#dom-websocket
+    /// <https://html.spec.whatwg.org/multipage/#dom-websocket>
     pub fn Constructor(global: &GlobalScope,
                        url: DOMString,
                        protocols: Option<StringOrStringSequence>)
                        -> Fallible<DomRoot<WebSocket>> {
         // Steps 1-2.
         let url_record = ServoUrl::parse(&url).or(Err(Error::Syntax))?;
 
         // Step 3.
@@ -386,24 +386,24 @@ impl WebSocketMethods for WebSocket {
             }
         }
         Ok(()) //Return Ok
     }
 }
 
 
 /// Task queued when *the WebSocket connection is established*.
-/// https://html.spec.whatwg.org/multipage/#feedback-from-the-protocol:concept-websocket-established
+/// <https://html.spec.whatwg.org/multipage/#feedback-from-the-protocol:concept-websocket-established>
 struct ConnectionEstablishedTask {
     address: Trusted<WebSocket>,
     protocol_in_use: Option<String>,
 }
 
 impl TaskOnce for ConnectionEstablishedTask {
-    /// https://html.spec.whatwg.org/multipage/#feedback-from-the-protocol:concept-websocket-established
+    /// <https://html.spec.whatwg.org/multipage/#feedback-from-the-protocol:concept-websocket-established>
     fn run_once(self) {
         let ws = self.address.root();
 
         // Step 1.
         ws.ready_state.set(WebSocketRequestState::Open);
 
         // Step 2: Extensions.
         // TODO: Set extensions to extensions in use.
--- a/servo/components/script/dom/window.rs
+++ b/servo/components/script/dom/window.rs
@@ -282,17 +282,17 @@ pub struct Window {
     pending_layout_images: DomRefCell<HashMap<PendingImageId, Vec<Dom<Node>>>>,
 
     /// Directory to store unminified scripts for this window if unminify-js
     /// opt is enabled.
     unminified_js_dir: DomRefCell<Option<String>>,
 
     /// Worklets
     test_worklet: MutNullableDom<Worklet>,
-    /// https://drafts.css-houdini.org/css-paint-api-1/#paint-worklet
+    /// <https://drafts.css-houdini.org/css-paint-api-1/#paint-worklet>
     paint_worklet: MutNullableDom<Worklet>,
     /// The Webrender Document id associated with this window.
     #[ignore_heap_size_of = "defined in webrender_api"]
     webrender_document: DocumentId,
 }
 
 impl Window {
     #[allow(unsafe_code)]
@@ -355,17 +355,17 @@ impl Window {
     }
 
     /// This can panic if it is called after the browsing context has been discarded
     pub fn window_proxy(&self) -> DomRoot<WindowProxy> {
         self.window_proxy.get().unwrap()
     }
 
     /// Returns the window proxy if it has not been discarded.
-    /// https://html.spec.whatwg.org/multipage/#a-browsing-context-is-discarded
+    /// <https://html.spec.whatwg.org/multipage/#a-browsing-context-is-discarded>
     pub fn undiscarded_window_proxy(&self) -> Option<DomRoot<WindowProxy>> {
         self.window_proxy.get()
             .and_then(|window_proxy| if window_proxy.is_browsing_context_discarded() {
                 None
             } else {
                 Some(window_proxy)
             })
     }
@@ -737,23 +737,23 @@ impl WindowMethods for Window {
         base64_btoa(btoa)
     }
 
     // https://html.spec.whatwg.org/multipage/#dom-windowbase64-atob
     fn Atob(&self, atob: DOMString) -> Fallible<DOMString> {
         base64_atob(atob)
     }
 
-    /// https://html.spec.whatwg.org/multipage/#dom-window-requestanimationframe
+    /// <https://html.spec.whatwg.org/multipage/#dom-window-requestanimationframe>
     fn RequestAnimationFrame(&self, callback: Rc<FrameRequestCallback>) -> u32 {
         self.Document()
             .request_animation_frame(AnimationFrameCallback::FrameRequestCallback { callback })
     }
 
-    /// https://html.spec.whatwg.org/multipage/#dom-window-cancelanimationframe
+    /// <https://html.spec.whatwg.org/multipage/#dom-window-cancelanimationframe>
     fn CancelAnimationFrame(&self, ident: u32) {
         let doc = self.Document();
         doc.cancel_animation_frame(ident);
     }
 
     #[allow(unsafe_code)]
     // https://html.spec.whatwg.org/multipage/#dom-window-postmessage
     unsafe fn PostMessage(&self,
@@ -1085,17 +1085,17 @@ impl Window {
         // TODO: ensure that this doesn't happen!
 
         self.current_state.set(WindowState::Zombie);
         *self.js_runtime.borrow_mut() = None;
         self.window_proxy.set(None);
         self.ignore_further_async_events.borrow().store(true, Ordering::SeqCst);
     }
 
-    /// https://drafts.csswg.org/cssom-view/#dom-window-scroll
+    /// <https://drafts.csswg.org/cssom-view/#dom-window-scroll>
     pub fn scroll(&self, x_: f64, y_: f64, behavior: ScrollBehavior) {
         // Step 3
         let xfinite = if x_.is_finite() { x_ } else { 0.0f64 };
         let yfinite = if y_.is_finite() { y_ } else { 0.0f64 };
 
         // Step 4
         if self.window_size.get().is_none() {
             return;
@@ -1139,17 +1139,17 @@ impl Window {
         self.update_viewport_for_scroll(x, y);
         self.perform_a_scroll(x,
                               y,
                               global_scope.pipeline_id().root_scroll_node(),
                               behavior,
                               None);
     }
 
-    /// https://drafts.csswg.org/cssom-view/#perform-a-scroll
+    /// <https://drafts.csswg.org/cssom-view/#perform-a-scroll>
     pub fn perform_a_scroll(&self,
                             x: f32,
                             y: f32,
                             scroll_root_id: ClipId,
                             behavior: ScrollBehavior,
                             element: Option<&Element>) {
         //TODO Step 1
         let point = Point2D::new(x, y);
--- a/servo/components/script/dom/worklet.rs
+++ b/servo/components/script/dom/worklet.rs
@@ -69,17 +69,17 @@ use swapper::swapper;
 use task::TaskBox;
 use uuid::Uuid;
 
 // Magic numbers
 const WORKLET_THREAD_POOL_SIZE: u32 = 3;
 const MIN_GC_THRESHOLD: u32 = 1_000_000;
 
 #[dom_struct]
-/// https://drafts.css-houdini.org/worklets/#worklet
+/// <https://drafts.css-houdini.org/worklets/#worklet>
 pub struct Worklet {
     reflector: Reflector,
     window: Dom<Window>,
     worklet_id: WorkletId,
     global_type: WorkletGlobalScopeType,
 }
 
 impl Worklet {
@@ -104,17 +104,17 @@ impl Worklet {
     #[allow(dead_code)]
     pub fn worklet_global_scope_type(&self) -> WorkletGlobalScopeType {
         self.global_type
     }
 }
 
 impl WorkletMethods for Worklet {
     #[allow(unrooted_must_root)]
-    /// https://drafts.css-houdini.org/worklets/#dom-worklet-addmodule
+    /// <https://drafts.css-houdini.org/worklets/#dom-worklet-addmodule>
     fn AddModule(&self, module_url: USVString, options: &WorkletOptions) -> Rc<Promise> {
         // Step 1.
         let promise = Promise::new(self.window.upcast());
 
         // Step 3.
         let module_url_record = match self.window.Document().base_url().join(&module_url.0) {
             Ok(url) => url,
             Err(err) => {
@@ -154,17 +154,17 @@ pub struct WorkletId(Uuid);
 known_heap_size!(0, WorkletId);
 
 impl WorkletId {
     fn new() -> WorkletId {
         WorkletId(servo_rand::random())
     }
 }
 
-/// https://drafts.css-houdini.org/worklets/#pending-tasks-struct
+/// <https://drafts.css-houdini.org/worklets/#pending-tasks-struct>
 #[derive(Clone, Debug)]
 struct PendingTasksStruct(Arc<AtomicIsize>);
 
 impl PendingTasksStruct {
     fn new() -> PendingTasksStruct {
         PendingTasksStruct(Arc::new(AtomicIsize::new(WORKLET_THREAD_POOL_SIZE as isize)))
     }
 
@@ -270,17 +270,17 @@ impl WorkletThreadPool {
             control_sender_1: WorkletThread::spawn(hot_backup_role, init.clone()),
             control_sender_2: WorkletThread::spawn(cold_backup_role, init),
         }
     }
 
     /// Loads a worklet module into every worklet thread.
     /// If all of the threads load successfully, the promise is resolved.
     /// If any of the threads fails to load, the promise is rejected.
-    /// https://drafts.css-houdini.org/worklets/#fetch-and-invoke-a-worklet-script
+    /// <https://drafts.css-houdini.org/worklets/#fetch-and-invoke-a-worklet-script>
     fn fetch_and_invoke_a_worklet_script(&self,
                                          pipeline_id: PipelineId,
                                          worklet_id: WorkletId,
                                          global_type: WorkletGlobalScopeType,
                                          origin: ImmutableOrigin,
                                          base_url: ServoUrl,
                                          script_url: ServoUrl,
                                          credentials: RequestCredentials,
@@ -547,17 +547,17 @@ impl WorkletThread {
                 let result = global_type.new(&self.runtime, pipeline_id, base_url, executor, &self.global_init);
                 entry.insert(Dom::from_ref(&*result));
                 result
             },
         }
     }
 
     /// Fetch and invoke a worklet script.
-    /// https://drafts.css-houdini.org/worklets/#fetch-and-invoke-a-worklet-script
+    /// <https://drafts.css-houdini.org/worklets/#fetch-and-invoke-a-worklet-script>
     fn fetch_and_invoke_a_worklet_script(&self,
                                          global_scope: &WorkletGlobalScope,
                                          pipeline_id: PipelineId,
                                          origin: ImmutableOrigin,
                                          script_url: ServoUrl,
                                          credentials: RequestCredentials,
                                          pending_tasks_struct: PendingTasksStruct,
                                          promise: TrustedPromise)
--- a/servo/components/script/dom/workletglobalscope.rs
+++ b/servo/components/script/dom/workletglobalscope.rs
@@ -28,17 +28,17 @@ use script_traits::{ScriptToConstellatio
 use servo_atoms::Atom;
 use servo_url::ImmutableOrigin;
 use servo_url::MutableOrigin;
 use servo_url::ServoUrl;
 use std::sync::Arc;
 use std::sync::mpsc::Sender;
 
 #[dom_struct]
-/// https://drafts.css-houdini.org/worklets/#workletglobalscope
+/// <https://drafts.css-houdini.org/worklets/#workletglobalscope>
 pub struct WorkletGlobalScope {
     /// The global for this worklet.
     globalscope: GlobalScope,
     /// The base URL for this worklet.
     base_url: ServoUrl,
     /// Sender back to the script thread
     #[ignore_heap_size_of = "channels are hard"]
     to_script_thread_sender: Sender<MainThreadScriptMsg>,
@@ -149,17 +149,17 @@ pub struct WorkletGlobalScopeInit {
     /// Messages to send to constellation
     pub to_constellation_sender: IpcSender<(PipelineId, ScriptMsg)>,
     /// Message to send to the scheduler
     pub scheduler_chan: IpcSender<TimerSchedulerMsg>,
     /// The image cache
     pub image_cache: Arc<ImageCache>,
 }
 
-/// https://drafts.css-houdini.org/worklets/#worklet-global-scope-type
+/// <https://drafts.css-houdini.org/worklets/#worklet-global-scope-type>
 #[derive(Clone, Copy, Debug, HeapSizeOf, JSTraceable)]
 pub enum WorkletGlobalScopeType {
     /// A servo-specific testing worklet
     Test,
     /// A paint worklet
     Paint,
 }
 
--- a/servo/components/script/microtask.rs
+++ b/servo/components/script/microtask.rs
@@ -20,17 +20,17 @@ use std::cell::Cell;
 use std::mem;
 use std::rc::Rc;
 
 /// A collection of microtasks in FIFO order.
 #[derive(Default, HeapSizeOf, JSTraceable)]
 pub struct MicrotaskQueue {
     /// The list of enqueued microtasks that will be invoked at the next microtask checkpoint.
     microtask_queue: DomRefCell<Vec<Microtask>>,
-    /// https://html.spec.whatwg.org/multipage/#performing-a-microtask-checkpoint
+    /// <https://html.spec.whatwg.org/multipage/#performing-a-microtask-checkpoint>
     performing_a_microtask_checkpoint: Cell<bool>,
 }
 
 #[derive(HeapSizeOf, JSTraceable)]
 pub enum Microtask {
     Promise(EnqueuedPromiseCallback),
     MediaElement(MediaElementMicrotask),
     ImageElement(ImageElementMicrotask),
@@ -52,17 +52,17 @@ pub struct EnqueuedPromiseCallback {
 
 impl MicrotaskQueue {
     /// Add a new microtask to this queue. It will be invoked as part of the next
     /// microtask checkpoint.
     pub fn enqueue(&self, job: Microtask) {
         self.microtask_queue.borrow_mut().push(job);
     }
 
-    /// https://html.spec.whatwg.org/multipage/#perform-a-microtask-checkpoint
+    /// <https://html.spec.whatwg.org/multipage/#perform-a-microtask-checkpoint>
     /// Perform a microtask checkpoint, executing all queued microtasks until the queue is empty.
     pub fn checkpoint<F>(&self, target_provider: F)
         where F: Fn(PipelineId) -> Option<DomRoot<GlobalScope>>
     {
         if self.performing_a_microtask_checkpoint.get() {
             return;
         }
 
--- a/servo/components/script/script_thread.rs
+++ b/servo/components/script/script_thread.rs
@@ -463,17 +463,17 @@ pub struct ScriptThread {
     closed_pipelines: DomRefCell<HashSet<PipelineId>>,
 
     scheduler_chan: IpcSender<TimerSchedulerMsg>,
     timer_event_chan: Sender<TimerEvent>,
     timer_event_port: Receiver<TimerEvent>,
 
     content_process_shutdown_chan: IpcSender<()>,
 
-    /// https://html.spec.whatwg.org/multipage/#microtask-queue
+    /// <https://html.spec.whatwg.org/multipage/#microtask-queue>
     microtask_queue: Rc<MicrotaskQueue>,
 
     /// Microtask Queue for adding support for mutation observer microtasks
     mutation_observer_compound_microtask_queued: Cell<bool>,
 
     /// The unit of related similar-origin browsing contexts' list of MutationObserver objects
     mutation_observers: DomRefCell<Vec<Dom<MutationObserver>>>,
 
@@ -489,17 +489,17 @@ pub struct ScriptThread {
     /// A list of pipelines containing documents that finished loading all their blocking
     /// resources during a turn of the event loop.
     docs_with_no_blocking_loads: DomRefCell<HashSet<Dom<Document>>>,
 
     /// A list of nodes with in-progress CSS transitions, which roots them for the duration
     /// of the transition.
     transitioning_nodes: DomRefCell<Vec<Dom<Node>>>,
 
-    /// https://html.spec.whatwg.org/multipage/#custom-element-reactions-stack
+    /// <https://html.spec.whatwg.org/multipage/#custom-element-reactions-stack>
     custom_element_reaction_stack: CustomElementReactionStack,
 
     /// The Webrender Document ID associated with this thread.
     webrender_document: DocumentId,
 }
 
 /// In the event of thread panic, all data on the stack runs its destructor. However, there
 /// are no reachable, owning pointers to the DOM memory, so it never gets freed by default
@@ -1597,17 +1597,17 @@ impl ScriptThread {
     fn handle_post_message_msg(&self, pipeline_id: PipelineId, origin: Option<ImmutableOrigin>, data: Vec<u8>) {
         match { self.documents.borrow().find_window(pipeline_id) } {
             None => return warn!("postMessage after pipeline {} closed.", pipeline_id),
             Some(window) => window.post_message(origin, StructuredCloneData::Vector(data)),
         }
     }
 
     /// Handles a mozbrowser event, for example see:
-    /// https://developer.mozilla.org/en-US/docs/Web/Events/mozbrowserloadstart
+    /// <https://developer.mozilla.org/en-US/docs/Web/Events/mozbrowserloadstart>
     fn handle_mozbrowser_event_msg(&self,
                                    parent_pipeline_id: PipelineId,
                                    top_level_browsing_context_id: Option<TopLevelBrowsingContextId>,
                                    event: MozBrowserEvent) {
         let doc = match { self.documents.borrow().find_document(parent_pipeline_id) } {
             None => return warn!("Mozbrowser event after pipeline {} closed.", parent_pipeline_id),
             Some(doc) => doc,
         };
@@ -2304,17 +2304,17 @@ impl ScriptThread {
             None => {
                 warn!("Message sent to closed pipeline {}.", pipeline_id);
                 return TouchEventResult::Processed(true);
             },
         };
         document.handle_touch_event(self.js_runtime.rt(), event_type, identifier, point)
     }
 
-    /// https://html.spec.whatwg.org/multipage/#navigating-across-documents
+    /// <https://html.spec.whatwg.org/multipage/#navigating-across-documents>
     /// The entry point for content to notify that a new load has been requested
     /// for the given pipeline (specifically the "navigate" algorithm).
     fn handle_navigate(&self, parent_pipeline_id: PipelineId,
                               browsing_context_id: Option<BrowsingContextId>,
                               mut load_data: LoadData,
                               replace: bool) {
         let is_javascript = load_data.url.scheme() == "javascript";
         if is_javascript {
--- a/servo/components/script/textinput.rs
+++ b/servo/components/script/textinput.rs
@@ -67,17 +67,17 @@ pub struct TextInput<T: ClipboardProvide
     /// Beginning of selection range with edit_point as end that can span multiple lines.
     pub selection_begin: Option<TextPoint>,
     /// Is this a multiline input?
     multiline: bool,
     #[ignore_heap_size_of = "Can't easily measure this generic type"]
     clipboard_provider: T,
     /// The maximum number of UTF-16 code units this text input is allowed to hold.
     ///
-    /// https://html.spec.whatwg.org/multipage/#attr-fe-maxlength
+    /// <https://html.spec.whatwg.org/multipage/#attr-fe-maxlength>
     pub max_length: Option<usize>,
     pub min_length: Option<usize>,
     pub selection_direction: SelectionDirection,
 }
 
 /// Resulting action to be taken by the owner of a text input that is handling an event.
 pub enum KeyReaction {
     TriggerDefaultAction,
--- a/servo/components/script_traits/lib.rs
+++ b/servo/components/script_traits/lib.rs
@@ -153,17 +153,17 @@ pub struct LoadData {
     /// The referrer URL.
     pub referrer_url: Option<ServoUrl>,
 }
 
 /// The result of evaluating a javascript scheme url.
 #[derive(Clone, Debug, Deserialize, Serialize)]
 pub enum JsEvalResult {
     /// The js evaluation had a non-string result, 204 status code.
-    /// https://html.spec.whatwg.org/multipage/#navigate 12.11
+    /// <https://html.spec.whatwg.org/multipage/#navigate> 12.11
     NoContent,
     /// The js evaluation had a string result.
     Ok(Vec<u8>)
 }
 
 impl LoadData {
     /// Create a new `LoadData` object.
     pub fn new(url: ServoUrl,
@@ -216,18 +216,19 @@ pub enum DiscardBrowsingContext {
     /// Don't discard the browsing context
     No,
 }
 
 /// Is a document fully active, active or inactive?
 /// A document is active if it is the current active document in its session history,
 /// it is fuly active if it is active and all of its ancestors are active,
 /// and it is inactive otherwise.
-/// https://html.spec.whatwg.org/multipage/#active-document
-/// https://html.spec.whatwg.org/multipage/#fully-active
+///
+/// * <https://html.spec.whatwg.org/multipage/#active-document>
+/// * <https://html.spec.whatwg.org/multipage/#fully-active>
 #[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, HeapSizeOf, PartialEq, Serialize)]
 pub enum DocumentActivity {
     /// An inactive document
     Inactive,
     /// An active but not fully active document
     Active,
     /// A fully active document
     FullyActive,
@@ -397,17 +398,17 @@ pub enum TouchEventType {
     /// A touch point was removed from the screen.
     Up,
     /// The system stopped tracking a touch point.
     Cancel,
 }
 
 /// An opaque identifier for a touch point.
 ///
-/// http://w3c.github.io/touch-events/#widl-Touch-identifier
+/// <http://w3c.github.io/touch-events/#widl-Touch-identifier>
 #[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
 pub struct TouchId(pub i32);
 
 /// The mouse button involved in the event.
 #[derive(Clone, Copy, Debug, Deserialize, Serialize)]
 pub enum MouseButton {
     /// The left mouse button.
     Left,
@@ -717,17 +718,17 @@ pub struct ScrollState {
     /// The scrolling offset of this stacking context.
     pub scroll_offset: Vector2D<f32>,
 }
 
 /// Data about the window size.
 #[derive(Clone, Copy, Deserialize, HeapSizeOf, Serialize)]
 pub struct WindowSizeData {
     /// The size of the initial layout viewport, before parsing an
-    /// http://www.w3.org/TR/css-device-adapt/#initial-viewport
+    /// <http://www.w3.org/TR/css-device-adapt/#initial-viewport>
     pub initial_viewport: TypedSize2D<f32, CSSPixel>,
 
     /// The resolution of the window in dppx, not including any "pinch zoom" factor.
     pub device_pixel_ratio: ScaleFactor<f32, CSSPixel, DevicePixel>,
 }
 
 /// The type of window size change.
 #[derive(Clone, Copy, Deserialize, Eq, HeapSizeOf, PartialEq, Serialize)]
@@ -848,33 +849,34 @@ pub enum PaintWorkletError {
 impl From<RecvTimeoutError> for PaintWorkletError {
     fn from(_: RecvTimeoutError) -> PaintWorkletError {
         PaintWorkletError::Timeout
     }
 }
 
 /// Execute paint code in the worklet thread pool.
 pub trait Painter: SpeculativePainter {
-    /// https://drafts.css-houdini.org/css-paint-api/#draw-a-paint-image
+    /// <https://drafts.css-houdini.org/css-paint-api/#draw-a-paint-image>
     fn draw_a_paint_image(&self,
                           size: TypedSize2D<f32, CSSPixel>,
                           zoom: ScaleFactor<f32, CSSPixel, DevicePixel>,
                           properties: Vec<(Atom, String)>,
                           arguments: Vec<String>)
                           -> DrawAPaintImageResult;
 }
 
 impl fmt::Debug for Painter {
     fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
         fmt.debug_tuple("Painter").field(&format_args!("..")).finish()
     }
 }
 
 /// The result of executing paint code: the image together with any image URLs that need to be loaded.
-/// TODO: this should return a WR display list. https://github.com/servo/servo/issues/17497
+///
+/// TODO: this should return a WR display list. <https://github.com/servo/servo/issues/17497>
 #[derive(Clone, Debug, Deserialize, HeapSizeOf, Serialize)]
 pub struct DrawAPaintImageResult {
     /// The image height
     pub width: u32,
     /// The image width
     pub height: u32,
     /// The image format
     pub format: PixelFormat,
--- a/servo/components/script_traits/script_msg.rs
+++ b/servo/components/script_traits/script_msg.rs
@@ -132,17 +132,17 @@ pub enum ScriptMsg {
     SetDocumentState(DocumentState),
     /// Update the pipeline Url, which can change after redirections.
     SetFinalUrl(ServoUrl),
     /// Check if an alert dialog box should be presented
     Alert(String, IpcSender<bool>),
     /// Scroll a page in a window
     ScrollFragmentPoint(ClipId, Point2D<f32>, bool),
     /// Set title of current page
-    /// https://html.spec.whatwg.org/multipage/#document.title
+    /// <https://html.spec.whatwg.org/multipage/#document.title>
     SetTitle(Option<String>),
     /// Send a key event
     SendKeyEvent(Option<char>, Key, KeyState, KeyModifiers),
     /// Get Window Informations size and position
     GetClientWindow(IpcSender<(Size2D<u32>, Point2D<i32>)>),
     /// Move the window to a point
     MoveTo(Point2D<i32>),
     /// Resize the window to size
--- a/servo/components/selectors/build.rs
+++ b/servo/components/selectors/build.rs
@@ -19,17 +19,17 @@ fn main() {
     let mut set = phf_codegen::Set::new();
     for name in ASCII_CASE_INSENSITIVE_HTML_ATTRIBUTES.split_whitespace() {
         set.entry(name);
     }
     set.build(&mut file).unwrap();
     write!(&mut file, "; &SET }}").unwrap();
 }
 
-/// https://html.spec.whatwg.org/multipage/#selectors
+/// <https://html.spec.whatwg.org/multipage/#selectors>
 static ASCII_CASE_INSENSITIVE_HTML_ATTRIBUTES: &'static str = r#"
     accept
     accept-charset
     align
     alink
     axis
     bgcolor
     charset
--- a/servo/components/selectors/parser.rs
+++ b/servo/components/selectors/parser.rs
@@ -77,17 +77,17 @@ macro_rules! with_all_bounds {
         [ $( $CommonBounds: tt )* ]
         [ $( $FromStr: tt )* ]
     ) => {
         /// This trait allows to define the parser implementation in regards
         /// of pseudo-classes/elements
         ///
         /// NB: We need Clone so that we can derive(Clone) on struct with that
         /// are parameterized on SelectorImpl. See
-        /// https://github.com/rust-lang/rust/issues/26925
+        /// <https://github.com/rust-lang/rust/issues/26925>
         pub trait SelectorImpl: Clone + Sized + 'static {
             type AttrValue: $($InSelector)*;
             type Identifier: $($InSelector)* + PrecomputedHash;
             type ClassName: $($InSelector)* + PrecomputedHash;
             type LocalName: $($InSelector)* + Borrow<Self::BorrowedLocalName> + PrecomputedHash;
             type NamespaceUrl: $($CommonBounds)* + Default + Borrow<Self::BorrowedNamespaceUrl> + PrecomputedHash;
             type NamespacePrefix: $($InSelector)* + Default;
             type BorrowedNamespaceUrl: ?Sized + Eq;
@@ -172,17 +172,17 @@ pub trait Parser<'i> {
     }
 }
 
 #[derive(Clone, Debug, Eq, PartialEq)]
 pub struct SelectorList<Impl: SelectorImpl>(pub SmallVec<[Selector<Impl>; 1]>);
 
 impl<Impl: SelectorImpl> SelectorList<Impl> {
     /// Parse a comma-separated list of Selectors.
-    /// https://drafts.csswg.org/selectors/#grouping
+    /// <https://drafts.csswg.org/selectors/#grouping>
     ///
     /// Return the Selectors or Err if there is an invalid selector.
     pub fn parse<'i, 't, P>(parser: &P, input: &mut CssParser<'i, 't>)
                             -> Result<Self, ParseError<'i, P::Error>>
     where P: Parser<'i, Impl=Impl> {
         let mut values = SmallVec::new();
         loop {
             values.push(input.parse_until_before(Delimiter::Comma, |input| parse_selector(parser, input))?);
@@ -893,17 +893,17 @@ impl ToCss for Combinator {
     }
 }
 
 impl<Impl: SelectorImpl> ToCss for Component<Impl> {
     fn to_css<W>(&self, dest: &mut W) -> fmt::Result where W: fmt::Write {
         use self::Component::*;
 
         /// Serialize <an+b> values (part of the CSS Syntax spec, but currently only used here).
-        /// https://drafts.csswg.org/css-syntax-3/#serialize-an-anb-value
+        /// <https://drafts.csswg.org/css-syntax-3/#serialize-an-anb-value>
         fn write_affine<W>(dest: &mut W, a: i32, b: i32) -> fmt::Result where W: fmt::Write {
             match (a, b) {
                 (0, 0) => dest.write_char('0'),
 
                 (1, 0) => dest.write_char('n'),
                 (_, 0) => write!(dest, "{}n", a),
 
                 (0, _) => write!(dest, "{}", b),
--- a/servo/components/servo_arc/lib.rs
+++ b/servo/components/servo_arc/lib.rs
@@ -4,24 +4,25 @@
 //
 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
 //! Fork of Arc for Servo. This has the following advantages over std::Arc:
+//!
 //! * We don't waste storage on the weak reference count.
 //! * We don't do extra RMU operations to handle the possibility of weak references.
 //! * We can experiment with arena allocation (todo).
 //! * We can add methods to support our custom use cases [1].
 //! * We have support for dynamically-sized types (see from_header_and_iter).
 //! * We have support for thin arcs to unsized types (see ThinArc).
 //!
-//! [1] https://bugzilla.mozilla.org/show_bug.cgi?id=1360883
+//! [1]: https://bugzilla.mozilla.org/show_bug.cgi?id=1360883
 
 // The semantics of Arc are alread documented in the Rust docs, so we don't
 // duplicate those here.
 #![allow(missing_docs)]
 
 extern crate nodrop;
 #[cfg(feature = "servo")] extern crate serde;
 extern crate stable_deref_trait;
@@ -78,17 +79,17 @@ const MAX_REFCOUNT: usize = (isize::MAX)
 /// here to get the same effect. Gankro is working on this in [1].
 ///
 /// It's unfortunate that this needs to infect all the caller types
 /// with 'static. It would be nice to just use a &() and a PhantomData<T>
 /// instead, but then the compiler can't determine whether the &() should
 /// be thin or fat (which depends on whether or not T is sized). Given
 /// that this is all a temporary hack, this restriction is fine for now.
 ///
-/// [1] https://github.com/rust-lang/rust/issues/27730
+/// [1]: https://github.com/rust-lang/rust/issues/27730
 pub struct NonZeroPtrMut<T: ?Sized + 'static>(&'static mut T);
 impl<T: ?Sized> NonZeroPtrMut<T> {
     pub fn new(ptr: *mut T) -> Self {
         assert!(!(ptr as *mut u8).is_null());
         NonZeroPtrMut(unsafe { mem::transmute(ptr) })
     }
 
     pub fn ptr(&self) -> *mut T {
--- a/servo/components/style/attr.rs
+++ b/servo/components/style/attr.rs
@@ -388,17 +388,17 @@ impl PartialEq<Atom> for AttrValue {
     fn eq(&self, other: &Atom) -> bool {
         match *self {
             AttrValue::Atom(ref value) => value == other,
             _ => other == &**self,
         }
     }
 }
 
-/// https://html.spec.whatwg.org/multipage/#rules-for-parsing-non-zero-dimension-values
+/// <https://html.spec.whatwg.org/multipage/#rules-for-parsing-non-zero-dimension-values>
 pub fn parse_nonzero_length(value: &str) -> LengthOrPercentageOrAuto {
     match parse_length(value) {
         LengthOrPercentageOrAuto::Length(x) if x == Au::zero() => LengthOrPercentageOrAuto::Auto,
         LengthOrPercentageOrAuto::Percentage(x) if x == 0. => LengthOrPercentageOrAuto::Auto,
         x => x,
     }
 }
 
--- a/servo/components/style/counter_style/mod.rs
+++ b/servo/components/style/counter_style/mod.rs
@@ -224,65 +224,65 @@ macro_rules! counter_style_descriptors {
                 )+
                 dest.write_str("}")
             }
         }
     }
 }
 
 counter_style_descriptors! {
-    /// https://drafts.csswg.org/css-counter-styles/#counter-style-system
+    /// <https://drafts.csswg.org/css-counter-styles/#counter-style-system>
     "system" system / eCSSCounterDesc_System: System = {
         System::Symbolic
     }
 
-    /// https://drafts.csswg.org/css-counter-styles/#counter-style-negative
+    /// <https://drafts.csswg.org/css-counter-styles/#counter-style-negative>
     "negative" negative / eCSSCounterDesc_Negative: Negative = {
         Negative(Symbol::String("-".to_owned()), None)
     }
 
-    /// https://drafts.csswg.org/css-counter-styles/#counter-style-prefix
+    /// <https://drafts.csswg.org/css-counter-styles/#counter-style-prefix>
     "prefix" prefix / eCSSCounterDesc_Prefix: Symbol = {
         Symbol::String("".to_owned())
     }
 
-    /// https://drafts.csswg.org/css-counter-styles/#counter-style-suffix
+    /// <https://drafts.csswg.org/css-counter-styles/#counter-style-suffix>
     "suffix" suffix / eCSSCounterDesc_Suffix: Symbol = {
         Symbol::String(". ".to_owned())
     }
 
-    /// https://drafts.csswg.org/css-counter-styles/#counter-style-range
+    /// <https://drafts.csswg.org/css-counter-styles/#counter-style-range>
     "range" range / eCSSCounterDesc_Range: Ranges = {
         Ranges(Vec::new())  // Empty Vec represents 'auto'
     }
 
-    /// https://drafts.csswg.org/css-counter-styles/#counter-style-pad
+    /// <https://drafts.csswg.org/css-counter-styles/#counter-style-pad>
     "pad" pad / eCSSCounterDesc_Pad: Pad = {
         Pad(0, Symbol::String("".to_owned()))
     }
 
-    /// https://drafts.csswg.org/css-counter-styles/#counter-style-fallback
+    /// <https://drafts.csswg.org/css-counter-styles/#counter-style-fallback>
     "fallback" fallback / eCSSCounterDesc_Fallback: Fallback = {
         // FIXME https://bugzilla.mozilla.org/show_bug.cgi?id=1359323 use atom!()
         Fallback(CustomIdent(Atom::from("decimal")))
     }
 
-    /// https://drafts.csswg.org/css-counter-styles/#descdef-counter-style-symbols
+    /// <https://drafts.csswg.org/css-counter-styles/#descdef-counter-style-symbols>
     "symbols" symbols / eCSSCounterDesc_Symbols: Symbols = !
 
-    /// https://drafts.csswg.org/css-counter-styles/#descdef-counter-style-additive-symbols
+    /// <https://drafts.csswg.org/css-counter-styles/#descdef-counter-style-additive-symbols>
     "additive-symbols" additive_symbols / eCSSCounterDesc_AdditiveSymbols: AdditiveSymbols = !
 
-    /// https://drafts.csswg.org/css-counter-styles/#counter-style-speak-as
+    /// <https://drafts.csswg.org/css-counter-styles/#counter-style-speak-as>
     "speak-as" speak_as / eCSSCounterDesc_SpeakAs: SpeakAs = {
         SpeakAs::Auto
     }
 }
 
-/// https://drafts.csswg.org/css-counter-styles/#counter-style-system
+/// <https://drafts.csswg.org/css-counter-styles/#counter-style-system>
 #[derive(Clone, Debug)]
 pub enum System {
     /// 'cyclic'
     Cyclic,
     /// 'numeric'
     Numeric,
     /// 'alphabetic'
     Alphabetic,
@@ -338,17 +338,17 @@ impl ToCss for System {
             System::Extends(ref other) => {
                 dest.write_str("extends ")?;
                 other.to_css(dest)
             }
         }
     }
 }
 
-/// https://drafts.csswg.org/css-counter-styles/#typedef-symbol
+/// <https://drafts.csswg.org/css-counter-styles/#typedef-symbol>
 #[cfg_attr(feature = "gecko", derive(MallocSizeOf))]
 #[derive(Clone, Debug, Eq, PartialEq, ToComputedValue)]
 pub enum Symbol {
     /// <string>
     String(String),
     /// <ident>
     Ident(String),
     // Not implemented:
@@ -383,30 +383,30 @@ impl Symbol {
         match self {
             // Identifier is not allowed.
             &Symbol::Ident(_) => false,
             _ => true,
         }
     }
 }
 
-/// https://drafts.csswg.org/css-counter-styles/#counter-style-negative
+/// <https://drafts.csswg.org/css-counter-styles/#counter-style-negative>
 #[derive(Clone, Debug, ToCss)]
 pub struct Negative(pub Symbol, pub Option<Symbol>);
 
 impl Parse for Negative {
     fn parse<'i, 't>(context: &ParserContext, input: &mut Parser<'i, 't>) -> Result<Self, ParseError<'i>> {
         Ok(Negative(
             Symbol::parse(context, input)?,
             input.try(|input| Symbol::parse(context, input)).ok(),
         ))
     }
 }
 
-/// https://drafts.csswg.org/css-counter-styles/#counter-style-range
+/// <https://drafts.csswg.org/css-counter-styles/#counter-style-range>
 ///
 /// Empty Vec represents 'auto'
 #[derive(Clone, Debug)]
 pub struct Ranges(pub Vec<Range<Option<i32>>>);
 
 impl Parse for Ranges {
     fn parse<'i, 't>(_context: &ParserContext, input: &mut Parser<'i, 't>) -> Result<Self, ParseError<'i>> {
         if input.try(|input| input.expect_ident_matching("auto")).is_ok() {
@@ -462,43 +462,43 @@ where W: fmt::Write {
 fn bound_to_css<W>(range: Option<i32>, dest: &mut W) -> fmt::Result where W: fmt::Write {
     if let Some(finite) = range {
         finite.to_css(dest)
     } else {
         dest.write_str("infinite")
     }
 }
 
-/// https://drafts.csswg.org/css-counter-styles/#counter-style-pad
+/// <https://drafts.csswg.org/css-counter-styles/#counter-style-pad>
 #[derive(Clone, Debug, ToCss)]
 pub struct Pad(pub u32, pub Symbol);
 
 impl Parse for Pad {
     fn parse<'i, 't>(context: &ParserContext, input: &mut Parser<'i, 't>) -> Result<Self, ParseError<'i>> {
         let pad_with = input.try(|input| Symbol::parse(context, input));
         let min_length = input.expect_integer()?;
         if min_length < 0 {
             return Err(input.new_custom_error(StyleParseErrorKind::UnspecifiedError))
         }
         let pad_with = pad_with.or_else(|_| Symbol::parse(context, input))?;
         Ok(Pad(min_length as u32, pad_with))
     }
 }
 
-/// https://drafts.csswg.org/css-counter-styles/#counter-style-fallback
+/// <https://drafts.csswg.org/css-counter-styles/#counter-style-fallback>
 #[derive(Clone, Debug, ToCss)]
 pub struct Fallback(pub CustomIdent);
 
 impl Parse for Fallback {
     fn parse<'i, 't>(_context: &ParserContext, input: &mut Parser<'i, 't>) -> Result<Self, ParseError<'i>> {
         parse_counter_style_name(input).map(Fallback)
     }
 }
 
-/// https://drafts.csswg.org/css-counter-styles/#descdef-counter-style-symbols
+/// <https://drafts.csswg.org/css-counter-styles/#descdef-counter-style-symbols>
 #[cfg_attr(feature = "gecko", derive(MallocSizeOf))]
 #[derive(Clone, Debug, Eq, PartialEq, ToComputedValue)]
 pub struct Symbols(pub Vec<Symbol>);
 
 impl Parse for Symbols {
     fn parse<'i, 't>(context: &ParserContext, input: &mut Parser<'i, 't>) -> Result<Self, ParseError<'i>> {
         let mut symbols = Vec::new();
         loop {
@@ -523,17 +523,17 @@ impl ToCss for Symbols {
         for item in iter {
             dest.write_char(' ')?;
             item.to_css(dest)?;
         }
         Ok(())
     }
 }
 
-/// https://drafts.csswg.org/css-counter-styles/#descdef-counter-style-additive-symbols
+/// <https://drafts.csswg.org/css-counter-styles/#descdef-counter-style-additive-symbols>
 #[derive(Clone, Debug, ToCss)]
 pub struct AdditiveSymbols(pub Vec<AdditiveTuple>);
 
 impl Parse for AdditiveSymbols {
     fn parse<'i, 't>(context: &ParserContext, input: &mut Parser<'i, 't>) -> Result<Self, ParseError<'i>> {
         let tuples = Vec::<AdditiveTuple>::parse(context, input)?;
         // FIXME maybe? https://github.com/w3c/csswg-drafts/issues/1220
         if tuples.windows(2).any(|window| window[0].weight <= window[1].weight) {
@@ -566,17 +566,17 @@ impl Parse for AdditiveTuple {
         let symbol = symbol.or_else(|_| Symbol::parse(context, input))?;
         Ok(AdditiveTuple {
             weight: weight as u32,
             symbol: symbol,
         })
     }
 }
 
-/// https://drafts.csswg.org/css-counter-styles/#counter-style-speak-as
+/// <https://drafts.csswg.org/css-counter-styles/#counter-style-speak-as>
 #[derive(Clone, Debug, ToCss)]
 pub enum SpeakAs {
     /// auto
     Auto,
     /// bullets
     Bullets,
     /// numbers
     Numbers,
--- a/servo/components/style/custom_properties.rs
+++ b/servo/components/style/custom_properties.rs
@@ -23,17 +23,17 @@ use style_traits::{ToCss, StyleParseErro
 
 /// A custom property name is just an `Atom`.
 ///
 /// Note that this does not include the `--` prefix
 pub type Name = Atom;
 
 /// Parse a custom property name.
 ///
-/// https://drafts.csswg.org/css-variables/#typedef-custom-property-name
+/// <https://drafts.csswg.org/css-variables/#typedef-custom-property-name>
 pub fn parse_name(s: &str) -> Result<&str, ()> {
     if s.starts_with("--") {
         Ok(&s[2..])
     } else {
         Err(())
     }
 }
 
@@ -312,17 +312,17 @@ fn parse_self_contained_declaration_valu
         if css.ends_with("\\") && matches!(missing_closing_characters.as_bytes()[0], b'"' | b'\'') {
             css.to_mut().pop();
         }
         css.to_mut().push_str(&missing_closing_characters);
     }
     Ok((first, css, last))
 }
 
-/// https://drafts.csswg.org/css-syntax-3/#typedef-declaration-value
+/// <https://drafts.csswg.org/css-syntax-3/#typedef-declaration-value>
 fn parse_declaration_value<'i, 't>(
     input: &mut Parser<'i, 't>,
     references: Option<&mut PrecomputedHashSet<Name>>,
     missing_closing_characters: &mut String
 ) -> Result<(TokenSerializationType, TokenSerializationType), ParseError<'i>> {
     input.parse_until_before(Delimiter::Bang | Delimiter::Semicolon, |input| {
         // Need at least one token
         let start = input.state();
--- a/servo/components/style/dom_apis.rs
+++ b/servo/components/style/dom_apis.rs
@@ -4,17 +4,17 @@
 
 //! Generic implementations of some DOM APIs so they can be shared between Servo
 //! and Gecko.
 
 use context::QuirksMode;
 use selectors::{Element, NthIndexCache, SelectorList};
 use selectors::matching::{self, MatchingContext, MatchingMode};
 
-/// https://dom.spec.whatwg.org/#dom-element-matches
+/// <https://dom.spec.whatwg.org/#dom-element-matches>
 pub fn element_matches<E>(
     element: &E,
     selector_list: &SelectorList<E::Impl>,
     quirks_mode: QuirksMode,
 ) -> bool
 where
     E: Element,
 {
@@ -23,17 +23,17 @@ where
         None,
         None,
         quirks_mode,
     );
     context.scope_element = Some(element.opaque());
     matching::matches_selector_list(selector_list, element, &mut context)
 }
 
-/// https://dom.spec.whatwg.org/#dom-element-closest
+/// <https://dom.spec.whatwg.org/#dom-element-closest>
 pub fn element_closest<E>(
     element: E,
     selector_list: &SelectorList<E::Impl>,
     quirks_mode: QuirksMode,
 ) -> Option<E>
 where
     E: Element,
 {
--- a/servo/components/style/element_state.rs
+++ b/servo/components/style/element_state.rs
@@ -13,45 +13,45 @@ bitflags! {
     /// Please keep in that order in order for this to be easily auditable.
     ///
     /// TODO(emilio): We really really want to use the NS_EVENT_STATE bindings
     /// for this.
     #[cfg_attr(feature = "gecko", derive(MallocSizeOf))]
     #[cfg_attr(feature = "servo", derive(HeapSizeOf))]
     pub flags ElementState: u64 {
         /// The mouse is down on this element.
-        /// https://html.spec.whatwg.org/multipage/#selector-active
+        /// <https://html.spec.whatwg.org/multipage/#selector-active>
         /// FIXME(#7333): set/unset this when appropriate
         const IN_ACTIVE_STATE = 1 << 0,
         /// This element has focus.
-        /// https://html.spec.whatwg.org/multipage/#selector-focus
+        /// <https://html.spec.whatwg.org/multipage/#selector-focus>
         const IN_FOCUS_STATE = 1 << 1,
         /// The mouse is hovering over this element.
-        /// https://html.spec.whatwg.org/multipage/#selector-hover
+        /// <https://html.spec.whatwg.org/multipage/#selector-hover>
         const IN_HOVER_STATE = 1 << 2,
         /// Content is enabled (and can be disabled).
-        /// http://www.whatwg.org/html/#selector-enabled
+        /// <http://www.whatwg.org/html/#selector-enabled>
         const IN_ENABLED_STATE = 1 << 3,
         /// Content is disabled.
-        /// http://www.whatwg.org/html/#selector-disabled
+        /// <http://www.whatwg.org/html/#selector-disabled>
         const IN_DISABLED_STATE = 1 << 4,
         /// Content is checked.
-        /// https://html.spec.whatwg.org/multipage/#selector-checked
+        /// <https://html.spec.whatwg.org/multipage/#selector-checked>
         const IN_CHECKED_STATE = 1 << 5,
-        /// https://html.spec.whatwg.org/multipage/#selector-indeterminate
+        /// <https://html.spec.whatwg.org/multipage/#selector-indeterminate>
         const IN_INDETERMINATE_STATE = 1 << 6,
-        /// https://html.spec.whatwg.org/multipage/#selector-placeholder-shown
+        /// <https://html.spec.whatwg.org/multipage/#selector-placeholder-shown>
         const IN_PLACEHOLDER_SHOWN_STATE = 1 << 7,
-        /// https://html.spec.whatwg.org/multipage/#selector-target
+        /// <https://html.spec.whatwg.org/multipage/#selector-target>
         const IN_TARGET_STATE = 1 << 8,
-        /// https://fullscreen.spec.whatwg.org/#%3Afullscreen-pseudo-class
+        /// <https://fullscreen.spec.whatwg.org/#%3Afullscreen-pseudo-class>
         const IN_FULLSCREEN_STATE = 1 << 9,
-        /// https://html.spec.whatwg.org/multipage/#selector-valid
+        /// <https://html.spec.whatwg.org/multipage/#selector-valid>
         const IN_VALID_STATE = 1 << 10,
-        /// https://html.spec.whatwg.org/multipage/#selector-invalid
+        /// <https://html.spec.whatwg.org/multipage/#selector-invalid>
         const IN_INVALID_STATE = 1 << 11,
         /// Non-standard: https://developer.mozilla.org/en-US/docs/Web/CSS/:-moz-ui-valid
         const IN_MOZ_UI_VALID_STATE = 1 << 12,
         /// Non-standard: https://developer.mozilla.org/en-US/docs/Web/CSS/:-moz-ui-invalid
         const IN_MOZ_UI_INVALID_STATE = 1 << 13,
         /// Non-standard: https://developer.mozilla.org/en-US/docs/Web/CSS/:-moz-broken
         const IN_BROKEN_STATE = 1 << 14,
         /// Non-standard: https://developer.mozilla.org/en-US/docs/Web/CSS/:-moz-user-disabled
@@ -61,41 +61,41 @@ bitflags! {
         /// Non-standard: https://developer.mozilla.org/en-US/docs/Web/CSS/:-moz-loading
         const IN_LOADING_STATE = 1 << 17,
         /// Non-standard: https://developer.mozilla.org/en-US/docs/Web/CSS/:-moz-handler-blocked
         const IN_HANDLER_BLOCKED_STATE = 1 << 18,
         /// Non-standard: https://developer.mozilla.org/en-US/docs/Web/CSS/:-moz-handler-disabled
         const IN_HANDLER_DISABLED_STATE = 1 << 19,
         /// Non-standard: https://developer.mozilla.org/en-US/docs/Web/CSS/:-moz-handler-crashed
         const IN_HANDLER_CRASHED_STATE = 1 << 20,
-        /// https://html.spec.whatwg.org/multipage/#selector-required
+        /// <https://html.spec.whatwg.org/multipage/#selector-required>
         const IN_REQUIRED_STATE = 1 << 21,
-        /// https://html.spec.whatwg.org/multipage/#selector-optional
+        /// <https://html.spec.whatwg.org/multipage/#selector-optional>
         const IN_OPTIONAL_STATE = 1 << 22,
-        /// https://html.spec.whatwg.org/multipage/#selector-read-write
+        /// <https://html.spec.whatwg.org/multipage/#selector-read-write>
         const IN_READ_WRITE_STATE = 1 << 22,
         /// Non-standard: Older custom-elements spec.
         const IN_UNRESOLVED_STATE = 1 << 23,
-        /// https://html.spec.whatwg.org/multipage/#selector-visited
+        /// <https://html.spec.whatwg.org/multipage/#selector-visited>
         const IN_VISITED_STATE = 1 << 24,
-        /// https://html.spec.whatwg.org/multipage/#selector-link
+        /// <https://html.spec.whatwg.org/multipage/#selector-link>
         const IN_UNVISITED_STATE = 1 << 25,
-        /// https://drafts.csswg.org/selectors-4/#the-any-link-pseudo
+        /// <https://drafts.csswg.org/selectors-4/#the-any-link-pseudo>
         const IN_VISITED_OR_UNVISITED_STATE = IN_VISITED_STATE.bits | IN_UNVISITED_STATE.bits,
         /// Non-standard: https://developer.mozilla.org/en-US/docs/Web/CSS/:-moz-drag-over
         const IN_DRAGOVER_STATE = 1 << 26,
-        /// https://html.spec.whatwg.org/multipage/#selector-in-range
+        /// <https://html.spec.whatwg.org/multipage/#selector-in-range>
         const IN_INRANGE_STATE = 1 << 27,
-        /// https://html.spec.whatwg.org/multipage/#selector-out-of-range
+        /// <https://html.spec.whatwg.org/multipage/#selector-out-of-range>
         const IN_OUTOFRANGE_STATE = 1 << 28,
-        /// https://html.spec.whatwg.org/multipage/#selector-read-only
+        /// <https://html.spec.whatwg.org/multipage/#selector-read-only>
         const IN_MOZ_READONLY_STATE = 1 << 29,
-        /// https://html.spec.whatwg.org/multipage/#selector-read-write
+        /// <https://html.spec.whatwg.org/multipage/#selector-read-write>
         const IN_MOZ_READWRITE_STATE = 1 << 30,
-        /// https://html.spec.whatwg.org/multipage/#selector-default
+        /// <https://html.spec.whatwg.org/multipage/#selector-default>
         const IN_DEFAULT_STATE = 1 << 31,
         /// Non-standard: https://developer.mozilla.org/en-US/docs/Web/CSS/:-moz-submit-invalid
         const IN_MOZ_SUBMITINVALID_STATE = 1 << 32,
         /// Non-standard & undocumented.
         const IN_OPTIMUM_STATE = 1 << 33,
         /// Non-standard & undocumented.
         const IN_SUB_OPTIMUM_STATE = 1 << 34,
         /// Non-standard & undocumented.
@@ -109,17 +109,17 @@ bitflags! {
         /// Non-standard: https://developer.mozilla.org/en-US/docs/Web/CSS/:-moz-focusring
         const IN_FOCUSRING_STATE = 1 << 39,
         /// Non-standard & undocumented.
         const IN_HANDLER_CLICK_TO_PLAY_STATE = 1 << 40,
         /// Non-standard & undocumented.
         const IN_HANDLER_VULNERABLE_UPDATABLE_STATE = 1 << 41,
         /// Non-standard & undocumented.
         const IN_HANDLER_VULNERABLE_NO_UPDATE_STATE = 1 << 42,
-        /// https://drafts.csswg.org/selectors-4/#the-focus-within-pseudo
+        /// <https://drafts.csswg.org/selectors-4/#the-focus-within-pseudo>
         const IN_FOCUS_WITHIN_STATE = 1 << 43,
         /// :dir matching; the states are used for dynamic change detection.
         /// State that elements that match :dir(ltr) are in.
         const IN_LTR_STATE = 1 << 44,
         /// State that elements that match :dir(rtl) are in.
         const IN_RTL_STATE = 1 << 45,
         /// State that HTML elements that have a "dir" attr are in.
         const IN_HAS_DIR_ATTR_STATE = 1 << 46,
--- a/servo/components/style/font_face.rs
+++ b/servo/components/style/font_face.rs
@@ -38,17 +38,17 @@ pub enum Source {
 
 impl OneOrMoreSeparated for Source {
     type S = Comma;
 }
 
 /// A `UrlSource` represents a font-face source that has been specified with a
 /// `url()` function.
 ///
-/// https://drafts.csswg.org/css-fonts/#src-desc
+/// <https://drafts.csswg.org/css-fonts/#src-desc>
 #[derive(Clone, Debug, Eq, PartialEq)]
 #[cfg_attr(feature = "servo", derive(Deserialize, Serialize))]
 pub struct UrlSource {
     /// The specified url.
     pub url: SpecifiedUrl,
     /// The format hints specified with the `format()` function.
     pub format_hints: Vec<String>,
 }
@@ -230,17 +230,17 @@ macro_rules! is_descriptor_enabled {
 }
 
 macro_rules! font_face_descriptors_common {
     (
         $( #[$doc: meta] $name: tt $ident: ident / $gecko_ident: ident: $ty: ty, )*
     ) => {
         /// Data inside a `@font-face` rule.
         ///
-        /// https://drafts.csswg.org/css-fonts/#font-face-rule
+        /// <https://drafts.csswg.org/css-fonts/#font-face-rule>
         #[derive(Clone, Debug, Eq, PartialEq)]
         pub struct FontFaceRuleData {
             $(
                 #[$doc]
                 pub $ident: Option<$ty>,
             )*
             /// Line and column of the @font-face rule source code.
             pub source_location: SourceLocation,
--- a/servo/components/style/gecko/media_queries.rs
+++ b/servo/components/style/gecko/media_queries.rs
@@ -52,17 +52,17 @@ pub struct Device {
     /// When computing the style of the root element, there can't be any
     /// other style being computed at the same time, given we need the style of
     /// the parent to compute everything else. So it is correct to just use
     /// a relaxed atomic here.
     root_font_size: AtomicIsize,
     /// The body text color, stored as an `nscolor`, used for the "tables
     /// inherit from body" quirk.
     ///
-    /// https://quirks.spec.whatwg.org/#the-tables-inherit-color-from-body-quirk
+    /// <https://quirks.spec.whatwg.org/#the-tables-inherit-color-from-body-quirk>
     body_text_color: AtomicUsize,
     /// Whether any styles computed in the document relied on the root font-size
     /// by using rem units.
     used_root_font_size: AtomicBool,
     /// Whether any styles computed in the document relied on the viewport size
     /// by using vw/vh/vmin/vmax units.
     used_viewport_size: AtomicBool,
 }
@@ -113,17 +113,17 @@ impl Device {
 
     /// Set the font size of the root element (for rem)
     pub fn set_root_font_size(&self, size: Au) {
         self.root_font_size.store(size.0 as isize, Ordering::Relaxed)
     }
 
     /// Sets the body text color for the "inherit color from body" quirk.
     ///
-    /// https://quirks.spec.whatwg.org/#the-tables-inherit-color-from-body-quirk
+    /// <https://quirks.spec.whatwg.org/#the-tables-inherit-color-from-body-quirk>
     pub fn set_body_text_color(&self, color: RGBA) {
         self.body_text_color.store(convert_rgba_to_nscolor(&color) as usize, Ordering::Relaxed)
     }
 
     /// Returns the body text color.
     pub fn body_text_color(&self) -> RGBA {
         convert_nscolor_to_rgba(self.body_text_color.load(Ordering::Relaxed) as u32)
     }
--- a/servo/components/style/gecko/selector_parser.rs
+++ b/servo/components/style/gecko/selector_parser.rs
@@ -160,17 +160,17 @@ impl NonTSPseudoClass {
             &NonTSPseudoClass::Fullscreen =>
                 unsafe { mozilla::StylePrefs_sUnprefixedFullscreenApiEnabled },
             // Otherwise, a pseudo-class is enabled in content when it
             // doesn't have any enabled flag.
             _ => !self.has_any_flag(PSEUDO_CLASS_ENABLED_IN_UA_SHEETS_AND_CHROME),
         }
     }
 
-    /// https://drafts.csswg.org/selectors-4/#useraction-pseudos
+    /// <https://drafts.csswg.org/selectors-4/#useraction-pseudos>
     ///
     /// We intentionally skip the link-related ones.
     pub fn is_safe_user_action_state(&self) -> bool {
         matches!(*self, NonTSPseudoClass::Hover |
                         NonTSPseudoClass::Active |
                         NonTSPseudoClass::Focus)
     }
 
--- a/servo/components/style/media_queries.rs
+++ b/servo/components/style/media_queries.rs
@@ -42,25 +42,25 @@ impl ToCss for MediaList {
 
 impl MediaList {
     /// Create an empty MediaList.
     pub fn empty() -> Self {
         MediaList { media_queries: vec![] }
     }
 }
 
-/// https://drafts.csswg.org/mediaqueries/#mq-prefix
+/// <https://drafts.csswg.org/mediaqueries/#mq-prefix>
 #[cfg_attr(feature = "servo", derive(HeapSizeOf))]
 #[derive(Clone, Copy, Debug, Eq, PartialEq, ToCss)]
 pub enum Qualifier {
     /// Hide a media query from legacy UAs:
-    /// https://drafts.csswg.org/mediaqueries/#mq-only
+    /// <https://drafts.csswg.org/mediaqueries/#mq-only>
     Only,
     /// Negate a media query:
-    /// https://drafts.csswg.org/mediaqueries/#mq-not
+    /// <https://drafts.csswg.org/mediaqueries/#mq-not>
     Not,
 }
 
 /// A [media query][mq].
 ///
 /// [mq]: https://drafts.csswg.org/mediaqueries/
 #[derive(Clone, Debug, PartialEq)]
 #[cfg_attr(feature = "servo", derive(HeapSizeOf))]
@@ -128,17 +128,17 @@ impl ToCss for MediaQuery {
         for expr in self.expressions.iter().skip(1) {
             dest.write_str(" and ")?;
             expr.to_css(dest)?;
         }
         Ok(())
     }
 }
 
-/// http://dev.w3.org/csswg/mediaqueries-3/#media0
+/// <http://dev.w3.org/csswg/mediaqueries-3/#media0>
 #[derive(Clone, Debug, Eq, PartialEq)]
 #[cfg_attr(feature = "servo", derive(HeapSizeOf))]
 pub enum MediaQueryType {
     /// A media type that matches every device.
     All,
     /// A specific media type.
     Concrete(MediaType),
 }
@@ -157,17 +157,17 @@ impl MediaQueryType {
     fn matches(&self, other: MediaType) -> bool {
         match *self {
             MediaQueryType::All => true,
             MediaQueryType::Concrete(ref known_type) => *known_type == other,
         }
     }
 }
 
-/// https://drafts.csswg.org/mediaqueries/#media-types
+/// <https://drafts.csswg.org/mediaqueries/#media-types>
 #[derive(Clone, Debug, Eq, PartialEq)]
 #[cfg_attr(feature = "servo", derive(HeapSizeOf))]
 pub struct MediaType(pub CustomIdent);
 
 impl MediaType {
     /// The `screen` media type.
     pub fn screen() -> Self {
         MediaType(CustomIdent(atom!("screen")))
@@ -236,17 +236,17 @@ impl MediaQuery {
     }
 }
 
 /// Parse a media query list from CSS.
 ///
 /// Always returns a media query list. If any invalid media query is found, the
 /// media query list is only filled with the equivalent of "not all", see:
 ///
-/// https://drafts.csswg.org/mediaqueries/#error-handling
+/// <https://drafts.csswg.org/mediaqueries/#error-handling>
 pub fn parse_media_query_list<R>(
     context: &ParserContext,
     input: &mut Parser,
     error_reporter: &R,
 ) -> MediaList
 where
     R: ParseErrorReporter,
 {
@@ -306,17 +306,17 @@ impl MediaList {
     }
 
     /// Whether this `MediaList` contains no media queries.
     pub fn is_empty(&self) -> bool {
         self.media_queries.is_empty()
     }
 
     /// Append a new media query item to the media list.
-    /// https://drafts.csswg.org/cssom/#dom-medialist-appendmedium
+    /// <https://drafts.csswg.org/cssom/#dom-medialist-appendmedium>
     ///
     /// Returns true if added, false if fail to parse the medium string.
     pub fn append_medium(&mut self, context: &ParserContext, new_medium: &str) -> bool {
         let mut input = ParserInput::new(new_medium);
         let mut parser = Parser::new(&mut input);
         let new_query = match MediaQuery::parse(&context, &mut parser) {
             Ok(query) => query,
             Err(_) => { return false; }
@@ -325,17 +325,17 @@ impl MediaList {
         // but it matches the behavior of Gecko and Edge.
         // See https://github.com/w3c/csswg-drafts/issues/697
         self.media_queries.retain(|query| query != &new_query);
         self.media_queries.push(new_query);
         true
     }
 
     /// Delete a media query from the media list.
-    /// https://drafts.csswg.org/cssom/#dom-medialist-deletemedium
+    /// <https://drafts.csswg.org/cssom/#dom-medialist-deletemedium>
     ///
     /// Returns true if found and deleted, false otherwise.
     pub fn delete_medium(&mut self, context: &ParserContext, old_medium: &str) -> bool {
         let mut input = ParserInput::new(old_medium);
         let mut parser = Parser::new(&mut input);
         let old_query = match MediaQuery::parse(context, &mut parser) {
             Ok(query) => query,
             Err(_) => { return false; }
--- a/servo/components/style/properties/declaration_block.rs
+++ b/servo/components/style/properties/declaration_block.rs
@@ -303,17 +303,17 @@ impl PropertyDeclarationBlock {
                 Importance::Normal
             };
             (decl, importance)
         })
     }
 
     /// Find the value of the given property in this block and serialize it
     ///
-    /// https://dev.w3.org/csswg/cssom/#dom-cssstyledeclaration-getpropertyvalue
+    /// <https://dev.w3.org/csswg/cssom/#dom-cssstyledeclaration-getpropertyvalue>
     pub fn property_value_to_css<W>(&self, property: &PropertyId, dest: &mut W) -> fmt::Result
         where W: fmt::Write,
     {
         // Step 1.1: done when parsing a string to PropertyId
 
         // Step 1.2
         match property.as_shorthand() {
             Ok(shorthand) => {
@@ -360,17 +360,17 @@ impl PropertyDeclarationBlock {
                 } else {
                     // Step 3
                     Ok(())
                 }
             }
         }
     }
 
-    /// https://dev.w3.org/csswg/cssom/#dom-cssstyledeclaration-getpropertypriority
+    /// <https://dev.w3.org/csswg/cssom/#dom-cssstyledeclaration-getpropertypriority>
     pub fn property_priority(&self, property: &PropertyId) -> Importance {
         // Step 1: done when parsing a string to PropertyId
 
         // Step 2
         match property.as_shorthand() {
             Ok(shorthand) => {
                 // Step 2.1 & 2.2 & 2.3
                 if shorthand.longhands().iter().all(|&l| {
@@ -555,17 +555,17 @@ impl PropertyDeclarationBlock {
                     self.declarations_importance.set(i as u32, is_important);
                     updated_at_least_one = true;
                 }
             }
         }
         updated_at_least_one
     }
 
-    /// https://dev.w3.org/csswg/cssom/#dom-cssstyledeclaration-removeproperty
+    /// <https://dev.w3.org/csswg/cssom/#dom-cssstyledeclaration-removeproperty>
     ///
     /// Returns whether any declaration was actually removed.
     pub fn remove_property(&mut self, property: &PropertyId) -> bool {
         if let PropertyId::Longhand(id) = *property {
             if !self.longhands.contains(id) {
                 return false
             }
         }
--- a/servo/components/style/properties/helpers/animated_properties.mako.rs
+++ b/servo/components/style/properties/helpers/animated_properties.mako.rs
@@ -52,17 +52,17 @@ use values::distance::{ComputeSquaredDis
 #[cfg(feature = "gecko")] use values::generics::FontSettingTag as GenericFontSettingTag;
 #[cfg(feature = "gecko")] use values::generics::FontSettingTagFloat;
 use values::generics::NonNegative;
 use values::generics::effects::Filter;
 use values::generics::position as generic_position;
 use values::generics::svg::{SVGLength,  SvgLengthOrPercentageOrNumber, SVGPaint};
 use values::generics::svg::{SVGPaintKind, SVGStrokeDashArray, SVGOpacity};
 
-/// https://drafts.csswg.org/css-transitions/#animtype-repeatable-list
+/// <https://drafts.csswg.org/css-transitions/#animtype-repeatable-list>
 pub trait RepeatableListAnimatable: Animate {}
 
 /// Returns true if this nsCSSPropertyID is one of the animatable properties.
 #[cfg(feature = "gecko")]
 pub fn nscsspropertyid_is_animatable(property: nsCSSPropertyID) -> bool {
     match property {
         % for prop in data.longhands + data.shorthands_except_all():
             % if prop.animatable:
@@ -650,17 +650,17 @@ macro_rules! repeated_vec_impl {
                 }).sum()
             }
         })*
     };
 }
 
 repeated_vec_impl!(SmallVec<[T; 1]>, Vec<T>);
 
-/// https://drafts.csswg.org/css-transitions/#animtype-visibility
+/// <https://drafts.csswg.org/css-transitions/#animtype-visibility>
 impl Animate for Visibility {
     #[inline]
     fn animate(&self, other: &Self, procedure: Procedure) -> Result<Self, ()> {
         let (this_weight, other_weight) = procedure.weights();
         match (*self, *other) {
             (Visibility::visible, _) => {
                 Ok(if this_weight > 0.0 { *self } else { *other })
             },
@@ -681,17 +681,17 @@ impl ComputeSquaredDistance for Visibili
 
 impl ToAnimatedZero for Visibility {
     #[inline]
     fn to_animated_zero(&self) -> Result<Self, ()> {
         Err(())
     }
 }
 
-/// https://drafts.csswg.org/css-transitions/#animtype-lpcalc
+/// <https://drafts.csswg.org/css-transitions/#animtype-lpcalc>
 impl Animate for CalcLengthOrPercentage {
     #[inline]
     fn animate(&self, other: &Self, procedure: Procedure) -> Result<Self, ()> {
         let animate_percentage_half = |this: Option<Percentage>, other: Option<Percentage>| {
             if this.is_none() && other.is_none() {
                 return Ok(None);
             }
             let this = this.unwrap_or_default();
@@ -733,17 +733,17 @@ impl ToAnimatedZero for LengthOrPercenta
     }
 }
 
 impl ToAnimatedZero for MaxLength {
     #[inline]
     fn to_animated_zero(&self) -> Result<Self, ()> { Err(()) }
 }
 
-/// http://dev.w3.org/csswg/css-transitions/#animtype-font-weight
+/// <http://dev.w3.org/csswg/css-transitions/#animtype-font-weight>
 impl Animate for FontWeight {
     #[inline]
     fn animate(&self, other: &Self, procedure: Procedure) -> Result<Self, ()> {
         let a = self.0 as f64;
         let b = other.0 as f64;
         const NORMAL: f64 = 400.;
         let (this_weight, other_weight) = procedure.weights();
         let weight = (a - NORMAL) * this_weight + (b - NORMAL) * other_weight + NORMAL;
@@ -754,17 +754,17 @@ impl Animate for FontWeight {
 
 impl ToAnimatedZero for FontWeight {
     #[inline]
     fn to_animated_zero(&self) -> Result<Self, ()> {
         Ok(FontWeight::normal())
     }
 }
 
-/// https://drafts.csswg.org/css-fonts/#font-stretch-prop
+/// <https://drafts.csswg.org/css-fonts/#font-stretch-prop>
 impl Animate for FontStretch {
     #[inline]
     fn animate(&self, other: &Self, procedure: Procedure) -> Result<Self, ()>
     {
         let from = f64::from(*self);
         let to = f64::from(*other);
         let normal = f64::from(FontStretch::normal);
         let (this_weight, other_weight) = procedure.weights();
@@ -781,17 +781,17 @@ impl ComputeSquaredDistance for FontStre
 }
 
 impl ToAnimatedZero for FontStretch {
     #[inline]
     fn to_animated_zero(&self) -> Result<Self, ()> { Err(()) }
 }
 
 /// We should treat font stretch as real number in order to interpolate this property.
-/// https://drafts.csswg.org/css-fonts-3/#font-stretch-animation
+/// <https://drafts.csswg.org/css-fonts-3/#font-stretch-animation>
 impl From<FontStretch> for f64 {
     fn from(stretch: FontStretch) -> f64 {
         use self::FontStretch::*;
         match stretch {
             ultra_condensed => 1.0,
             extra_condensed => 2.0,
             condensed       => 3.0,
             semi_condensed  => 4.0,
@@ -810,17 +810,17 @@ impl Into<FontStretch> for f64 {
         let index = (self + 0.5).floor().min(9.0).max(1.0);
         static FONT_STRETCH_ENUM_MAP: [FontStretch; 9] =
             [ ultra_condensed, extra_condensed, condensed, semi_condensed, normal,
               semi_expanded, expanded, extra_expanded, ultra_expanded ];
         FONT_STRETCH_ENUM_MAP[(index - 1.0) as usize]
     }
 }
 
-/// https://drafts.csswg.org/css-fonts-4/#font-variation-settings-def
+/// <https://drafts.csswg.org/css-fonts-4/#font-variation-settings-def>
 #[cfg(feature = "gecko")]
 impl Animate for FontVariationSettings {
     #[inline]
     fn animate(&self, other: &Self, procedure: Procedure) -> Result<Self, ()> {
         FontSettingTagIter::new(self, other)?
             .map(|r| r.and_then(|(st, ot)| st.animate(&ot, procedure)))
             .collect::<Result<Vec<FontSettingTag>, ()>>()
             .map(GenericFontSettings::Tag)
@@ -984,17 +984,17 @@ impl<'a> Iterator for FontSettingTagIter
             _ => Some(Err(())), // Mismatch number of unique tags or tag names.
         }
     }
 }
 
 impl<H, V> RepeatableListAnimatable for generic_position::Position<H, V>
     where H: RepeatableListAnimatable, V: RepeatableListAnimatable {}
 
-/// https://drafts.csswg.org/css-transitions/#animtype-rect
+/// <https://drafts.csswg.org/css-transitions/#animtype-rect>
 impl Animate for ClipRect {
     #[inline]
     fn animate(&self, other: &Self, procedure: Procedure) -> Result<Self, ()> {
         use values::computed::Length;
         let animate_component = |this: &Option<Length>, other: &Option<Length>| {
             match (this.animate(other, procedure)?, procedure) {
                 (None, Procedure::Interpolate { .. }) => Ok(None),
                 (None, _) => Err(()),
@@ -1013,17 +1013,17 @@ impl Animate for ClipRect {
 
 impl ToAnimatedZero for ClipRect {
     #[inline]
     fn to_animated_zero(&self) -> Result<Self, ()> { Err(()) }
 }
 
 /// Build an equivalent 'identity transform function list' based
 /// on an existing transform list.
-/// http://dev.w3.org/csswg/css-transforms/#none-transform-animation
+/// <http://dev.w3.org/csswg/css-transforms/#none-transform-animation>
 impl ToAnimatedZero for TransformOperation {
     fn to_animated_zero(&self) -> Result<Self, ()> {
         match *self {
             TransformOperation::Matrix(..) => {
                 Ok(TransformOperation::Matrix(ComputedMatrix::identity()))
             },
             TransformOperation::MatrixWithPercents(..) => {
                 // FIXME(nox): Should be MatrixWithPercents value.
@@ -1073,17 +1073,17 @@ impl ToAnimatedZero for TransformOperati
 fn animate_multiplicative_factor(
     this: CSSFloat,
     other: CSSFloat,
     procedure: Procedure,
 ) -> Result<CSSFloat, ()> {
     Ok((this - 1.).animate(&(other - 1.), procedure)? + 1.)
 }
 
-/// http://dev.w3.org/csswg/css-transforms/#interpolation-of-transforms
+/// <http://dev.w3.org/csswg/css-transforms/#interpolation-of-transforms>
 impl Animate for TransformOperation {
     fn animate(&self, other: &Self, procedure: Procedure) -> Result<Self, ()> {
         match (self, other) {
             (
                 &TransformOperation::Matrix(ref this),
                 &TransformOperation::Matrix(ref other),
             ) => {
                 Ok(TransformOperation::Matrix(
@@ -1154,17 +1154,17 @@ impl Animate for TransformOperation {
                     fd_matrix.animate(&td_matrix, procedure)?,
                 ))
             },
             _ => Err(()),
         }
     }
 }
 
-/// https://www.w3.org/TR/css-transforms-1/#Rotate3dDefined
+/// <https://www.w3.org/TR/css-transforms-1/#Rotate3dDefined>
 fn rotate_to_matrix(x: f32, y: f32, z: f32, a: Angle) -> ComputedMatrix {
     let half_rad = a.radians() / 2.0;
     let sc = (half_rad).sin() * (half_rad).cos();
     let sq = (half_rad).sin().powi(2);
 
     ComputedMatrix {
         m11: 1.0 - 2.0 * (y * y + z * z) * sq,
         m12: 2.0 * (x * y * sq + z * sc),
@@ -1241,17 +1241,17 @@ impl Animate for Scale2D {
         Ok(Scale2D(
             animate_multiplicative_factor(self.0, other.0, procedure)?,
             animate_multiplicative_factor(self.1, other.1, procedure)?,
         ))
     }
 }
 
 impl Animate for MatrixDecomposed2D {
-    /// https://drafts.csswg.org/css-transforms/#interpolation-of-decomposed-2d-matrix-values
+    /// <https://drafts.csswg.org/css-transforms/#interpolation-of-decomposed-2d-matrix-values>
     fn animate(&self, other: &Self, procedure: Procedure) -> Result<Self, ()> {
         // If x-axis of one is flipped, and y-axis of the other,
         // convert to an unflipped rotation.
         let mut scale = self.scale;
         let mut angle = self.angle;
         let mut other_angle = other.angle;
         if (scale.0 < 0.0 && other.scale.1 < 0.0) || (scale.1 < 0.0 && other.scale.0 < 0.0) {
             scale.0 = -scale.0;
@@ -1370,17 +1370,17 @@ impl ComputeSquaredDistance for Computed
             (decompose_2d_matrix(self)?, decompose_2d_matrix(other)?)
         };
         from.compute_squared_distance(&to)
     }
 }
 
 impl From<ComputedMatrix> for MatrixDecomposed2D {
     /// Decompose a 2D matrix.
-    /// https://drafts.csswg.org/css-transforms/#decomposing-a-2d-matrix
+    /// <https://drafts.csswg.org/css-transforms/#decomposing-a-2d-matrix>
     fn from(matrix: ComputedMatrix) -> MatrixDecomposed2D {
         let mut row0x = matrix.m11;
         let mut row0y = matrix.m12;
         let mut row1x = matrix.m21;
         let mut row1y = matrix.m22;
 
         let translate = Translate2D(matrix.m41, matrix.m42);
         let mut scale = Scale2D((row0x * row0x + row0y * row0y).sqrt(),
@@ -1434,17 +1434,17 @@ impl From<ComputedMatrix> for MatrixDeco
             angle: angle,
             matrix: m,
         }
     }
 }
 
 impl From<MatrixDecomposed2D> for ComputedMatrix {
     /// Recompose a 2D matrix.
-    /// https://drafts.csswg.org/css-transforms/#recomposing-to-a-2d-matrix
+    /// <https://drafts.csswg.org/css-transforms/#recomposing-to-a-2d-matrix>
     fn from(decomposed: MatrixDecomposed2D) -> ComputedMatrix {
         let mut computed_matrix = ComputedMatrix::identity();
         computed_matrix.m11 = decomposed.matrix.m11;
         computed_matrix.m12 = decomposed.matrix.m12;
         computed_matrix.m21 = decomposed.matrix.m21;
         computed_matrix.m22 = decomposed.matrix.m22;
 
         // Translate matrix.
@@ -1572,17 +1572,17 @@ impl ComputeSquaredDistance for Quaterni
         // so we can get their angle difference by:
         // cos(theta/2) = (q1 dot q2) / (|q1| * |q2|) = q1 dot q2.
         let distance = self.dot(other).max(-1.0).min(1.0).acos() * 2.0;
         Ok(SquaredDistance::Value(distance * distance))
     }
 }
 
 /// Decompose a 3D matrix.
-/// https://drafts.csswg.org/css-transforms/#decomposing-a-3d-matrix
+/// <https://drafts.csswg.org/css-transforms/#decomposing-a-3d-matrix>
 fn decompose_3d_matrix(mut matrix: ComputedMatrix) -> Result<MatrixDecomposed3D, ()> {
     // Normalize the matrix.
     if matrix.m44 == 0.0 {
         return Err(());
     }
 
     let scaling_factor = matrix.m44;
     % for i in range(1, 5):
@@ -1824,17 +1824,17 @@ impl Animate for Perspective {
             self.1.animate(&other.1, procedure)?,
             self.2.animate(&other.2, procedure)?,
             animate_multiplicative_factor(self.3, other.3, procedure)?,
         ))
     }
 }
 
 impl Animate for MatrixDecomposed3D {
-    /// https://drafts.csswg.org/css-transforms/#interpolation-of-decomposed-3d-matrix-values
+    /// <https://drafts.csswg.org/css-transforms/#interpolation-of-decomposed-3d-matrix-values>
     fn animate(&self, other: &Self, procedure: Procedure) -> Result<Self, ()> {
         use std::f64;
 
         let (this_weight, other_weight) = procedure.weights();
 
         debug_assert!((this_weight + other_weight - 1.0f64).abs() <= f64::EPSILON ||
                       other_weight == 1.0f64 || other_weight == 0.0f64,
                       "animate should only be used for interpolating or accumulating transforms");
@@ -1906,17 +1906,17 @@ impl Animate for MatrixDecomposed3D {
         }
 
         Ok(sum)
     }
 }
 
 impl From<MatrixDecomposed3D> for ComputedMatrix {
     /// Recompose a 3D matrix.
-    /// https://drafts.csswg.org/css-transforms/#recomposing-to-a-3d-matrix
+    /// <https://drafts.csswg.org/css-transforms/#recomposing-to-a-3d-matrix>
     fn from(decomposed: MatrixDecomposed3D) -> ComputedMatrix {
         let mut matrix = ComputedMatrix::identity();
 
         // Apply perspective
         % for i in range(1, 5):
             matrix.m${i}4 = decomposed.perspective.${i - 1};
         % endfor
 
@@ -2101,17 +2101,17 @@ impl ComputedMatrix {
              self.m13*self.m21*self.m32 - self.m11*self.m23*self.m32 -
              self.m12*self.m21*self.m33 + self.m11*self.m22*self.m33),
         };
 
         Some(x)
     }
 }
 
-/// https://drafts.csswg.org/css-transforms/#interpolation-of-transforms
+/// <https://drafts.csswg.org/css-transforms/#interpolation-of-transforms>
 impl Animate for TransformList {
     #[inline]
     fn animate(
         &self,
         other: &Self,
         procedure: Procedure,
     ) -> Result<Self, ()> {
         if self.0.is_none() && other.0.is_none() {
@@ -2458,17 +2458,17 @@ where
             (&SVGLength::Length(ref this), &SVGLength::Length(ref other)) => {
                 Ok(SVGLength::Length(this.animate(other, procedure)?))
             },
             _ => Err(()),
         }
     }
 }
 
-/// https://www.w3.org/TR/SVG11/painting.html#StrokeDasharrayProperty
+/// <https://www.w3.org/TR/SVG11/painting.html#StrokeDasharrayProperty>
 impl<L> Animate for SVGStrokeDashArray<L>
 where
     L: Clone + RepeatableListAnimatable,
 {
     #[inline]
     fn animate(&self, other: &Self, procedure: Procedure) -> Result<Self, ()> {
         if matches!(procedure, Procedure::Add | Procedure::Accumulate { .. }) {
             // Non-additive.
@@ -2516,17 +2516,17 @@ where
 }
 
 <%
     FILTER_FUNCTIONS = [ 'Blur', 'Brightness', 'Contrast', 'Grayscale',
                          'HueRotate', 'Invert', 'Opacity', 'Saturate',
                          'Sepia' ]
 %>
 
-/// https://drafts.fxtf.org/filters/#animation-of-filters
+/// <https://drafts.fxtf.org/filters/#animation-of-filters>
 impl Animate for AnimatedFilter {
     fn animate(
         &self,
         other: &Self,
         procedure: Procedure,
     ) -> Result<Self, ()> {
         match (self, other) {
             % for func in ['Blur', 'Grayscale', 'HueRotate', 'Invert', 'Sepia']:
@@ -2548,17 +2548,17 @@ impl Animate for AnimatedFilter {
                 Ok(Filter::DropShadow(this.animate(other, procedure)?))
             },
             % endif
             _ => Err(()),
         }
     }
 }
 
-/// http://dev.w3.org/csswg/css-transforms/#none-transform-animation
+/// <http://dev.w3.org/csswg/css-transforms/#none-transform-animation>
 impl ToAnimatedZero for AnimatedFilter {
     fn to_animated_zero(&self) -> Result<Self, ()> {
         match *self {
             % for func in ['Blur', 'Grayscale', 'HueRotate', 'Invert', 'Sepia']:
             Filter::${func}(ref this) => Ok(Filter::${func}(this.to_animated_zero()?)),
             % endfor
             % for func in ['Brightness', 'Contrast', 'Opacity', 'Saturate']:
             Filter::${func}(_) => Ok(Filter::${func}(NonNegative(1.))),
--- a/servo/components/style/properties/properties.mako.rs
+++ b/servo/components/style/properties/properties.mako.rs
@@ -1618,17 +1618,17 @@ impl PropertyDeclaration {
     /// Returns true if this property is a custom property, false
     /// otherwise.
     pub fn is_custom(&self) -> bool {
         matches!(*self, PropertyDeclaration::Custom(_, _))
     }
 
     /// The `context` parameter controls this:
     ///
-    /// https://drafts.csswg.org/css-animations/#keyframes
+    /// <https://drafts.csswg.org/css-animations/#keyframes>
     /// > The <declaration-list> inside of <keyframe-block> accepts any CSS property
     /// > except those defined in this specification,
     /// > but does accept the `animation-play-state` property and interprets it specially.
     ///
     /// This will not actually parse Importance values, and will always set things
     /// to Importance::Normal. Parsing Importance values is the job of PropertyDeclarationParser,
     /// we only set them here so that we don't have to reallocate
     pub fn parse_into<'i, 't>(
@@ -2372,17 +2372,17 @@ impl ComputedValuesInner {
         let effects = self.get_effects();
         // TODO(gw): Add clip-path, isolation, mask-image, mask-border-source when supported.
         effects.opacity < 1.0 ||
            !effects.filter.0.is_empty() ||
            !effects.clip.is_auto() ||
            effects.mix_blend_mode != mix_blend_mode::T::normal
     }
 
-    /// https://drafts.csswg.org/css-transforms/#grouping-property-values
+    /// <https://drafts.csswg.org/css-transforms/#grouping-property-values>
     pub fn get_used_transform_style(&self) -> computed_values::transform_style::T {
         use computed_values::transform_style;
 
         let box_ = self.get_box();
 
         if self.overrides_transform_style() {
             transform_style::T::flat
         } else {
--- a/servo/components/style/servo/media_queries.rs
+++ b/servo/components/style/servo/media_queries.rs
@@ -89,17 +89,17 @@ impl Device {
 
     /// Set the font size of the root element (for rem)
     pub fn set_root_font_size(&self, size: Au) {
         self.root_font_size.store(size.0 as isize, Ordering::Relaxed)
     }
 
     /// Sets the body text color for the "inherit color from body" quirk.
     ///
-    /// https://quirks.spec.whatwg.org/#the-tables-inherit-color-from-body-quirk
+    /// <https://quirks.spec.whatwg.org/#the-tables-inherit-color-from-body-quirk>
     pub fn set_body_text_color(&self, _color: RGBA) {
         // Servo doesn't implement this quirk (yet)
     }
 
     /// Returns whether we ever looked up the root font size of the Device.
     pub fn used_root_font_size(&self) -> bool {
         self.used_root_font_size.load(Ordering::Relaxed)
     }
@@ -150,23 +150,23 @@ impl Device {
 }
 
 /// A expression kind servo understands and parses.
 ///
 /// Only `pub` for unit testing, please don't use it directly!
 #[derive(Clone, Debug, PartialEq)]
 #[cfg_attr(feature = "servo", derive(HeapSizeOf))]
 pub enum ExpressionKind {
-    /// http://dev.w3.org/csswg/mediaqueries-3/#width
+    /// <http://dev.w3.org/csswg/mediaqueries-3/#width>
     Width(Range<specified::Length>),
 }
 
 /// A single expression a per:
 ///
-/// http://dev.w3.org/csswg/mediaqueries-3/#media1
+/// <http://dev.w3.org/csswg/mediaqueries-3/#media1>
 #[derive(Clone, Debug, PartialEq)]
 #[cfg_attr(feature = "servo", derive(HeapSizeOf))]
 pub struct Expression(pub ExpressionKind);
 
 impl Expression {
     /// The kind of expression we're, just for unit testing.
     ///
     /// Eventually this will become servo-only.
--- a/servo/components/style/servo/url.rs
+++ b/servo/components/style/servo/url.rs
@@ -16,17 +16,17 @@ use values::computed::{Context, ToComput
 
 /// A specified url() value for servo.
 ///
 /// Servo eagerly resolves SpecifiedUrls, which it can then take advantage of
 /// when computing values. In contrast, Gecko uses a different URL backend, so
 /// eagerly resolving with rust-url would be duplicated work.
 ///
 /// However, this approach is still not necessarily optimal: See
-/// https://bugzilla.mozilla.org/show_bug.cgi?id=1347435#c6
+/// <https://bugzilla.mozilla.org/show_bug.cgi?id=1347435#c6>
 #[derive(Clone, Debug, Deserialize, HeapSizeOf, Serialize)]
 pub struct SpecifiedUrl {
     /// The original URI. This might be optional since we may insert computed
     /// values of images into the cascade directly, and we don't bother to
     /// convert their serialization.
     ///
     /// Refcounted since cloning this should be cheap and data: uris can be
     /// really large.
--- a/servo/components/style/str.rs
+++ b/servo/components/style/str.rs
@@ -16,17 +16,17 @@ use std::str::Split;
 /// A static slice of characters.
 pub type StaticCharVec = &'static [char];
 
 /// A static slice of `str`s.
 pub type StaticStringVec = &'static [&'static str];
 
 /// A "space character" according to:
 ///
-/// https://html.spec.whatwg.org/multipage/#space-character
+/// <https://html.spec.whatwg.org/multipage/#space-character>
 pub static HTML_SPACE_CHARACTERS: StaticCharVec = &[
     '\u{0020}',
     '\u{0009}',
     '\u{000a}',
     '\u{000c}',
     '\u{000d}',
 ];
 
--- a/servo/components/style/style_adjuster.rs
+++ b/servo/components/style/style_adjuster.rs
@@ -25,17 +25,17 @@ pub struct StyleAdjuster<'a, 'b: 'a> {
 impl<'a, 'b: 'a> StyleAdjuster<'a, 'b> {
     /// Trivially constructs a new StyleAdjuster.
     pub fn new(style: &'a mut StyleBuilder<'b>) -> Self {
         StyleAdjuster {
             style: style,
         }
     }
 
-    /// https://fullscreen.spec.whatwg.org/#new-stacking-layer
+    /// <https://fullscreen.spec.whatwg.org/#new-stacking-layer>
     ///
     ///    Any position value other than 'absolute' and 'fixed' are
     ///    computed to 'absolute' if the element is in a top layer.
     ///
     fn adjust_for_top_layer(&mut self) {
         if !self.style.out_of_flow_positioned() && self.style.in_top_layer() {
             self.style.mutate_box().set_position(position::absolute);
         }
@@ -48,17 +48,17 @@ impl<'a, 'b: 'a> StyleAdjuster<'a, 'b> {
     ///
     fn adjust_for_position(&mut self) {
         if self.style.out_of_flow_positioned() && self.style.floated() {
             self.style.mutate_box().set_float(float::none);
         }
     }
 
     /// Apply the blockification rules based on the table in CSS 2.2 section 9.7.
-    /// https://drafts.csswg.org/css2/visuren.html#dis-pos-flo
+    /// <https://drafts.csswg.org/css2/visuren.html#dis-pos-flo>
     fn blockify_if_necessary(
         &mut self,
         layout_parent_style: &ComputedValues,
         flags: CascadeFlags,
     ) {
         let mut blockify = false;
         macro_rules! blockify_if {
             ($if_what:expr) => {
@@ -155,29 +155,29 @@ impl<'a, 'b: 'a> StyleAdjuster<'a, 'b> {
     fn adjust_for_text_in_ruby(&mut self) {
         use properties::computed_value_flags::SHOULD_SUPPRESS_LINEBREAK;
         let parent_display = self.style.get_parent_box().clone_display();
         if parent_display.is_ruby_type() {
             self.style.flags.insert(SHOULD_SUPPRESS_LINEBREAK);
         }
     }
 
-    /// https://drafts.csswg.org/css-writing-modes-3/#block-flow:
+    /// <https://drafts.csswg.org/css-writing-modes-3/#block-flow:>
     ///
     ///    If a box has a different writing-mode value than its containing
     ///    block:
     ///
     ///        - If the box has a specified display of inline, its display
     ///          computes to inline-block. [CSS21]
     ///
     /// This matches the adjustment that Gecko does, not exactly following
     /// the spec. See also:
     ///
-    /// https://lists.w3.org/Archives/Public/www-style/2017Mar/0045.html
-    /// https://github.com/servo/servo/issues/15754
+    /// <https://lists.w3.org/Archives/Public/www-style/2017Mar/0045.html>
+    /// <https://github.com/servo/servo/issues/15754>
     fn adjust_for_writing_mode(
         &mut self,
         layout_parent_style: &ComputedValues,
     ) {
         let our_writing_mode =
             self.style.get_inheritedbox().clone_writing_mode();
         let parent_writing_mode =
             layout_parent_style.get_inheritedbox().clone_writing_mode();
@@ -514,17 +514,17 @@ impl<'a, 'b: 'a> StyleAdjuster<'a, 'b> {
         if relevant_link_visited {
             self.style.flags.insert(IS_RELEVANT_LINK_VISITED);
         }
     }
 
     /// Resolves "justify-items: auto" based on the inherited style if needed to
     /// comply with:
     ///
-    /// https://drafts.csswg.org/css-align/#valdef-justify-items-legacy
+    /// <https://drafts.csswg.org/css-align/#valdef-justify-items-legacy>
     ///
     /// (Note that "auto" is being renamed to "legacy")
     #[cfg(feature = "gecko")]
     fn adjust_for_justify_items(&mut self) {
         use values::specified::align;
         let justify_items = self.style.get_position().clone_justify_items();
         if justify_items.specified.0 != align::ALIGN_AUTO {
             return;
--- a/servo/components/style/stylesheets/document_rule.rs
+++ b/servo/components/style/stylesheets/document_rule.rs
@@ -189,17 +189,17 @@ impl ToCss for UrlMatchingFunction {
                 dest.write_str(")")
             },
         }
     }
 }
 
 /// A `@document` rule's condition.
 ///
-/// https://www.w3.org/TR/2012/WD-css3-conditional-20120911/#at-document
+/// <https://www.w3.org/TR/2012/WD-css3-conditional-20120911/#at-document>
 ///
 /// The `@document` rule's condition is written as a comma-separated list of
 /// URL matching functions, and the condition evaluates to true whenever any
 /// one of those functions evaluates to true.
 #[derive(Clone, Debug)]
 pub struct DocumentCondition(Vec<UrlMatchingFunction>);
 
 impl DocumentCondition {
--- a/servo/components/style/stylesheets/keyframes_rule.rs
+++ b/servo/components/style/stylesheets/keyframes_rule.rs
@@ -53,17 +53,17 @@ impl ToCssWithGuard for KeyframesRule {
     }
 }
 
 impl KeyframesRule {
     /// Returns the index of the last keyframe that matches the given selector.
     /// If the selector is not valid, or no keyframe is found, returns None.
     ///
     /// Related spec:
-    /// https://drafts.csswg.org/css-animations-1/#interface-csskeyframesrule-findrule
+    /// <https://drafts.csswg.org/css-animations-1/#interface-csskeyframesrule-findrule>
     pub fn find_rule(&self, guard: &SharedRwLockReadGuard, selector: &str) -> Option<usize> {
         let mut input = ParserInput::new(selector);
         if let Ok(selector) = Parser::new(&mut input).parse_entirely(KeyframeSelector::parse) {
             for (i, keyframe) in self.keyframes.iter().enumerate().rev() {
                 if keyframe.read_with(guard).selector == selector {
                     return Some(i);
                 }
             }
--- a/servo/components/style/stylesheets/origin.rs
+++ b/servo/components/style/stylesheets/origin.rs
@@ -4,28 +4,28 @@
 
 //! [CSS cascade origins](https://drafts.csswg.org/css-cascade/#cascading-origins).
 
 use std::marker::PhantomData;
 use std::ops::BitOrAssign;
 
 /// Each style rule has an origin, which determines where it enters the cascade.
 ///
-/// https://drafts.csswg.org/css-cascade/#cascading-origins
+/// <https://drafts.csswg.org/css-cascade/#cascading-origins>
 #[derive(Clone, Copy, Debug, Eq, PartialEq)]
 #[repr(u8)]
 #[cfg_attr(feature = "servo", derive(HeapSizeOf))]
 pub enum Origin {
-    /// https://drafts.csswg.org/css-cascade/#cascade-origin-user-agent
+    /// <https://drafts.csswg.org/css-cascade/#cascade-origin-user-agent>
     UserAgent = 1 << 0,
 
-    /// https://drafts.csswg.org/css-cascade/#cascade-origin-user
+    /// <https://drafts.csswg.org/css-cascade/#cascade-origin-user>
     User = 1 << 1,
 
-    /// https://drafts.csswg.org/css-cascade/#cascade-origin-author
+    /// <https://drafts.csswg.org/css-cascade/#cascade-origin-author>
     Author = 1 << 2,
 }
 
 impl Origin {
     /// Returns an origin that goes in order for `index`.
     ///
     /// This is used for iterating across origins.
     fn from_index(index: i8) -> Option<Self> {
@@ -37,21 +37,21 @@ impl Origin {
         })
     }
 }
 
 bitflags! {
     /// A set of origins. This is equivalent to Gecko's OriginFlags.
     #[cfg_attr(feature = "servo", derive(HeapSizeOf))]
     pub flags OriginSet: u8 {
-        /// https://drafts.csswg.org/css-cascade/#cascade-origin-user-agent
+        /// <https://drafts.csswg.org/css-cascade/#cascade-origin-user-agent>
         const ORIGIN_USER_AGENT = Origin::UserAgent as u8,
-        /// https://drafts.csswg.org/css-cascade/#cascade-origin-user
+        /// <https://drafts.csswg.org/css-cascade/#cascade-origin-user>
         const ORIGIN_USER = Origin::User as u8,
-        /// https://drafts.csswg.org/css-cascade/#cascade-origin-author
+        /// <https://drafts.csswg.org/css-cascade/#cascade-origin-author>
         const ORIGIN_AUTHOR = Origin::Author as u8,
     }
 }
 
 impl OriginSet {
     /// Returns an iterator over the origins present in this `OriginSet`.
     ///
     /// See the `OriginSet` documentation for information about the order
--- a/servo/components/style/stylesheets/rule_list.rs
+++ b/servo/components/style/stylesheets/rule_list.rs
@@ -60,17 +60,17 @@ impl CssRules {
             match *r {
                 CssRule::Namespace(..) |
                 CssRule::Import(..) => true,
                 _ => false
             }
         })
     }
 
-    /// https://drafts.csswg.org/cssom/#remove-a-css-rule
+    /// <https://drafts.csswg.org/cssom/#remove-a-css-rule>
     pub fn remove_rule(&mut self, index: usize) -> Result<(), RulesMutateError> {
         // Step 1, 2
         if index >= self.0.len() {
             return Err(RulesMutateError::IndexSize);
         }
 
         {
             // Step 3
@@ -87,17 +87,17 @@ impl CssRules {
         // Step 5, 6
         self.0.remove(index);
         Ok(())
     }
 }
 
 /// A trait to implement helpers for `Arc<Locked<CssRules>>`.
 pub trait CssRulesHelpers {
-    /// https://drafts.csswg.org/cssom/#insert-a-css-rule
+    /// <https://drafts.csswg.org/cssom/#insert-a-css-rule>
     ///
     /// Written in this funky way because parsing an @import rule may cause us
     /// to clone a stylesheet from the same document due to caching in the CSS
     /// loader.
     ///
     /// TODO(emilio): We could also pass the write guard down into the loader
     /// instead, but that seems overkill.
     fn insert_rule(&self,
--- a/servo/components/style/stylesheets/supports_rule.rs
+++ b/servo/components/style/stylesheets/supports_rule.rs
@@ -70,17 +70,17 @@ impl DeepCloneWithLock for SupportsRule 
             enabled: self.enabled,
             source_location: self.source_location.clone(),
         }
     }
 }
 
 /// An @supports condition
 ///
-/// https://drafts.csswg.org/css-conditional-3/#at-supports
+/// <https://drafts.csswg.org/css-conditional-3/#at-supports>
 #[derive(Clone, Debug)]
 pub enum SupportsCondition {
     /// `not (condition)`
     Not(Box<SupportsCondition>),
     /// `(condition)`
     Parenthesized(Box<SupportsCondition>),
     /// `(condition) and (condition) and (condition) ..`
     And(Vec<SupportsCondition>),
@@ -90,17 +90,17 @@ pub enum SupportsCondition {
     Declaration(Declaration),
     /// `(any tokens)` or `func(any tokens)`
     FutureSyntax(String),
 }
 
 impl SupportsCondition {
     /// Parse a condition
     ///
-    /// https://drafts.csswg.org/css-conditional/#supports_condition
+    /// <https://drafts.csswg.org/css-conditional/#supports_condition>
     pub fn parse<'i, 't>(input: &mut Parser<'i, 't>) -> Result<SupportsCondition, ParseError<'i>> {
         if let Ok(_) = input.try(|i| i.expect_ident_matching("not")) {
             let inner = SupportsCondition::parse_in_parens(input)?;
             return Ok(SupportsCondition::Not(Box::new(inner)));
         }
 
         let in_parens = SupportsCondition::parse_in_parens(input)?;
 
@@ -128,17 +128,17 @@ impl SupportsCondition {
                 // Did not find the expected keyword.
                 // If we found some other token,
                 // it will be rejected by `Parser::parse_entirely` somewhere up the stack.
                 return Ok(wrapper(conditions))
             }
         }
     }
 
-    /// https://drafts.csswg.org/css-conditional-3/#supports_condition_in_parens
+    /// <https://drafts.csswg.org/css-conditional-3/#supports_condition_in_parens>
     fn parse_in_parens<'i, 't>(input: &mut Parser<'i, 't>) -> Result<SupportsCondition, ParseError<'i>> {
         // Whitespace is normally taken care of in `Parser::next`,
         // but we want to not include it in `pos` for the SupportsCondition::FutureSyntax cases.
         while input.try(Parser::expect_whitespace).is_ok() {}
         let pos = input.position();
         let location = input.current_source_location();
         // FIXME: remove clone() when lifetimes are non-lexical
         match input.next()?.clone() {
@@ -166,17 +166,17 @@ impl SupportsCondition {
             SupportsCondition::Or(ref vec) => vec.iter().any(|c| c.eval(cx)),
             SupportsCondition::Declaration(ref decl) => decl.eval(cx),
             SupportsCondition::FutureSyntax(_) => false
         }
     }
 }
 
 /// supports_condition | declaration
-/// https://drafts.csswg.org/css-conditional/#dom-css-supports-conditiontext-conditiontext
+/// <https://drafts.csswg.org/css-conditional/#dom-css-supports-conditiontext-conditiontext>
 pub fn parse_condition_or_declaration<'i, 't>(input: &mut Parser<'i, 't>)
                                               -> Result<SupportsCondition, ParseError<'i>> {
     if let Ok(condition) = input.try(SupportsCondition::parse) {
         Ok(SupportsCondition::Parenthesized(Box::new(condition)))
     } else {
         Declaration::parse(input).map(SupportsCondition::Declaration)
     }
 }
@@ -232,34 +232,34 @@ impl ToCss for SupportsCondition {
 pub struct Declaration(pub String);
 
 impl ToCss for Declaration {
     fn to_css<W>(&self, dest: &mut W) -> fmt::Result where W: fmt::Write {
         dest.write_str(&self.0)
     }
 }
 
-/// https://drafts.csswg.org/css-syntax-3/#typedef-any-value
+/// <https://drafts.csswg.org/css-syntax-3/#typedef-any-value>
 fn consume_any_value<'i, 't>(input: &mut Parser<'i, 't>) -> Result<(), ParseError<'i>> {
     input.expect_no_error_token().map_err(|err| err.into())
 }
 
 impl Declaration {
     /// Parse a declaration
     pub fn parse<'i, 't>(input: &mut Parser<'i, 't>) -> Result<Declaration, ParseError<'i>> {
         let pos = input.position();
         input.expect_ident()?;
         input.expect_colon()?;
         consume_any_value(input)?;
         Ok(Declaration(input.slice_from(pos).to_owned()))
     }
 
     /// Determine if a declaration parses
     ///
-    /// https://drafts.csswg.org/css-conditional-3/#support-definition
+    /// <https://drafts.csswg.org/css-conditional-3/#support-definition>
     pub fn eval(&self, context: &ParserContext) -> bool {
         debug_assert_eq!(context.rule_type(), CssRuleType::Style);
 
         let mut input = ParserInput::new(&self.0);
         let mut input = Parser::new(&mut input);
         input.parse_entirely(|input| -> Result<(), CssParseError<()>> {
             let prop = input.expect_ident().unwrap().as_ref().to_owned();
             input.expect_colon().unwrap();
--- a/servo/components/style/stylesheets/viewport_rule.rs
+++ b/servo/components/style/stylesheets/viewport_rule.rs
@@ -529,17 +529,17 @@ impl ToCssWithGuard for ViewportRule {
             dest.write_str(" ")?;
             declaration.to_css(dest)?;
         }
         dest.write_str(" }")
     }
 }
 
 /// Computes the cascade precedence as according to
-/// http://dev.w3.org/csswg/css-cascade/#cascade-origin
+/// <http://dev.w3.org/csswg/css-cascade/#cascade-origin>
 fn cascade_precendence(origin: Origin, important: bool) -> u8 {
     match (origin, important) {
         (Origin::UserAgent, true) => 1,
         (Origin::User, true) => 2,
         (Origin::Author, true) => 3,
         (Origin::Author, false) => 4,
         (Origin::User, false) => 5,
         (Origin::UserAgent, false) => 6,
--- a/servo/components/style/values/animated/effects.rs
+++ b/servo/components/style/values/animated/effects.rs
@@ -22,17 +22,17 @@ use values::generics::effects::SimpleSha
 /// An animated value for the `box-shadow` property.
 pub type BoxShadowList = ShadowList<BoxShadow>;
 
 /// An animated value for the `text-shadow` property.
 pub type TextShadowList = ShadowList<SimpleShadow>;
 
 /// An animated value for shadow lists.
 ///
-/// https://drafts.csswg.org/css-transitions/#animtype-shadow-list
+/// <https://drafts.csswg.org/css-transitions/#animtype-shadow-list>
 #[cfg_attr(feature = "servo", derive(HeapSizeOf))]
 #[derive(Clone, Debug, PartialEq)]
 pub struct ShadowList<Shadow>(Vec<Shadow>);
 
 /// An animated value for a single `box-shadow`.
 pub type BoxShadow = GenericBoxShadow<Option<RGBA>, Length, NonNegativeLength, Length>;
 
 /// An animated value for the `filter` property.
--- a/servo/components/style/values/animated/mod.rs
+++ b/servo/components/style/values/animated/mod.rs
@@ -43,25 +43,25 @@ pub mod effects;
 /// function has been specified through `#[animate(fallback)]`.
 pub trait Animate: Sized {
     /// Animate a value towards another one, given an animation procedure.
     fn animate(&self, other: &Self, procedure: Procedure) -> Result<Self, ()>;
 }
 
 /// An animation procedure.
 ///
-/// https://w3c.github.io/web-animations/#procedures-for-animating-properties
+/// <https://w3c.github.io/web-animations/#procedures-for-animating-properties>
 #[allow(missing_docs)]
 #[derive(Clone, Copy, Debug, PartialEq)]
 pub enum Procedure {
-    /// https://w3c.github.io/web-animations/#animation-interpolation
+    /// <https://w3c.github.io/web-animations/#animation-interpolation>
     Interpolate { progress: f64 },
-    /// https://w3c.github.io/web-animations/#animation-addition
+    /// <https://w3c.github.io/web-animations/#animation-addition>
     Add,
-    /// https://w3c.github.io/web-animations/#animation-accumulation
+    /// <https://w3c.github.io/web-animations/#animation-accumulation>
     Accumulate { count: u64 },
 }
 
 /// Conversion between computed values and intermediate values for animations.
 ///
 /// Notably, colors are represented as four floats during animations.
 ///
 /// This trait is derivable with `#[derive(ToAnimatedValue)]`.
@@ -108,36 +108,36 @@ impl Procedure {
         match self {
             Procedure::Interpolate { progress } => (1. - progress, progress),
             Procedure::Add => (1., 1.),
             Procedure::Accumulate { count } => (count as f64, 1.),
         }
     }
 }
 
-/// https://drafts.csswg.org/css-transitions/#animtype-number
+/// <https://drafts.csswg.org/css-transitions/#animtype-number>
 impl Animate for i32 {
     #[inline]
     fn animate(&self, other: &Self, procedure: Procedure) -> Result<Self, ()> {
         Ok(((*self as f64).animate(&(*other as f64), procedure)? + 0.5).floor() as i32)
     }
 }
 
-/// https://drafts.csswg.org/css-transitions/#animtype-number
+/// <https://drafts.csswg.org/css-transitions/#animtype-number>
 impl Animate for f32 {
     #[inline]
     fn animate(&self, other: &Self, procedure: Procedure) -> Result<Self, ()> {
         use std::f32;
 
         let ret = (*self as f64).animate(&(*other as f64), procedure)?;
         Ok(ret.min(f32::MAX as f64).max(f32::MIN as f64) as f32)
     }
 }
 
-/// https://drafts.csswg.org/css-transitions/#animtype-number
+/// <https://drafts.csswg.org/css-transitions/#animtype-number>
 impl Animate for f64 {
     #[inline]
     fn animate(&self, other: &Self, procedure: Procedure) -> Result<Self, ()> {
         use std::f64;
 
         let (self_weight, other_weight) = procedure.weights();
 
         let ret = *self * self_weight + *other * other_weight;
--- a/servo/components/style/values/computed/align.rs
+++ b/servo/components/style/values/computed/align.rs
@@ -41,17 +41,17 @@ impl JustifyItems {
             computed: specified::JustifyItems::normal(),
         }
     }
 }
 
 impl ToComputedValue for specified::JustifyItems {
     type ComputedValue = JustifyItems;
 
-    /// https://drafts.csswg.org/css-align/#valdef-justify-items-legacy
+    /// <https://drafts.csswg.org/css-align/#valdef-justify-items-legacy>
     fn to_computed_value(&self, _context: &Context) -> JustifyItems {
         use values::specified::align;
         let specified = *self;
         let computed =
             if self.0 != align::ALIGN_AUTO {
                 *self
             } else {
                 // If the inherited value of `justify-items` includes the
--- a/servo/components/style/values/computed/angle.rs
+++ b/servo/components/style/values/computed/angle.rs
@@ -62,17 +62,17 @@ impl Angle {
         radians.min(f64::MAX).max(f64::MIN)
     }
 
     /// Returns an angle that represents a rotation of zero radians.
     pub fn zero() -> Self {
         Angle::Radian(0.0)
     }
 
-    /// https://drafts.csswg.org/css-transitions/#animtype-number
+    /// <https://drafts.csswg.org/css-transitions/#animtype-number>
     #[inline]
     fn animate_fallback(&self, other: &Self, procedure: Procedure) -> Result<Self, ()> {
         Ok(Angle::from_radians(self.radians().animate(&other.radians(), procedure)?))
     }
 }
 
 impl ComputeSquaredDistance for Angle {
     #[inline]
--- a/servo/components/style/values/computed/image.rs
+++ b/servo/components/style/values/computed/image.rs
@@ -22,21 +22,21 @@ use values::generics::image::{Image as G
 use values::generics::image::{LineDirection as GenericLineDirection, MozImageRect as GenericMozImageRect};
 use values::specified::image::LineDirection as SpecifiedLineDirection;
 use values::specified::position::{X, Y};
 
 /// A computed image layer.
 pub type ImageLayer = Either<None_, Image>;
 
 /// Computed values for an image according to CSS-IMAGES.
-/// https://drafts.csswg.org/css-images/#image-values
+/// <https://drafts.csswg.org/css-images/#image-values>
 pub type Image = GenericImage<Gradient, MozImageRect, ComputedUrl>;
 
 /// Computed values for a CSS gradient.
-/// https://drafts.csswg.org/css-images/#gradients
+/// <https://drafts.csswg.org/css-images/#gradients>
 pub type Gradient = GenericGradient<
     LineDirection,
     Length,
     LengthOrPercentage,
     Position,
     RGBA,
     Angle,
 >;
--- a/servo/components/style/values/computed/length.rs
+++ b/servo/components/style/values/computed/length.rs
@@ -302,17 +302,17 @@ impl ToComputedValue for specified::Calc
 #[distance(fallback = "Self::compute_squared_distance_fallback")]
 pub enum LengthOrPercentage {
     Length(Length),
     Percentage(Percentage),
     Calc(CalcLengthOrPercentage),
 }
 
 impl LengthOrPercentage {
-    /// https://drafts.csswg.org/css-transitions/#animtype-lpcalc
+    /// <https://drafts.csswg.org/css-transitions/#animtype-lpcalc>
     fn animate_fallback(
         &self,
         other: &Self,
         procedure: Procedure,
     ) -> Result<Self, ()> {
         // Special handling for zero values since these should not require calc().
         if self.is_definitely_zero() {
             return other.to_animated_zero()?.animate(other, procedure);
@@ -460,17 +460,17 @@ impl ToComputedValue for specified::Leng
 pub enum LengthOrPercentageOrAuto {
     Length(Length),
     Percentage(Percentage),
     Auto,
     Calc(CalcLengthOrPercentage),
 }
 
 impl LengthOrPercentageOrAuto {
-    /// https://drafts.csswg.org/css-transitions/#animtype-lpcalc
+    /// <https://drafts.csswg.org/css-transitions/#animtype-lpcalc>
     fn animate_fallback(
         &self,
         other: &Self,
         procedure: Procedure,
     ) -> Result<Self, ()> {
         let this = <Option<CalcLengthOrPercentage>>::from(*self);
         let other = <Option<CalcLengthOrPercentage>>::from(*other);
         Ok(LengthOrPercentageOrAuto::Calc(
@@ -556,17 +556,17 @@ impl ToComputedValue for specified::Leng
 pub enum LengthOrPercentageOrNone {
     Length(Length),
     Percentage(Percentage),
     Calc(CalcLengthOrPercentage),
     None,
 }
 
 impl LengthOrPercentageOrNone {
-    /// https://drafts.csswg.org/css-transitions/#animtype-lpcalc
+    /// <https://drafts.csswg.org/css-transitions/#animtype-lpcalc>
     fn animate_fallback(
         &self,
         other: &Self,
         procedure: Procedure,
     ) -> Result<Self, ()> {
         let this = <Option<CalcLengthOrPercentage>>::from(*self);
         let other = <Option<CalcLengthOrPercentage>>::from(*other);
         Ok(LengthOrPercentageOrNone::Calc(
--- a/servo/components/style/values/computed/svg.rs
+++ b/servo/components/style/values/computed/svg.rs
@@ -32,32 +32,32 @@ impl SVGPaint {
         SVGPaint {
             kind: generic::SVGPaintKind::Color(rgba),
             fallback: None,
         }
     }
 }
 
 /// A value of <length> | <percentage> | <number> for stroke-dashoffset.
-/// https://www.w3.org/TR/SVG11/painting.html#StrokeProperties
+/// <https://www.w3.org/TR/SVG11/painting.html#StrokeProperties>
 pub type SvgLengthOrPercentageOrNumber =
     generic::SvgLengthOrPercentageOrNumber<LengthOrPercentage, Number>;
 
 /// <length> | <percentage> | <number> | context-value
 pub type SVGLength = generic::SVGLength<SvgLengthOrPercentageOrNumber>;
 
 impl From<Au> for SVGLength {
     fn from(length: Au) -> Self {
         generic::SVGLength::Length(
             generic::SvgLengthOrPercentageOrNumber::LengthOrPercentage(length.into()))
     }
 }
 
 /// A value of <length> | <percentage> | <number> for stroke-width/stroke-dasharray.
-/// https://www.w3.org/TR/SVG11/painting.html#StrokeProperties
+/// <https://www.w3.org/TR/SVG11/painting.html#StrokeProperties>
 pub type NonNegativeSvgLengthOrPercentageOrNumber =
     generic::SvgLengthOrPercentageOrNumber<NonNegativeLengthOrPercentage, NonNegativeNumber>;
 
 impl Into<NonNegativeSvgLengthOrPercentageOrNumber> for SvgLengthOrPercentageOrNumber {
     fn into(self) -> NonNegativeSvgLengthOrPercentageOrNumber {
         match self {
             generic::SvgLengthOrPercentageOrNumber::LengthOrPercentage(lop) =>{
                 generic::SvgLengthOrPercentageOrNumber::LengthOrPercentage(lop.into())
--- a/servo/components/style/values/generics/basic_shape.rs
+++ b/servo/components/style/values/generics/basic_shape.rs
@@ -11,17 +11,17 @@ use values::animated::{Animate, Procedur
 use values::distance::{ComputeSquaredDistance, SquaredDistance};
 use values::generics::border::BorderRadius;
 use values::generics::position::Position;
 use values::generics::rect::Rect;
 
 /// A clipping shape, for `clip-path`.
 pub type ClippingShape<BasicShape, Url> = ShapeSource<BasicShape, GeometryBox, Url>;
 
-/// https://drafts.fxtf.org/css-masking-1/#typedef-geometry-box
+/// <https://drafts.fxtf.org/css-masking-1/#typedef-geometry-box>
 #[allow(missing_docs)]
 #[cfg_attr(feature = "gecko", derive(MallocSizeOf))]
 #[cfg_attr(feature = "servo", derive(HeapSizeOf))]
 #[derive(Clone, Copy, Debug, PartialEq, ToComputedValue, ToCss)]
 pub enum GeometryBox {
     FillBox,
     StrokeBox,
     ViewBox,
@@ -66,48 +66,48 @@ pub enum ShapeSource<BasicShape, Referen
 #[derive(ToComputedValue, ToCss)]
 pub enum BasicShape<H, V, LengthOrPercentage> {
     Inset(InsetRect<LengthOrPercentage>),
     Circle(Circle<H, V, LengthOrPercentage>),
     Ellipse(Ellipse<H, V, LengthOrPercentage>),
     Polygon(Polygon<LengthOrPercentage>),
 }
 
-/// https://drafts.csswg.org/css-shapes/#funcdef-inset
+/// <https://drafts.csswg.org/css-shapes/#funcdef-inset>
 #[allow(missing_docs)]
 #[cfg_attr(feature = "gecko", derive(MallocSizeOf))]
 #[cfg_attr(feature = "servo", derive(HeapSizeOf))]
 #[derive(Animate, Clone, ComputeSquaredDistance, Debug, PartialEq, ToComputedValue)]
 pub struct InsetRect<LengthOrPercentage> {
     pub rect: Rect<LengthOrPercentage>,
     pub round: Option<BorderRadius<LengthOrPercentage>>,
 }
 
-/// https://drafts.csswg.org/css-shapes/#funcdef-circle
+/// <https://drafts.csswg.org/css-shapes/#funcdef-circle>
 #[allow(missing_docs)]
 #[cfg_attr(feature = "gecko", derive(MallocSizeOf))]
 #[cfg_attr(feature = "servo", derive(HeapSizeOf))]
 #[derive(Animate, Clone, ComputeSquaredDistance, Copy, Debug, PartialEq, ToComputedValue)]
 pub struct Circle<H, V, LengthOrPercentage> {
     pub position: Position<H, V>,
     pub radius: ShapeRadius<LengthOrPercentage>,
 }
 
-/// https://drafts.csswg.org/css-shapes/#funcdef-ellipse
+/// <https://drafts.csswg.org/css-shapes/#funcdef-ellipse>
 #[allow(missing_docs)]
 #[cfg_attr(feature = "gecko", derive(MallocSizeOf))]
 #[cfg_attr(feature = "servo", derive(HeapSizeOf))]
 #[derive(Animate, Clone, ComputeSquaredDistance, Copy, Debug, PartialEq, ToComputedValue)]
 pub struct Ellipse<H, V, LengthOrPercentage> {
     pub position: Position<H, V>,
     pub semiaxis_x: ShapeRadius<LengthOrPercentage>,
     pub semiaxis_y: ShapeRadius<LengthOrPercentage>,
 }
 
-/// https://drafts.csswg.org/css-shapes/#typedef-shape-radius
+/// <https://drafts.csswg.org/css-shapes/#typedef-shape-radius>
 #[allow(missing_docs)]
 #[cfg_attr(feature = "gecko", derive(MallocSizeOf))]
 #[cfg_attr(feature = "servo", derive(HeapSizeOf))]
 #[derive(Animate, Clone, ComputeSquaredDistance, Copy, Debug, PartialEq)]
 #[derive(ToComputedValue, ToCss)]
 pub enum ShapeRadius<LengthOrPercentage> {
     Length(LengthOrPercentage),
     #[animation(error)]
@@ -116,17 +116,17 @@ pub enum ShapeRadius<LengthOrPercentage>
     FarthestSide,
 }
 
 #[cfg_attr(feature = "gecko", derive(MallocSizeOf))]
 #[cfg_attr(feature = "servo", derive(HeapSizeOf))]
 #[derive(Clone, Debug, PartialEq, ToComputedValue)]
 /// A generic type for representing the `polygon()` function
 ///
-/// https://drafts.csswg.org/css-shapes/#funcdef-polygon
+/// <https://drafts.csswg.org/css-shapes/#funcdef-polygon>
 pub struct Polygon<LengthOrPercentage> {
     /// The filling rule for a polygon.
     pub fill: FillRule,
     /// A collection of (x, y) coordinates to draw the polygon.
     pub coordinates: Vec<(LengthOrPercentage, LengthOrPercentage)>,
 }
 
 // https://drafts.csswg.org/css-shapes/#typedef-fill-rule
--- a/servo/components/style/values/generics/border.rs
+++ b/servo/components/style/values/generics/border.rs
@@ -58,17 +58,17 @@ impl<L> BorderSpacing<L> {
     /// Trivially create a `BorderCornerRadius`.
     pub fn new(w: L, h: L) -> Self {
         BorderSpacing(Size::new(w, h))
     }
 }
 
 /// A generic value for `border-radius`, `outline-radius` and `inset()`.
 ///
-/// https://drafts.csswg.org/css-backgrounds-3/#border-radius
+/// <https://drafts.csswg.org/css-backgrounds-3/#border-radius>
 #[cfg_attr(feature = "gecko", derive(MallocSizeOf))]
 #[cfg_attr(feature = "servo", derive(HeapSizeOf))]
 #[derive(Animate, Clone, ComputeSquaredDistance, Copy, Debug)]
 #[derive(PartialEq, ToComputedValue)]
 pub struct BorderRadius<LengthOrPercentage> {
     /// The top left radius.
     pub top_left: BorderCornerRadius<LengthOrPercentage>,
     /// The top right radius.
--- a/servo/components/style/values/generics/grid.rs
+++ b/servo/components/style/values/generics/grid.rs
@@ -11,26 +11,26 @@ use std::{fmt, mem, usize};
 use style_traits::{ToCss, ParseError, StyleParseErrorKind};
 use values::{CSSFloat, CustomIdent, serialize_dimension};
 use values::computed::{Context, ToComputedValue};
 use values::specified;
 use values::specified::grid::parse_line_names;
 
 /// A `<grid-line>` type.
 ///
-/// https://drafts.csswg.org/css-grid/#typedef-grid-row-start-grid-line
+/// <https://drafts.csswg.org/css-grid/#typedef-grid-row-start-grid-line>
 #[cfg_attr(feature = "gecko", derive(MallocSizeOf))]
 #[cfg_attr(feature = "servo", derive(HeapSizeOf))]
 #[derive(Clone, Debug, Default, PartialEq, ToComputedValue)]
 pub struct GridLine<Integer> {
     /// Flag to check whether it's a `span` keyword.
     pub is_span: bool,
     /// A custom identifier for named lines.
     ///
-    /// https://drafts.csswg.org/css-grid/#grid-placement-slot
+    /// <https://drafts.csswg.org/css-grid/#grid-placement-slot>
     pub ident: Option<CustomIdent>,
     /// Denotes the nth grid line from grid item's placement.
     pub line_num: Option<Integer>,
 }
 
 impl<Integer> GridLine<Integer> {
     /// The `auto` value.
     pub fn auto() -> Self {
@@ -139,33 +139,33 @@ define_css_keyword_enum!{ TrackKeyword:
     "max-content" => MaxContent,
     "min-content" => MinContent
 }
 add_impls_for_keyword_enum!(TrackKeyword);
 
 /// A track breadth for explicit grid track sizing. It's generic solely to
 /// avoid re-implementing it for the computed type.
 ///
-/// https://drafts.csswg.org/css-grid/#typedef-track-breadth
+/// <https://drafts.csswg.org/css-grid/#typedef-track-breadth>
 #[cfg_attr(feature = "gecko", derive(MallocSizeOf))]
 #[cfg_attr(feature = "servo", derive(HeapSizeOf))]
 #[derive(Clone, Debug, PartialEq, ToComputedValue)]
 pub enum TrackBreadth<L> {
     /// The generic type is almost always a non-negative `<length-percentage>`
     Breadth(L),
     /// A flex fraction specified in `fr` units.
     Flex(CSSFloat),
     /// One of the track-sizing keywords (`auto`, `min-content`, `max-content`)
     Keyword(TrackKeyword),
 }
 
 impl<L> TrackBreadth<L> {
     /// Check whether this is a `<fixed-breadth>` (i.e., it only has `<length-percentage>`)
     ///
-    /// https://drafts.csswg.org/css-grid/#typedef-fixed-breadth
+    /// <https://drafts.csswg.org/css-grid/#typedef-fixed-breadth>
     #[inline]
     pub fn is_fixed(&self) -> bool {
         match *self {
             TrackBreadth::Breadth(ref _lop) => true,
             _ => false,
         }
     }
 }
@@ -178,38 +178,38 @@ impl<L: ToCss> ToCss for TrackBreadth<L>
             TrackBreadth::Keyword(ref k) => k.to_css(dest),
         }
     }
 }
 
 /// A `<track-size>` type for explicit grid track sizing. Like `<track-breadth>`, this is
 /// generic only to avoid code bloat. It only takes `<length-percentage>`
 ///
-/// https://drafts.csswg.org/css-grid/#typedef-track-size
+/// <https://drafts.csswg.org/css-grid/#typedef-track-size>
 #[cfg_attr(feature = "gecko", derive(MallocSizeOf))]
 #[cfg_attr(feature = "servo", derive(HeapSizeOf))]
 #[derive(Clone, Debug, PartialEq)]
 pub enum TrackSize<L> {
     /// A flexible `<track-breadth>`
     Breadth(TrackBreadth<L>),
     /// A `minmax` function for a range over an inflexible `<track-breadth>`
     /// and a flexible `<track-breadth>`
     ///
-    /// https://drafts.csswg.org/css-grid/#valdef-grid-template-columns-minmax
+    /// <https://drafts.csswg.org/css-grid/#valdef-grid-template-columns-minmax>
     Minmax(TrackBreadth<L>, TrackBreadth<L>),
     /// A `fit-content` function.
     ///
-    /// https://drafts.csswg.org/css-grid/#valdef-grid-template-columns-fit-content
+    /// <https://drafts.csswg.org/css-grid/#valdef-grid-template-columns-fit-content>
     FitContent(L),
 }
 
 impl<L> TrackSize<L> {
     /// Check whether this is a `<fixed-size>`
     ///
-    /// https://drafts.csswg.org/css-grid/#typedef-fixed-size
+    /// <https://drafts.csswg.org/css-grid/#typedef-fixed-size>
     pub fn is_fixed(&self) -> bool {
         match *self {
             TrackSize::Breadth(ref breadth) => breadth.is_fixed(),
             // For minmax function, it could be either
             // minmax(<fixed-breadth>, <track-breadth>) or minmax(<inflexible-breadth>, <fixed-breadth>),
             // and since both variants are a subset of minmax(<inflexible-breadth>, <track-breadth>), we only
             // need to make sure that they're fixed. So, we don't have to modify the parsing function.
             TrackSize::Minmax(ref breadth_1, ref breadth_2) => {
@@ -342,17 +342,17 @@ where
         dest.write_str(suffix)?;
     }
 
     Ok(())
 }
 
 /// The initial argument of the `repeat` function.
 ///
-/// https://drafts.csswg.org/css-grid/#typedef-track-repeat
+/// <https://drafts.csswg.org/css-grid/#typedef-track-repeat>
 #[cfg_attr(feature = "gecko", derive(MallocSizeOf))]
 #[cfg_attr(feature = "servo", derive(HeapSizeOf))]
 #[derive(Clone, Copy, Debug, PartialEq, ToComputedValue, ToCss)]
 pub enum RepeatCount<Integer> {
     /// A positive integer. This is allowed only for `<track-repeat>` and `<fixed-repeat>`
     Number(Integer),
     /// An `<auto-fill>` keyword allowed only for `<auto-repeat>`
     AutoFill,
@@ -472,17 +472,17 @@ pub enum TrackListValue<LengthOrPercenta
     /// A <track-size> value.
     TrackSize(TrackSize<LengthOrPercentage>),
     /// A <track-repeat> value.
     TrackRepeat(TrackRepeat<LengthOrPercentage, Integer>),
 }
 
 /// The type of a `<track-list>` as determined during parsing.
 ///
-/// https://drafts.csswg.org/css-grid/#typedef-track-list
+/// <https://drafts.csswg.org/css-grid/#typedef-track-list>
 #[derive(Clone, Copy, Debug, PartialEq, ToComputedValue)]
 #[cfg_attr(feature = "gecko", derive(MallocSizeOf))]
 #[cfg_attr(feature = "servo", derive(HeapSizeOf))]
 pub enum TrackListType {
     /// [`<auto-track-list>`](https://drafts.csswg.org/css-grid/#typedef-auto-track-list)
     ///
     /// If this type exists, then the value at the index in `line_names` field in `TrackList`
     /// has the `<line-names>?` list that comes before `<auto-repeat>`. If it's a specified value,
@@ -496,17 +496,17 @@ pub enum TrackListType {
     ///
     /// Note that this is a subset of the normal `<track-list>`, and so it could be used in place
     /// of the latter.
     Explicit,
 }
 
 /// A grid `<track-list>` type.
 ///
-/// https://drafts.csswg.org/css-grid/#typedef-track-list
+/// <https://drafts.csswg.org/css-grid/#typedef-track-list>
 #[cfg_attr(feature = "gecko", derive(MallocSizeOf))]
 #[cfg_attr(feature = "servo", derive(HeapSizeOf))]
 #[derive(Clone, Debug, PartialEq)]
 pub struct TrackList<LengthOrPercentage, Integer> {
     /// The type of this `<track-list>` (auto, explicit or general).
     ///
     /// In order to avoid parsing the same value multiple times, this does a single traversal
     /// and arrives at the type of value it has parsed (or bails out gracefully with an error).
--- a/servo/components/style/values/generics/image.rs
+++ b/servo/components/style/values/generics/image.rs
@@ -25,23 +25,23 @@ pub enum Image<Gradient, MozImageRect, I
     /// A `<gradient>` image.  Gradients are rather large, and not nearly as
     /// common as urls, so we box them here to keep the size of this enum sane.
     Gradient(Box<Gradient>),
     /// A `-moz-image-rect` image.  Also fairly large and rare.
     Rect(Box<MozImageRect>),
     /// A `-moz-element(# <element-id>)`
     Element(Atom),
     /// A paint worklet image.
-    /// https://drafts.css-houdini.org/css-paint-api/
+    /// <https://drafts.css-houdini.org/css-paint-api/>
     #[cfg(feature = "servo")]
     PaintWorklet(PaintWorklet),
 }
 
 /// A CSS gradient.
-/// https://drafts.csswg.org/css-images/#gradients
+/// <https://drafts.csswg.org/css-images/#gradients>
 #[cfg_attr(feature = "gecko", derive(MallocSizeOf))]
 #[cfg_attr(feature = "servo", derive(HeapSizeOf))]
 #[derive(Clone, Debug, PartialEq, ToComputedValue)]
 pub struct Gradient<LineDirection, Length, LengthOrPercentage, Position, Color, Angle> {
     /// Gradients can be linear or radial.
     pub kind: GradientKind<LineDirection, Length, LengthOrPercentage, Position, Angle>,
     /// The color stops and interpolation hints.
     pub items: Vec<GradientItem<Color, LengthOrPercentage>>,
@@ -105,53 +105,53 @@ pub enum Circle<Length> {
 #[cfg_attr(feature = "servo", derive(HeapSizeOf))]
 pub enum Ellipse<LengthOrPercentage> {
     /// An ellipse pair of radii.
     Radii(LengthOrPercentage, LengthOrPercentage),
     /// An ellipse extent.
     Extent(ShapeExtent),
 }
 
-/// https://drafts.csswg.org/css-images/#typedef-extent-keyword
+/// <https://drafts.csswg.org/css-images/#typedef-extent-keyword>
 define_css_keyword_enum!(ShapeExtent:
     "closest-side" => ClosestSide,
     "farthest-side" => FarthestSide,
     "closest-corner" => ClosestCorner,
     "farthest-corner" => FarthestCorner,
     "contain" => Contain,
     "cover" => Cover
 );
 add_impls_for_keyword_enum!(ShapeExtent);
 
 /// A gradient item.
-/// https://drafts.csswg.org/css-images-4/#color-stop-syntax
+/// <https://drafts.csswg.org/css-images-4/#color-stop-syntax>
 #[cfg_attr(feature = "gecko", derive(MallocSizeOf))]
 #[cfg_attr(feature = "servo", derive(HeapSizeOf))]
 #[derive(Clone, Copy, Debug, PartialEq, ToComputedValue, ToCss)]
 pub enum GradientItem<Color, LengthOrPercentage> {
     /// A color stop.
     ColorStop(ColorStop<Color, LengthOrPercentage>),
     /// An interpolation hint.
     InterpolationHint(LengthOrPercentage),
 }
 
 /// A color stop.
-/// https://drafts.csswg.org/css-images/#typedef-color-stop-list
+/// <https://drafts.csswg.org/css-images/#typedef-color-stop-list>
 #[derive(Clone, Copy, PartialEq, ToComputedValue, ToCss)]
 #[cfg_attr(feature = "gecko", derive(MallocSizeOf))]
 #[cfg_attr(feature = "servo", derive(HeapSizeOf))]
 pub struct ColorStop<Color, LengthOrPercentage> {
     /// The color of this stop.
     pub color: Color,
     /// The position of this stop.
     pub position: Option<LengthOrPercentage>,
 }
 
 /// Specified values for a paint worklet.
-/// https://drafts.css-houdini.org/css-paint-api/
+/// <https://drafts.css-houdini.org/css-paint-api/>
 #[derive(Clone, Debug, PartialEq)]
 #[cfg_attr(feature = "servo", derive(HeapSizeOf))]
 pub struct PaintWorklet {
     /// The name the worklet was registered with.
     pub name: Atom,
     /// The arguments for the worklet.
     /// TODO: store a parsed representation of the arguments.
     #[cfg_attr(feature = "servo", ignore_heap_size_of = "Arc")]
--- a/servo/components/style/values/generics/mod.rs
+++ b/servo/components/style/values/generics/mod.rs
@@ -63,17 +63,17 @@ impl SymbolsType {
             structs::NS_STYLE_COUNTER_SYSTEM_ALPHABETIC => SymbolsType::Alphabetic,
             structs::NS_STYLE_COUNTER_SYSTEM_SYMBOLIC => SymbolsType::Symbolic,
             structs::NS_STYLE_COUNTER_SYSTEM_FIXED => SymbolsType::Fixed,
             x => panic!("Unexpected value for symbol type {}", x)
         }
     }
 }
 
-/// https://drafts.csswg.org/css-counter-styles/#typedef-counter-style
+/// <https://drafts.csswg.org/css-counter-styles/#typedef-counter-style>
 ///
 /// Since wherever <counter-style> is used, 'none' is a valid value as
 /// well, we combine them into one type to make code simpler.
 #[cfg_attr(feature = "gecko", derive(MallocSizeOf))]
 #[derive(Clone, Debug, Eq, PartialEq, ToComputedValue, ToCss)]
 pub enum CounterStyleOrNone {
     /// `none`
     None,
@@ -154,18 +154,18 @@ impl<T: ToCss> ToCss for FontSettingTag<
         BigEndian::write_u32(&mut raw, self.tag);
         str::from_utf8(&raw).unwrap_or_default().to_css(dest)?;
 
         self.value.to_css(dest)
     }
 }
 
 impl<T: Parse> Parse for FontSettingTag<T> {
-    /// https://www.w3.org/TR/css-fonts-3/#propdef-font-feature-settings
-    /// https://drafts.csswg.org/css-fonts-4/#low-level-font-variation-
+    /// <https://www.w3.org/TR/css-fonts-3/#propdef-font-feature-settings>
+    /// <https://drafts.csswg.org/css-fonts-4/#low-level-font-variation->
     /// settings-control-the-font-variation-settings-property
     /// <string> [ on | off | <integer> ]
     /// <string> <number>
     fn parse<'i, 't>(context: &ParserContext, input: &mut Parser<'i, 't>) -> Result<Self, ParseError<'i>> {
         use byteorder::{ReadBytesExt, BigEndian};
         use std::io::Cursor;
 
         let u_tag;
@@ -196,17 +196,17 @@ impl<T: Parse> Parse for FontSettingTag<
 pub enum FontSettings<T> {
     /// No settings (default)
     Normal,
     /// Set of settings
     Tag(Vec<FontSettingTag<T>>)
 }
 
 impl<T: Parse> Parse for FontSettings<T> {
-    /// https://www.w3.org/TR/css-fonts-3/#propdef-font-feature-settings
+    /// <https://www.w3.org/TR/css-fonts-3/#propdef-font-feature-settings>
     fn parse<'i, 't>(context: &ParserContext, input: &mut Parser<'i, 't>) -> Result<Self, ParseError<'i>> {
         if input.try(|i| i.expect_ident_matching("normal")).is_ok() {
             return Ok(FontSettings::Normal);
         }
         Vec::parse(context, input).map(FontSettings::Tag)
     }
 }
 
--- a/servo/components/style/values/generics/svg.rs
+++ b/servo/components/style/values/generics/svg.rs
@@ -10,17 +10,17 @@ use std::fmt;
 use style_traits::{ParseError, StyleParseErrorKind, ToCss};
 use values::{Either, None_};
 use values::computed::NumberOrPercentage;
 use values::computed::length::LengthOrPercentage;
 use values::distance::{ComputeSquaredDistance, SquaredDistance};
 
 /// An SVG paint value
 ///
-/// https://www.w3.org/TR/SVG2/painting.html#SpecifyingPaint
+/// <https://www.w3.org/TR/SVG2/painting.html#SpecifyingPaint>
 #[cfg_attr(feature = "gecko", derive(MallocSizeOf))]
 #[cfg_attr(feature = "servo", derive(HeapSizeOf))]
 #[derive(Animate, Clone, ComputeSquaredDistance, Debug, PartialEq)]
 #[derive(ToAnimatedValue, ToComputedValue, ToCss)]
 pub struct SVGPaint<ColorType, UrlPaintServer> {
     /// The paint source
     pub kind: SVGPaintKind<ColorType, UrlPaintServer>,
     /// The fallback color. It would be empty, the `none` keyword or <color>.
@@ -59,17 +59,17 @@ impl<ColorType, UrlPaintServer> SVGPaint
             "context-fill" => Ok(SVGPaintKind::ContextFill),
             "context-stroke" => Ok(SVGPaintKind::ContextStroke),
         }
     }
 }
 
 /// Parse SVGPaint's fallback.
 /// fallback is keyword(none), Color or empty.
-/// https://svgwg.org/svg2-draft/painting.html#SpecifyingPaint
+/// <https://svgwg.org/svg2-draft/painting.html#SpecifyingPaint>
 fn parse_fallback<'i, 't, ColorType: Parse>(context: &ParserContext,
                                             input: &mut Parser<'i, 't>)
                                             -> Option<Either<ColorType, None_>> {
     if input.try(|i| i.expect_ident_matching("none")).is_ok() {
         Some(Either::Second(None_))
     } else {
         if let Ok(color) = input.try(|i| ColorType::parse(context, i)) {
             Some(Either::First(color))
@@ -105,17 +105,17 @@ impl<ColorType: Parse, UrlPaintServer: P
             })
         } else {
             Err(input.new_custom_error(StyleParseErrorKind::UnspecifiedError))
         }
     }
 }
 
 /// A value of <length> | <percentage> | <number> for svg which allow unitless length.
-/// https://www.w3.org/TR/SVG11/painting.html#StrokeProperties
+/// <https://www.w3.org/TR/SVG11/painting.html#StrokeProperties>
 #[cfg_attr(feature = "gecko", derive(MallocSizeOf))]
 #[cfg_attr(feature = "servo", derive(HeapSizeOf))]
 #[derive(Clone, Copy, Debug, PartialEq, ToAnimatedValue)]
 #[derive(ToAnimatedZero, ToComputedValue, ToCss)]
 pub enum SvgLengthOrPercentageOrNumber<LengthOrPercentage, Number> {
     /// <length> | <percentage>
     LengthOrPercentage(LengthOrPercentage),
     /// <number>
--- a/servo/components/style/values/generics/transform.rs
+++ b/servo/components/style/values/generics/transform.rs
@@ -34,17 +34,17 @@ pub struct TransformOrigin<H, V, Depth> 
     /// The vertical origin.
     pub vertical: V,
     /// The depth.
     pub depth: Depth,
 }
 
 /// A generic timing function.
 ///
-/// https://drafts.csswg.org/css-timing-1/#single-timing-function-production
+/// <https://drafts.csswg.org/css-timing-1/#single-timing-function-production>
 #[cfg_attr(feature = "gecko", derive(MallocSizeOf))]
 #[cfg_attr(feature = "servo", derive(HeapSizeOf))]
 #[derive(Clone, Copy, Debug, PartialEq)]
 pub enum TimingFunction<Integer, Number> {
     /// `linear | ease | ease-in | ease-out | ease-in-out`
     Keyword(TimingKeyword),
     /// `cubic-bezier(<number>, <number>, <number>, <number>)`
     #[allow(missing_docs)]
--- a/servo/components/style/values/mod.rs
+++ b/servo/components/style/values/mod.rs
@@ -90,17 +90,17 @@ impl<A: Parse, B: Parse> Parse for Eithe
         if let Ok(v) = input.try(|i| A::parse(context, i)) {
             Ok(Either::First(v))
         } else {
             B::parse(context, input).map(Either::Second)
         }
     }
 }
 
-/// https://drafts.csswg.org/css-values-4/#custom-idents
+/// <https://drafts.csswg.org/css-values-4/#custom-idents>
 #[derive(Clone, Debug, Eq, Hash, PartialEq, ToComputedValue)]
 #[cfg_attr(feature = "gecko", derive(MallocSizeOf))]
 #[cfg_attr(feature = "servo", derive(HeapSizeOf))]
 pub struct CustomIdent(pub Atom);
 
 impl CustomIdent {
     /// Parse an already-tokenizer identifier
     pub fn from_ident<'i>(location: SourceLocation, ident: &CowRcStr<'i>, excluding: &[&str])
@@ -121,29 +121,29 @@ impl CustomIdent {
 }
 
 impl ToCss for CustomIdent {
     fn to_css<W>(&self, dest: &mut W) -> fmt::Result where W: fmt::Write {
         serialize_identifier(&self.0.to_string(), dest)
     }
 }
 
-/// https://drafts.csswg.org/css-animations/#typedef-keyframes-name
+/// <https://drafts.csswg.org/css-animations/#typedef-keyframes-name>
 #[derive(Clone, Debug, ToComputedValue)]
 #[cfg_attr(feature = "gecko", derive(MallocSizeOf))]
 #[cfg_attr(feature = "servo", derive(HeapSizeOf))]
 pub enum KeyframesName {
     /// <custom-ident>
     Ident(CustomIdent),
     /// <string>
     QuotedString(Atom),
 }
 
 impl KeyframesName {
-    /// https://drafts.csswg.org/css-animations/#dom-csskeyframesrule-name
+    /// <https://drafts.csswg.org/css-animations/#dom-csskeyframesrule-name>
     pub fn from_ident(value: &str) -> Self {
         let location = SourceLocation { line: 0, column: 0 };
         let custom_ident = CustomIdent::from_ident(location, &value.into(), &["none"]).ok();
         match custom_ident {
             Some(ident) => KeyframesName::Ident(ident),
             None => KeyframesName::QuotedString(value.into()),
         }
     }
--- a/servo/components/style/values/specified/align.rs
+++ b/servo/components/style/values/specified/align.rs
@@ -106,17 +106,17 @@ impl ToCss for AlignFlags {
 
 /// Mask for a single AlignFlags value.
 const ALIGN_ALL_BITS: u16 = structs::NS_STYLE_ALIGN_ALL_BITS as u16;
 /// Number of bits to shift a fallback alignment.
 const ALIGN_ALL_SHIFT: u32 = structs::NS_STYLE_ALIGN_ALL_SHIFT;
 
 /// Value of the `align-content` or `justify-content` property.
 ///
-/// https://drafts.csswg.org/css-align/#content-distribution
+/// <https://drafts.csswg.org/css-align/#content-distribution>
 ///
 /// The 16-bit field stores the primary value in its lower 8 bits, and the optional fallback value
 /// in its upper 8 bits.  This matches the representation of these properties in Gecko.
 #[derive(Clone, Copy, Debug, Eq, PartialEq, ToComputedValue)]
 #[cfg_attr(feature = "gecko", derive(MallocSizeOf))]
 #[cfg_attr(feature = "servo", derive(HeapSizeOf, Deserialize, Serialize))]
 pub struct AlignJustifyContent(u16);
 
@@ -130,17 +130,17 @@ impl AlignJustifyContent {
     /// Construct a value with no fallback.
     #[inline]
     pub fn new(flags: AlignFlags) -> Self {
         AlignJustifyContent(flags.bits() as u16)
     }
 
     /// Construct a value including a fallback alignment.
     ///
-    /// https://drafts.csswg.org/css-align/#fallback-alignment
+    /// <https://drafts.csswg.org/css-align/#fallback-alignment>
     #[inline]
     pub fn with_fallback(flags: AlignFlags, fallback: AlignFlags) -> Self {
         AlignJustifyContent(flags.bits() as u16 | ((fallback.bits() as u16) << ALIGN_ALL_SHIFT))
     }
 
     /// The primary alignment
     #[inline]
     pub fn primary(self) -> AlignFlags {
@@ -202,17 +202,17 @@ impl Parse for AlignJustifyContent {
             return Ok(AlignJustifyContent::new(fallback))
         }
         Err(input.new_custom_error(StyleParseErrorKind::UnspecifiedError))
     }
 }
 
 /// Value of the `align-self` or `justify-self` property.
 ///
-/// https://drafts.csswg.org/css-align/#self-alignment
+/// <https://drafts.csswg.org/css-align/#self-alignment>
 #[cfg_attr(feature = "gecko", derive(MallocSizeOf))]
 #[derive(Clone, Copy, Debug, Eq, PartialEq, ToComputedValue, ToCss)]
 pub struct AlignJustifySelf(pub AlignFlags);
 
 impl AlignJustifySelf {
     /// The initial value 'auto'
     #[inline]
     pub fn auto() -> Self {
@@ -240,17 +240,17 @@ impl Parse for AlignJustifySelf {
             return Ok(AlignJustifySelf(value))
         }
         Err(input.new_custom_error(StyleParseErrorKind::UnspecifiedError))
     }
 }
 
 /// Value of the `align-items` property
 ///
-/// https://drafts.csswg.org/css-align/#self-alignment
+/// <https://drafts.csswg.org/css-align/#self-alignment>
 #[cfg_attr(feature = "gecko", derive(MallocSizeOf))]
 #[derive(Clone, Copy, Debug, Eq, PartialEq, ToComputedValue, ToCss)]
 pub struct AlignItems(pub AlignFlags);
 
 impl AlignItems {
     /// The initial value 'normal'
     #[inline]
     pub fn normal() -> Self {
@@ -278,17 +278,17 @@ impl Parse for AlignItems {
             return Ok(AlignItems(value))
         }
         Err(input.new_custom_error(StyleParseErrorKind::UnspecifiedError))
     }
 }
 
 /// Value of the `justify-items` property
 ///
-/// https://drafts.csswg.org/css-align/#justify-items-property
+/// <https://drafts.csswg.org/css-align/#justify-items-property>
 #[cfg_attr(feature = "gecko", derive(MallocSizeOf))]
 #[derive(Clone, Copy, Debug, Eq, PartialEq, ToCss)]
 pub struct JustifyItems(pub AlignFlags);
 
 impl JustifyItems {
     /// The initial value 'auto'
     #[inline]
     pub fn auto() -> Self {
--- a/servo/components/style/values/specified/basic_shape.rs
+++ b/servo/components/style/values/specified/basic_shape.rs
@@ -232,17 +232,17 @@ impl Parse for ShapeRadius {
 
         try_match_ident_ignore_ascii_case! { input,
             "closest-side" => Ok(GenericShapeRadius::ClosestSide),
             "farthest-side" => Ok(GenericShapeRadius::FarthestSide),
         }
     }
 }
 
-/// https://drafts.csswg.org/css-shapes/#basic-shape-serialization
+/// <https://drafts.csswg.org/css-shapes/#basic-shape-serialization>
 ///
 /// Positions get serialized differently with basic shapes. Keywords
 /// are converted to percentages where possible. Only the two or four
 /// value forms are used. In case of two keyword-percentage pairs,
 /// the keywords are folded into the percentages
 fn serialize_basicshape_position<W>(position: &Position, dest: &mut W) -> fmt::Result
     where W: fmt::Write
 {
--- a/servo/components/style/values/specified/calc.rs
+++ b/servo/components/style/values/specified/calc.rs
@@ -79,17 +79,17 @@ pub struct CalcLengthOrPercentage {
     pub ch: Option<CSSFloat>,
     pub rem: Option<CSSFloat>,
     pub percentage: Option<computed::Percentage>,
     #[cfg(feature = "gecko")]
     pub mozmm: Option<CSSFloat>,
 }
 
 impl ToCss for CalcLengthOrPercentage {
-    /// https://drafts.csswg.org/css-values/#calc-serialize
+    /// <https://drafts.csswg.org/css-values/#calc-serialize>
     ///
     /// FIXME(emilio): Should this simplify away zeros?
     #[allow(unused_assignments)]
     fn to_css<W>(&self, dest: &mut W) -> fmt::Result where W: fmt::Write {
         use num_traits::Zero;
 
         let mut first_value = true;
         macro_rules! first_value_check {
--- a/servo/components/style/values/specified/color.rs
+++ b/servo/components/style/values/specified/color.rs
@@ -123,34 +123,34 @@ impl Color {
         Color::Numeric {
             parsed: rgba,
             authored: None,
         }
     }
 
     /// Parse a color, with quirks.
     ///
-    /// https://quirks.spec.whatwg.org/#the-hashless-hex-color-quirk
+    /// <https://quirks.spec.whatwg.org/#the-hashless-hex-color-quirk>
     pub fn parse_quirky<'i, 't>(context: &ParserContext,
                                 input: &mut Parser<'i, 't>,
                                 allow_quirks: AllowQuirks)
                                 -> Result<Self, ParseError<'i>> {
         input.try(|i| Self::parse(context, i)).or_else(|e| {
             if !allow_quirks.allowed(context.quirks_mode) {
                 return Err(e);
             }
             Color::parse_quirky_color(input)
                 .map(|rgba| Color::rgba(rgba))
                 .map_err(|_| e)
         })
     }
 
     /// Parse a <quirky-color> value.
     ///
-    /// https://quirks.spec.whatwg.org/#the-hashless-hex-color-quirk
+    /// <https://quirks.spec.whatwg.org/#the-hashless-hex-color-quirk>
     fn parse_quirky_color<'i, 't>(input: &mut Parser<'i, 't>) -> Result<RGBA, ParseError<'i>> {
         let location = input.current_source_location();
         let (value, unit) = match *input.next()? {
             Token::Number { int_value: Some(integer), .. } => {
                 (integer, None)
             },
             Token::Dimension { int_value: Some(integer), ref unit, .. } => {
                 (integer, Some(unit))
--- a/servo/components/style/values/specified/font.rs
+++ b/servo/components/style/values/specified/font.rs
@@ -234,17 +234,17 @@ impl ToComputedValue for KeywordSize {
 
     #[inline]
     fn from_computed_value(_: &NonNegativeLength) -> Self {
         unreachable!()
     }
 }
 
 impl FontSize {
-    /// https://html.spec.whatwg.org/multipage/#rules-for-parsing-a-legacy-font-size
+    /// <https://html.spec.whatwg.org/multipage/#rules-for-parsing-a-legacy-font-size>
     pub fn from_html_size(size: u8) -> Self {
         FontSize::Keyword(match size {
             // If value is less than 1, let it be 1.
             0 | 1 => KeywordSize::XSmall,
             2 => KeywordSize::Small,
             3 => KeywordSize::Medium,
             4 => KeywordSize::Large,
             5 => KeywordSize::XLarge,
--- a/servo/components/style/values/specified/gecko.rs
+++ b/servo/components/style/values/specified/gecko.rs
@@ -80,17 +80,17 @@ impl ToNsCssValue for PixelOrPercentage 
     }
 }
 
 /// The value of an IntersectionObserver's rootMargin property.
 ///
 /// Only bare px or percentage values are allowed. Other length units and
 /// calc() values are not allowed.
 ///
-/// https://w3c.github.io/IntersectionObserver/#parse-a-root-margin
+/// <https://w3c.github.io/IntersectionObserver/#parse-a-root-margin>
 pub struct IntersectionObserverRootMargin(pub Rect<PixelOrPercentage>);
 
 impl Parse for IntersectionObserverRootMargin {
     fn parse<'i, 't>(
         context: &ParserContext,
         input: &mut Parser<'i, 't>,
     ) -> Result<Self, ParseError<'i>> {
         let rect = Rect::parse_with(context, input, PixelOrPercentage::parse)?;
--- a/servo/components/style/values/specified/grid.rs
+++ b/servo/components/style/values/specified/grid.rs
@@ -65,17 +65,17 @@ impl Parse for TrackSize<LengthOrPercent
         input.expect_function_matching("fit-content")?;
         let lop = input.parse_nested_block(|i| LengthOrPercentage::parse_non_negative(context, i))?;
         Ok(TrackSize::FitContent(lop))
     }
 }
 
 /// Parse the grid line names into a vector of owned strings.
 ///
-/// https://drafts.csswg.org/css-grid/#typedef-line-names
+/// <https://drafts.csswg.org/css-grid/#typedef-line-names>
 pub fn parse_line_names<'i, 't>(input: &mut Parser<'i, 't>) -> Result<Box<[CustomIdent]>, ParseError<'i>> {
     input.expect_square_bracket_block()?;
     input.parse_nested_block(|input| {
         let mut values = vec![];
         while let Ok((loc, ident)) = input.try(|i| -> Result<_, CssParseError<()>> {
              Ok((i.current_source_location(), i.expect_ident_cloned()?))
         }) {
             let ident = CustomIdent::from_ident(loc, &ident, &["span"])?;
@@ -83,17 +83,17 @@ pub fn parse_line_names<'i, 't>(input: &
         }
 
         Ok(values.into_boxed_slice())
     })
 }
 
 /// The type of `repeat` function (only used in parsing).
 ///
-/// https://drafts.csswg.org/css-grid/#typedef-track-repeat
+/// <https://drafts.csswg.org/css-grid/#typedef-track-repeat>
 #[derive(Clone, Copy, Debug, PartialEq)]
 #[cfg_attr(feature = "servo", derive(HeapSizeOf))]
 enum RepeatType {
     /// [`<auto-repeat>`](https://drafts.csswg.org/css-grid/#typedef-auto-repeat)
     Auto,
     /// [`<track-repeat>`](https://drafts.csswg.org/css-grid/#typedef-track-repeat)
     Normal,
     /// [`<fixed-repeat>`](https://drafts.csswg.org/css-grid/#typedef-fixed-repeat)
--- a/servo/components/style/values/specified/image.rs
+++ b/servo/components/style/values/specified/image.rs
@@ -32,33 +32,33 @@ use values::specified::{Angle, Color, Le
 use values::specified::{Number, NumberOrPercentage, Percentage, RGBAColor};
 use values::specified::position::{LegacyPosition, Position, PositionComponent, Side, X, Y};
 use values::specified::url::SpecifiedUrl;
 
 /// A specified image layer.
 pub type ImageLayer = Either<None_, Image>;
 
 /// Specified values for an image according to CSS-IMAGES.
-/// https://drafts.csswg.org/css-images/#image-values
+/// <https://drafts.csswg.org/css-images/#image-values>
 pub type Image = GenericImage<Gradient, MozImageRect, SpecifiedUrl>;
 
 /// Specified values for a CSS gradient.
-/// https://drafts.csswg.org/css-images/#gradients
+/// <https://drafts.csswg.org/css-images/#gradients>
 #[cfg(not(feature = "gecko"))]
 pub type Gradient = GenericGradient<
     LineDirection,
     Length,
     LengthOrPercentage,
     Position,
     RGBAColor,
     Angle,
 >;
 
 /// Specified values for a CSS gradient.
-/// https://drafts.csswg.org/css-images/#gradients
+/// <https://drafts.csswg.org/css-images/#gradients>
 #[cfg(feature = "gecko")]
 pub type Gradient = GenericGradient<
     LineDirection,
     Length,
     LengthOrPercentage,
     GradientPosition,
     RGBAColor,
     Angle,
--- a/servo/components/style/values/specified/length.rs
+++ b/servo/components/style/values/specified/length.rs
@@ -208,25 +208,25 @@ impl FontRelativeLength {
     }
 }
 
 #[derive(Clone, Copy, Debug, PartialEq)]
 #[cfg_attr(feature = "gecko", derive(MallocSizeOf))]
 #[cfg_attr(feature = "servo", derive(HeapSizeOf))]
 /// A viewport-relative length.
 ///
-/// https://drafts.csswg.org/css-values/#viewport-relative-lengths
+/// <https://drafts.csswg.org/css-values/#viewport-relative-lengths>
 pub enum ViewportPercentageLength {
     /// A vw unit: https://drafts.csswg.org/css-values/#vw
     Vw(CSSFloat),
     /// A vh unit: https://drafts.csswg.org/css-values/#vh
     Vh(CSSFloat),
-    /// https://drafts.csswg.org/css-values/#vmin
+    /// <https://drafts.csswg.org/css-values/#vmin>
     Vmin(CSSFloat),
-    /// https://drafts.csswg.org/css-values/#vmax
+    /// <https://drafts.csswg.org/css-values/#vmax>
     Vmax(CSSFloat)
 }
 
 impl ToCss for ViewportPercentageLength {
     fn to_css<W>(&self, dest: &mut W) -> fmt::Result where W: fmt::Write {
         match *self {
             ViewportPercentageLength::Vw(length) => serialize_dimension(length, "vw", dest),
             ViewportPercentageLength::Vh(length) => serialize_dimension(length, "vh", dest),
@@ -435,34 +435,34 @@ impl Mul<CSSFloat> for PhysicalLength {
     #[inline]
     fn mul(self, scalar: CSSFloat) -> PhysicalLength {
         PhysicalLength(self.0 * scalar)
     }
 }
 
 /// A `<length>` without taking `calc` expressions into account
 ///
-/// https://drafts.csswg.org/css-values/#lengths
+/// <https://drafts.csswg.org/css-values/#lengths>
 #[derive(Clone, Copy, Debug, PartialEq)]
 #[cfg_attr(feature = "gecko", derive(MallocSizeOf))]
 #[cfg_attr(feature = "servo", derive(HeapSizeOf))]
 pub enum NoCalcLength {
     /// An absolute length
     ///
-    /// https://drafts.csswg.org/css-values/#absolute-length
+    /// <https://drafts.csswg.org/css-values/#absolute-length>
     Absolute(AbsoluteLength),
 
     /// A font-relative length:
     ///
-    /// https://drafts.csswg.org/css-values/#font-relative-lengths
+    /// <https://drafts.csswg.org/css-values/#font-relative-lengths>
     FontRelative(FontRelativeLength),
 
     /// A viewport-relative length.
     ///
-    /// https://drafts.csswg.org/css-values/#viewport-relative-lengths
+    /// <https://drafts.csswg.org/css-values/#viewport-relative-lengths>
     ViewportPercentage(ViewportPercentageLength),
 
     /// HTML5 "character width", as defined in HTML5 ยง 14.5.4.
     ///
     /// This cannot be specified by the user directly and is only generated by
     /// `Stylist::synthesize_rules_for_legacy_attributes()`.
     ServoCharacterWidth(CharacterWidth),
 
@@ -576,26 +576,26 @@ impl NoCalcLength {
     pub fn from_px(px_value: CSSFloat) -> NoCalcLength {
         NoCalcLength::Absolute(AbsoluteLength::Px(px_value))
     }
 }
 
 /// An extension to `NoCalcLength` to parse `calc` expressions.
 /// This is commonly used for the `<length>` values.
 ///
-/// https://drafts.csswg.org/css-values/#lengths
+/// <https://drafts.csswg.org/css-values/#lengths>
 #[cfg_attr(feature = "gecko", derive(MallocSizeOf))]
 #[cfg_attr(feature = "servo", derive(HeapSizeOf))]
 #[derive(Clone, Debug, PartialEq, ToCss)]
 pub enum Length {
     /// The internal length type that cannot parse `calc`
     NoCalc(NoCalcLength),
     /// A calc expression.
     ///
-    /// https://drafts.csswg.org/css-values/#calc-notation
+    /// <https://drafts.csswg.org/css-values/#calc-notation>
     Calc(Box<CalcLengthOrPercentage>),
 }
 
 impl From<NoCalcLength> for Length {
     #[inline]
     fn from(len: NoCalcLength) -> Self {
         Length::NoCalc(len)
     }
@@ -903,17 +903,17 @@ impl LengthOrPercentage {
                                              input: &mut Parser<'i, 't>,
                                              allow_quirks: AllowQuirks)
                                              -> Result<LengthOrPercentage, ParseError<'i>> {
         Self::parse_internal(context, input, AllowedNumericType::NonNegative, allow_quirks)
     }
 
     /// Parse a length, treating dimensionless numbers as pixels
     ///
-    /// https://www.w3.org/TR/SVG2/types.html#presentation-attribute-css-value
+    /// <https://www.w3.org/TR/SVG2/types.html#presentation-attribute-css-value>
     pub fn parse_numbers_are_pixels<'i, 't>(context: &ParserContext, input: &mut Parser<'i, 't>)
                                             -> Result<LengthOrPercentage, ParseError<'i>> {
         if let Ok(lop) = input.try(|i| Self::parse(context, i)) {
             return Ok(lop)
         }
 
         // TODO(emilio): Probably should use Number::parse_non_negative to
         // handle calc()?
@@ -954,17 +954,17 @@ impl Parse for LengthOrPercentage {
     #[inline]
     fn parse<'i, 't>(context: &ParserContext, input: &mut Parser<'i, 't>) -> Result<Self, ParseError<'i>> {
         Self::parse_quirky(context, input, AllowQuirks::No)
     }
 }
 
 impl LengthOrPercentage {
     /// Parses a length or a percentage, allowing the unitless length quirk.
-    /// https://quirks.spec.whatwg.org/#the-unitless-length-quirk
+    /// <https://quirks.spec.whatwg.org/#the-unitless-length-quirk>
     #[inline]
     pub fn parse_quirky<'i, 't>(context: &ParserContext,
                                 input: &mut Parser<'i, 't>,
                                 allow_quirks: AllowQuirks) -> Result<Self, ParseError<'i>> {
         Self::parse_internal(context, input, AllowedNumericType::All, allow_quirks)
     }
 }
 
@@ -1186,17 +1186,17 @@ impl Parse for NonNegativeLengthOrPercen
 impl NonNegativeLengthOrPercentage {
     #[inline]
     /// Returns a `zero` length.
     pub fn zero() -> Self {
         NonNegative::<LengthOrPercentage>(LengthOrPercentage::zero())
     }
 
     /// Parses a length or a percentage, allowing the unitless length quirk.
-    /// https://quirks.spec.whatwg.org/#the-unitless-length-quirk
+    /// <https://quirks.spec.whatwg.org/#the-unitless-length-quirk>
     #[inline]
     pub fn parse_quirky<'i, 't>(context: &ParserContext,
                                 input: &mut Parser<'i, 't>,
                                 allow_quirks: AllowQuirks) -> Result<Self, ParseError<'i>> {
         LengthOrPercentage::parse_non_negative_quirky(context, input, allow_quirks)
             .map(NonNegative::<LengthOrPercentage>)
     }
 }
--- a/servo/components/style/values/specified/mod.rs
+++ b/servo/components/style/values/specified/mod.rs
@@ -360,17 +360,17 @@ impl ToComputedValue for Opacity {
     #[inline]
     fn from_computed_value(computed: &CSSFloat) -> Self {
         Opacity(Number::from_computed_value(computed))
     }
 }
 
 /// An specified `<integer>`, optionally coming from a `calc()` expression.
 ///
-/// https://drafts.csswg.org/css-values/#integers
+/// <https://drafts.csswg.org/css-values/#integers>
 #[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
 #[cfg_attr(feature = "gecko", derive(MallocSizeOf))]
 #[cfg_attr(feature = "servo", derive(HeapSizeOf))]
 pub struct Integer {
     value: CSSInteger,
     was_calc: bool,
 }
 
--- a/servo/components/style/values/specified/svg.rs
+++ b/servo/components/style/values/specified/svg.rs
@@ -38,17 +38,17 @@ fn parse_context_value<'i, 't, T>(input:
         if input.expect_ident_matching("context-value").is_ok() {
             return Ok(value);
         }
     }
     Err(input.new_custom_error(StyleParseErrorKind::UnspecifiedError))
 }
 
 /// A value of <length> | <percentage> | <number> for stroke-dashoffset.
-/// https://www.w3.org/TR/SVG11/painting.html#StrokeProperties
+/// <https://www.w3.org/TR/SVG11/painting.html#StrokeProperties>
 pub type SvgLengthOrPercentageOrNumber =
     generic::SvgLengthOrPercentageOrNumber<LengthOrPercentage, Number>;
 
 /// <length> | <percentage> | <number> | context-value
 pub type SVGLength = generic::SVGLength<SvgLengthOrPercentageOrNumber>;
 
 impl Parse for SVGLength {
     fn parse<'i, 't>(context: &ParserContext, input: &mut Parser<'i, 't>)
@@ -61,17 +61,17 @@ impl Parse for SVGLength {
 
 impl From<SvgLengthOrPercentageOrNumber> for SVGLength {
     fn from(length: SvgLengthOrPercentageOrNumber) -> Self {
         generic::SVGLength::Length(length)
     }
 }
 
 /// A value of <length> | <percentage> | <number> for stroke-width/stroke-dasharray.
-/// https://www.w3.org/TR/SVG11/painting.html#StrokeProperties
+/// <https://www.w3.org/TR/SVG11/painting.html#StrokeProperties>
 pub type NonNegativeSvgLengthOrPercentageOrNumber =
     generic::SvgLengthOrPercentageOrNumber<NonNegativeLengthOrPercentage, NonNegativeNumber>;
 
 /// A non-negative version of SVGLength.
 pub type SVGWidth = generic::SVGLength<NonNegativeSvgLengthOrPercentageOrNumber>;
 
 impl Parse for SVGWidth {
     fn parse<'i, 't>(context: &ParserContext, input: &mut Parser<'i, 't>)
--- a/servo/components/style_traits/cursor.rs
+++ b/servo/components/style_traits/cursor.rs
@@ -10,17 +10,17 @@ macro_rules! define_cursor {
     (
         common properties = [
             $( $c_css: expr => $c_variant: ident = $c_value: expr, )+
         ]
         gecko properties = [
             $( $g_css: expr => $g_variant: ident = $g_value: expr, )+
         ]
     ) => {
-        /// https://drafts.csswg.org/css-ui/#cursor
+        /// <https://drafts.csswg.org/css-ui/#cursor>
         #[derive(Clone, Copy, Debug, Eq, PartialEq)]
         #[cfg_attr(feature = "gecko", derive(MallocSizeOf))]
         #[cfg_attr(feature = "servo", derive(Deserialize, Serialize, HeapSizeOf))]
         #[repr(u8)]
         #[allow(missing_docs)]
         pub enum Cursor {
             $( $c_variant = $c_value, )+
             $( #[cfg(feature = "gecko")] $g_variant = $g_value, )+
--- a/servo/components/style_traits/lib.rs
+++ b/servo/components/style_traits/lib.rs
@@ -52,17 +52,17 @@ impl PinchZoomFactor {
 
     /// Get the pinch zoom factor as an untyped float.
     pub fn get(&self) -> f32 {
         self.0
     }
 }
 
 /// One CSS "px" in the coordinate system of the "initial viewport":
-/// http://www.w3.org/TR/css-device-adapt/#initial-viewport
+/// <http://www.w3.org/TR/css-device-adapt/#initial-viewport>
 ///
 /// `CSSPixel` is equal to `DeviceIndependentPixel` times a "page zoom" factor controlled by the user.  This is
 /// the desktop-style "full page" zoom that enlarges content but then reflows the layout viewport
 /// so it still exactly fits the visible area.
 ///
 /// At the default zoom level of 100%, one `CSSPixel` is equal to one `DeviceIndependentPixel`.  However, if the
 /// document is zoomed in or out then this scale may be larger or smaller.
 #[derive(Clone, Copy, Debug)]
@@ -196,24 +196,24 @@ impl<'i> StyleParseErrorKind<'i> {
         }
     }
 }
 
 bitflags! {
     /// The mode to use when parsing values.
     pub flags ParsingMode: u8 {
         /// In CSS, lengths must have units, except for zero values, where the unit can be omitted.
-        /// https://www.w3.org/TR/css3-values/#lengths
+        /// <https://www.w3.org/TR/css3-values/#lengths>
         const PARSING_MODE_DEFAULT = 0x00,
         /// In SVG, a coordinate or length value without a unit identifier (e.g., "25") is assumed
         /// to be in user units (px).
-        /// https://www.w3.org/TR/SVG/coords.html#Units
+        /// <https://www.w3.org/TR/SVG/coords.html#Units>
         const PARSING_MODE_ALLOW_UNITLESS_LENGTH = 0x01,
         /// In SVG, out-of-range values are not treated as an error in parsing.
-        /// https://www.w3.org/TR/SVG/implnote.html#RangeClamping
+        /// <https://www.w3.org/TR/SVG/implnote.html#RangeClamping>
         const PARSING_MODE_ALLOW_ALL_NUMERIC_VALUES = 0x02,
     }
 }
 
 impl ParsingMode {
     /// Whether the parsing mode allows unitless lengths for non-zero values to be intpreted as px.
     pub fn allows_unitless_lengths(&self) -> bool {
         self.intersects(PARSING_MODE_ALLOW_UNITLESS_LENGTH)
@@ -223,11 +223,11 @@ impl ParsingMode {
     pub fn allows_all_numeric_values(&self) -> bool {
         self.intersects(PARSING_MODE_ALLOW_ALL_NUMERIC_VALUES)
     }
 }
 
 #[cfg(feature = "servo")]
 /// Speculatively execute paint code in the worklet thread pool.
 pub trait SpeculativePainter: Send + Sync {
-    /// https://drafts.css-houdini.org/css-paint-api/#draw-a-paint-image
+    /// <https://drafts.css-houdini.org/css-paint-api/#draw-a-paint-image>
     fn speculatively_draw_a_paint_image(&self, properties: Vec<(Atom, String)>, arguments: Vec<String>);
 }
--- a/servo/components/style_traits/viewport.rs
+++ b/servo/components/style_traits/viewport.rs
@@ -16,33 +16,33 @@ define_css_keyword_enum!(UserZoom:
 
 define_css_keyword_enum!(Orientation:
                          "auto" => Auto,
                          "portrait" => Portrait,
                          "landscape" => Landscape);
 
 /// A set of viewport descriptors:
 ///
-/// https://drafts.csswg.org/css-device-adapt/#viewport-desc
+/// <https://drafts.csswg.org/css-device-adapt/#viewport-desc>
 #[derive(Clone, Debug, PartialEq)]
 #[cfg_attr(feature = "servo", derive(Deserialize, Serialize, HeapSizeOf))]
 pub struct ViewportConstraints {
     /// Width and height:
     ///  * https://drafts.csswg.org/css-device-adapt/#width-desc
     ///  * https://drafts.csswg.org/css-device-adapt/#height-desc
     pub size: TypedSize2D<f32, CSSPixel>,
-    /// https://drafts.csswg.org/css-device-adapt/#zoom-desc
+    /// <https://drafts.csswg.org/css-device-adapt/#zoom-desc>
     pub initial_zoom: PinchZoomFactor,
-    /// https://drafts.csswg.org/css-device-adapt/#min-max-width-desc
+    /// <https://drafts.csswg.org/css-device-adapt/#min-max-width-desc>
     pub min_zoom: Option<PinchZoomFactor>,
-    /// https://drafts.csswg.org/css-device-adapt/#min-max-width-desc
+    /// <https://drafts.csswg.org/css-device-adapt/#min-max-width-desc>
     pub max_zoom: Option<PinchZoomFactor>,
-    /// https://drafts.csswg.org/css-device-adapt/#user-zoom-desc
+    /// <https://drafts.csswg.org/css-device-adapt/#user-zoom-desc>
     pub user_zoom: UserZoom,
-    /// https://drafts.csswg.org/css-device-adapt/#orientation-desc
+    /// <https://drafts.csswg.org/css-device-adapt/#orientation-desc>
     pub orientation: Orientation
 }
 
 impl ToCss for ViewportConstraints {
     fn to_css<W>(&self, dest: &mut W) -> fmt::Result
         where W: fmt::Write
     {
         dest.write_str("@viewport { width: ")?;
@@ -68,17 +68,17 @@ impl ToCss for ViewportConstraints {
         self.user_zoom.to_css(dest)?;
 
         dest.write_str("; orientation: ")?;
         self.orientation.to_css(dest)?;
         dest.write_str("; }")
     }
 }
 
-/// https://drafts.csswg.org/css-device-adapt/#descdef-viewport-zoom
+/// <https://drafts.csswg.org/css-device-adapt/#descdef-viewport-zoom>
 #[derive(Clone, Copy, Debug, PartialEq)]
 #[cfg_attr(feature = "servo", derive(HeapSizeOf))]
 pub enum Zoom {
     /// A number value.
     Number(f32),
     /// A percentage value.
     Percentage(f32),
     /// The `auto` keyword.
@@ -98,17 +98,17 @@ impl ToCss for Zoom {
             }
         }
     }
 }
 
 impl Zoom {
     /// Parse a zoom value per:
     ///
-    /// https://drafts.csswg.org/css-device-adapt/#descdef-viewport-zoom
+    /// <https://drafts.csswg.org/css-device-adapt/#descdef-viewport-zoom>
     pub fn parse<'i, 't>(input: &mut Parser<'i, 't>) -> Result<Zoom, ParseError<'i>> {
         use PARSING_MODE_DEFAULT;
         use cssparser::Token;
         use values::specified::AllowedNumericType::NonNegative;
 
         let location = input.current_source_location();
         match *input.next()? {
             // TODO: This parse() method should take ParserContext as an
--- a/servo/components/url/origin.rs
+++ b/servo/components/url/origin.rs
@@ -78,22 +78,22 @@ impl ImmutableOrigin {
     /// (as opposed to an opaque origin).
     pub fn is_tuple(&self) -> bool {
         match *self {
             ImmutableOrigin::Opaque(..) => false,
             ImmutableOrigin::Tuple(..) => true,
         }
     }
 
-    /// https://html.spec.whatwg.org/multipage/#ascii-serialisation-of-an-origin
+    /// <https://html.spec.whatwg.org/multipage/#ascii-serialisation-of-an-origin>
     pub fn ascii_serialization(&self) -> String {
         self.clone().into_url_origin().ascii_serialization()
     }
 
-    /// https://html.spec.whatwg.org/multipage/#unicode-serialisation-of-an-origin
+    /// <https://html.spec.whatwg.org/multipage/#unicode-serialisation-of-an-origin>
     pub fn unicode_serialization(&self) -> String {
         self.clone().into_url_origin().unicode_serialization()
     }
 }
 
 /// Opaque identifier for URLs that have file or other schemes
 #[derive(Clone, Debug, Deserialize, Eq, PartialEq, Serialize)]
 pub struct OpaqueOrigin(Uuid);
--- a/servo/python/tidy/servo_tidy/tidy.py
+++ b/servo/python/tidy/servo_tidy/tidy.py
@@ -847,17 +847,17 @@ def check_spec(file_name, lines):
         raise StopIteration
     file_name = os.path.relpath(os.path.splitext(file_name)[0], SPEC_BASE_PATH)
     patt = re.compile("^\s*\/\/.+")
 
     # Pattern representing a line with a macro
     macro_patt = re.compile("^\s*\S+!(.*)$")
 
     # Pattern representing a line with comment containing a spec link
-    link_patt = re.compile("^\s*///? https://.+$")
+    link_patt = re.compile("^\s*///? (<https://.+>|https://.+)$")
 
     # Pattern representing a line with comment or attribute
     comment_patt = re.compile("^\s*(///?.+|#\[.+\])$")
 
     brace_count = 0
     in_impl = False
     pattern = "impl {}Methods for {} {{".format(file_name, file_name)
 
--- a/servo/python/tidy/servo_tidy_tests/speclink.rs
+++ b/servo/python/tidy/servo_tidy_tests/speclink.rs
@@ -14,19 +14,19 @@ impl SpecLinkMethods for SpecLink {
         0
     }
 
     // A spec link.
     // https://example.com/
     fn Foo() {}
 
     /// A spec link.
-    /// https://example.com/
+    /// <https://example.com/>
     fn Foo() {}
 
     /// A spec link.
-    /// https://example.com/
+    /// <https://example.com/>
     /// Doc comments are OK
     // Regular comments are OK
     #[allow(attributes_too)]
     fn Foo() {}
 }