Skip to content

Commit d0c4ef5

Browse files
committed
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 UltraBlame original commit: 27bc43d5d11ced40c6014d9055825993935d185e
1 parent fcdd242 commit d0c4ef5

File tree

21 files changed

+232
-225
lines changed

21 files changed

+232
-225
lines changed

servo/components/config/opts.rs

+1
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ pub struct Opts {
4646

4747

4848

49+
4950
pub time_profiling: Option<OutputOptions>,
5051

5152

servo/components/net_traits/blob_url_store.rs

+2
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ pub struct BlobBuf {
3535

3636

3737

38+
3839
pub fn parse_blob_url(url: &ServoUrl) -> Result<(Uuid, FileOrigin), ()> {
3940
let url_inner = Url::parse(url.path()).map_err(|_| ())?;
4041
let id = {
@@ -50,6 +51,7 @@ pub fn parse_blob_url(url: &ServoUrl) -> Result<(Uuid, FileOrigin), ()> {
5051

5152

5253

54+
5355
pub fn get_blob_origin(url: &ServoUrl) -> FileOrigin {
5456
if url.scheme() == "file" {
5557

servo/components/script/document_loader.rs

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66

77

8+
89
use dom::bindings::root::Dom;
910
use dom::document::Document;
1011
use ipc_channel::ipc::IpcSender;

servo/components/script/dom/document.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2225,7 +2225,7 @@ impl Document {
22252225
/// Per-process shared lock for author-origin stylesheets
22262226
///
22272227
/// FIXME: make it per-document or per-pipeline instead:
2228-
/// https://github.com/servo/servo/issues/16027
2228+
/// <https://github.com/servo/servo/issues/16027>
22292229
/// (Need to figure out what to do with the style attribute
22302230
/// of elements adopted into another document.)
22312231
static ref PER_PROCESS_AUTHOR_SHARED_LOCK: StyleSharedRwLock = {

servo/components/script/dom/element.rs

+7-7
Original file line numberDiff line numberDiff line change
@@ -2063,7 +2063,7 @@ impl ElementMethods for Element {
20632063
self.upcast::<Node>().client_rect().size.height
20642064
}
20652065

2066-
/// https://w3c.github.io/DOM-Parsing/#widl-Element-innerHTML
2066+
/// <https://w3c.github.io/DOM-Parsing/#widl-Element-innerHTML>
20672067
fn GetInnerHTML(&self) -> Fallible<DOMString> {
20682068
let qname = QualName::new(self.prefix().clone(),
20692069
self.namespace().clone(),
@@ -2075,7 +2075,7 @@ impl ElementMethods for Element {
20752075
}
20762076
}
20772077

2078-
/// https://w3c.github.io/DOM-Parsing/#widl-Element-innerHTML
2078+
/// <https://w3c.github.io/DOM-Parsing/#widl-Element-innerHTML>
20792079
fn SetInnerHTML(&self, value: DOMString) -> ErrorResult {
20802080
// Step 1.
20812081
let frag = self.parse_fragment(value)?;
@@ -2779,7 +2779,7 @@ impl Element {
27792779

27802780
/// Please call this method *only* for real click events
27812781
///
2782-
/// https://html.spec.whatwg.org/multipage/#run-authentic-click-activation-steps
2782+
/// <https://html.spec.whatwg.org/multipage/#run-authentic-click-activation-steps>
27832783
///
27842784
/// Use an element's synthetic click activation (or handle_event) for any script-triggered clicks.
27852785
/// If the spec says otherwise, check with Manishearth first
@@ -2859,7 +2859,7 @@ impl Element {
28592859
self.state.get().contains(IN_ACTIVE_STATE)
28602860
}
28612861

2862-
/// https://html.spec.whatwg.org/multipage/#concept-selector-active
2862+
/// <https://html.spec.whatwg.org/multipage/#concept-selector-active>
28632863
pub fn set_active_state(&self, value: bool) {
28642864
self.set_state(IN_ACTIVE_STATE, value);
28652865

@@ -2936,7 +2936,7 @@ impl Element {
29362936
self.set_state(IN_FULLSCREEN_STATE, value)
29372937
}
29382938

2939-
/// https://dom.spec.whatwg.org/#connected
2939+
/// <https://dom.spec.whatwg.org/#connected>
29402940
pub fn is_connected(&self) -> bool {
29412941
let node = self.upcast::<Node>();
29422942
let root = node.GetRootNode();
@@ -2998,11 +2998,11 @@ impl Element {
29982998
#[derive(Clone, Copy)]
29992999
pub enum AttributeMutation<'a> {
30003000
/// The attribute is set, keep track of old value.
3001-
/// https://dom.spec.whatwg.org/#attribute-is-set
3001+
/// <https://dom.spec.whatwg.org/#attribute-is-set>
30023002
Set(Option<&'a AttrValue>),
30033003

30043004
/// The attribute is removed.
3005-
/// https://dom.spec.whatwg.org/#attribute-is-removed
3005+
/// <https://dom.spec.whatwg.org/#attribute-is-removed>
30063006
Removed,
30073007
}
30083008

servo/components/script/dom/htmlanchorelement.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -576,12 +576,12 @@ impl Activatable for HTMLAnchorElement {
576576
}
577577
}
578578

579-
/// https://html.spec.whatwg.org/multipage/#the-rules-for-choosing-a-browsing-context-given-a-browsing-context-name
579+
/// <https://html.spec.whatwg.org/multipage/#the-rules-for-choosing-a-browsing-context-given-a-browsing-context-name>
580580
fn is_current_browsing_context(target: DOMString) -> bool {
581581
target.is_empty() || target == "_self"
582582
}
583583

584-
/// https://html.spec.whatwg.org/multipage/#following-hyperlinks-2
584+
/// <https://html.spec.whatwg.org/multipage/#following-hyperlinks-2>
585585
pub fn follow_hyperlink(subject: &Element, hyperlink_suffix: Option<String>, referrer_policy: Option<ReferrerPolicy>) {
586586
// Step 1: replace.
587587
// Step 2: source browsing context.

servo/components/script/dom/htmlinputelement.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -669,7 +669,7 @@ impl HTMLInputElement {
669669
}
670670
}
671671

672-
/// https://html.spec.whatwg.org/multipage/#constructing-the-form-data-set
672+
/// <https://html.spec.whatwg.org/multipage/#constructing-the-form-data-set>
673673
/// Steps range from 3.1 to 3.7 (specific to HTMLInputElement)
674674
pub fn form_datums(&self, submitter: Option<FormSubmitter>) -> Vec<FormDatum> {
675675
// 3.1: disabled state check is in get_unclean_dataset

servo/components/script/dom/htmllinkelement.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ impl VirtualMethods for HTMLLinkElement {
250250

251251

252252
impl HTMLLinkElement {
253-
/// https://html.spec.whatwg.org/multipage/#concept-link-obtain
253+
/// <https://html.spec.whatwg.org/multipage/#concept-link-obtain>
254254
fn handle_stylesheet_url(&self, href: &str) {
255255
let document = document_from_node(self);
256256
if document.browsing_context().is_none() {

servo/components/script_traits/lib.rs

+2
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,7 @@ pub enum DiscardBrowsingContext {
223223

224224

225225

226+
226227
#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, HeapSizeOf, PartialEq, Serialize)]
227228
pub enum DocumentActivity {
228229

@@ -870,6 +871,7 @@ impl fmt::Debug for Painter {
870871

871872

872873

874+
873875
#[derive(Clone, Debug, Deserialize, HeapSizeOf, Serialize)]
874876
pub struct DrawAPaintImageResult {
875877

servo/components/selectors/parser.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ macro_rules! with_all_bounds {
8282
///
8383
/// NB: We need Clone so that we can derive(Clone) on struct with that
8484
/// are parameterized on SelectorImpl. See
85-
/// https://github.com/rust-lang/rust/issues/26925
85+
/// <https://github.com/rust-lang/rust/issues/26925>
8686
pub trait SelectorImpl: Clone + Sized + 'static {
8787
type AttrValue: $($InSelector)*;
8888
type Identifier: $($InSelector)* + PrecomputedHash;

servo/components/servo_arc/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919

2020

21+
2122

2223

2324
#![allow(missing_docs)]

servo/components/style/counter_style/mod.rs

+10-10
Original file line numberDiff line numberDiff line change
@@ -229,49 +229,49 @@ macro_rules! counter_style_descriptors {
229229
}
230230

231231
counter_style_descriptors! {
232-
/// https://drafts.csswg.org/css-counter-styles/#counter-style-system
232+
/// <https://drafts.csswg.org/css-counter-styles/#counter-style-system>
233233
"system" system / eCSSCounterDesc_System: System = {
234234
System::Symbolic
235235
}
236236

237-
/// https://drafts.csswg.org/css-counter-styles/#counter-style-negative
237+
/// <https://drafts.csswg.org/css-counter-styles/#counter-style-negative>
238238
"negative" negative / eCSSCounterDesc_Negative: Negative = {
239239
Negative(Symbol::String("-".to_owned()), None)
240240
}
241241

242-
/// https://drafts.csswg.org/css-counter-styles/#counter-style-prefix
242+
/// <https://drafts.csswg.org/css-counter-styles/#counter-style-prefix>
243243
"prefix" prefix / eCSSCounterDesc_Prefix: Symbol = {
244244
Symbol::String("".to_owned())
245245
}
246246

247-
/// https://drafts.csswg.org/css-counter-styles/#counter-style-suffix
247+
/// <https://drafts.csswg.org/css-counter-styles/#counter-style-suffix>
248248
"suffix" suffix / eCSSCounterDesc_Suffix: Symbol = {
249249
Symbol::String(". ".to_owned())
250250
}
251251

252-
/// https://drafts.csswg.org/css-counter-styles/#counter-style-range
252+
/// <https://drafts.csswg.org/css-counter-styles/#counter-style-range>
253253
"range" range / eCSSCounterDesc_Range: Ranges = {
254254
Ranges(Vec::new()) // Empty Vec represents 'auto'
255255
}
256256

257-
/// https://drafts.csswg.org/css-counter-styles/#counter-style-pad
257+
/// <https://drafts.csswg.org/css-counter-styles/#counter-style-pad>
258258
"pad" pad / eCSSCounterDesc_Pad: Pad = {
259259
Pad(0, Symbol::String("".to_owned()))
260260
}
261261

262-
/// https://drafts.csswg.org/css-counter-styles/#counter-style-fallback
262+
/// <https://drafts.csswg.org/css-counter-styles/#counter-style-fallback>
263263
"fallback" fallback / eCSSCounterDesc_Fallback: Fallback = {
264264
// FIXME https://bugzilla.mozilla.org/show_bug.cgi?id=1359323 use atom!()
265265
Fallback(CustomIdent(Atom::from("decimal")))
266266
}
267267

268-
/// https://drafts.csswg.org/css-counter-styles/#descdef-counter-style-symbols
268+
/// <https://drafts.csswg.org/css-counter-styles/#descdef-counter-style-symbols>
269269
"symbols" symbols / eCSSCounterDesc_Symbols: Symbols = !
270270

271-
/// https://drafts.csswg.org/css-counter-styles/#descdef-counter-style-additive-symbols
271+
/// <https://drafts.csswg.org/css-counter-styles/#descdef-counter-style-additive-symbols>
272272
"additive-symbols" additive_symbols / eCSSCounterDesc_AdditiveSymbols: AdditiveSymbols = !
273273

274-
/// https://drafts.csswg.org/css-counter-styles/#counter-style-speak-as
274+
/// <https://drafts.csswg.org/css-counter-styles/#counter-style-speak-as>
275275
"speak-as" speak_as / eCSSCounterDesc_SpeakAs: SpeakAs = {
276276
SpeakAs::Auto
277277
}

servo/components/style/element_state.rs

+24-24
Original file line numberDiff line numberDiff line change
@@ -18,35 +18,35 @@ bitflags! {
1818
#[cfg_attr(feature = "servo", derive(HeapSizeOf))]
1919
pub flags ElementState: u64 {
2020
/// The mouse is down on this element.
21-
/// https://html.spec.whatwg.org/multipage/#selector-active
21+
/// <https://html.spec.whatwg.org/multipage/#selector-active>
2222
/// FIXME(#7333): set/unset this when appropriate
2323
const IN_ACTIVE_STATE = 1 << 0,
2424
/// This element has focus.
25-
/// https://html.spec.whatwg.org/multipage/#selector-focus
25+
/// <https://html.spec.whatwg.org/multipage/#selector-focus>
2626
const IN_FOCUS_STATE = 1 << 1,
2727
/// The mouse is hovering over this element.
28-
/// https://html.spec.whatwg.org/multipage/#selector-hover
28+
/// <https://html.spec.whatwg.org/multipage/#selector-hover>
2929
const IN_HOVER_STATE = 1 << 2,
3030
/// Content is enabled (and can be disabled).
31-
/// http://www.whatwg.org/html/#selector-enabled
31+
/// <http://www.whatwg.org/html/#selector-enabled>
3232
const IN_ENABLED_STATE = 1 << 3,
3333
/// Content is disabled.
34-
/// http://www.whatwg.org/html/#selector-disabled
34+
/// <http://www.whatwg.org/html/#selector-disabled>
3535
const IN_DISABLED_STATE = 1 << 4,
3636
/// Content is checked.
37-
/// https://html.spec.whatwg.org/multipage/#selector-checked
37+
/// <https://html.spec.whatwg.org/multipage/#selector-checked>
3838
const IN_CHECKED_STATE = 1 << 5,
39-
/// https://html.spec.whatwg.org/multipage/#selector-indeterminate
39+
/// <https://html.spec.whatwg.org/multipage/#selector-indeterminate>
4040
const IN_INDETERMINATE_STATE = 1 << 6,
41-
/// https://html.spec.whatwg.org/multipage/#selector-placeholder-shown
41+
/// <https://html.spec.whatwg.org/multipage/#selector-placeholder-shown>
4242
const IN_PLACEHOLDER_SHOWN_STATE = 1 << 7,
43-
/// https://html.spec.whatwg.org/multipage/#selector-target
43+
/// <https://html.spec.whatwg.org/multipage/#selector-target>
4444
const IN_TARGET_STATE = 1 << 8,
45-
/// https://fullscreen.spec.whatwg.org/#%3Afullscreen-pseudo-class
45+
/// <https://fullscreen.spec.whatwg.org/#%3Afullscreen-pseudo-class>
4646
const IN_FULLSCREEN_STATE = 1 << 9,
47-
/// https://html.spec.whatwg.org/multipage/#selector-valid
47+
/// <https://html.spec.whatwg.org/multipage/#selector-valid>
4848
const IN_VALID_STATE = 1 << 10,
49-
/// https://html.spec.whatwg.org/multipage/#selector-invalid
49+
/// <https://html.spec.whatwg.org/multipage/#selector-invalid>
5050
const IN_INVALID_STATE = 1 << 11,
5151
/// Non-standard: https://developer.mozilla.org/en-US/docs/Web/CSS/:-moz-ui-valid
5252
const IN_MOZ_UI_VALID_STATE = 1 << 12,
@@ -66,31 +66,31 @@ bitflags! {
6666
const IN_HANDLER_DISABLED_STATE = 1 << 19,
6767
/// Non-standard: https://developer.mozilla.org/en-US/docs/Web/CSS/:-moz-handler-crashed
6868
const IN_HANDLER_CRASHED_STATE = 1 << 20,
69-
/// https://html.spec.whatwg.org/multipage/#selector-required
69+
/// <https://html.spec.whatwg.org/multipage/#selector-required>
7070
const IN_REQUIRED_STATE = 1 << 21,
71-
/// https://html.spec.whatwg.org/multipage/#selector-optional
71+
/// <https://html.spec.whatwg.org/multipage/#selector-optional>
7272
const IN_OPTIONAL_STATE = 1 << 22,
73-
/// https://html.spec.whatwg.org/multipage/#selector-read-write
73+
/// <https://html.spec.whatwg.org/multipage/#selector-read-write>
7474
const IN_READ_WRITE_STATE = 1 << 22,
7575
/// Non-standard: Older custom-elements spec.
7676
const IN_UNRESOLVED_STATE = 1 << 23,
77-
/// https://html.spec.whatwg.org/multipage/#selector-visited
77+
/// <https://html.spec.whatwg.org/multipage/#selector-visited>
7878
const IN_VISITED_STATE = 1 << 24,
79-
/// https://html.spec.whatwg.org/multipage/#selector-link
79+
/// <https://html.spec.whatwg.org/multipage/#selector-link>
8080
const IN_UNVISITED_STATE = 1 << 25,
81-
/// https://drafts.csswg.org/selectors-4/#the-any-link-pseudo
81+
/// <https://drafts.csswg.org/selectors-4/#the-any-link-pseudo>
8282
const IN_VISITED_OR_UNVISITED_STATE = IN_VISITED_STATE.bits | IN_UNVISITED_STATE.bits,
8383
/// Non-standard: https://developer.mozilla.org/en-US/docs/Web/CSS/:-moz-drag-over
8484
const IN_DRAGOVER_STATE = 1 << 26,
85-
/// https://html.spec.whatwg.org/multipage/#selector-in-range
85+
/// <https://html.spec.whatwg.org/multipage/#selector-in-range>
8686
const IN_INRANGE_STATE = 1 << 27,
87-
/// https://html.spec.whatwg.org/multipage/#selector-out-of-range
87+
/// <https://html.spec.whatwg.org/multipage/#selector-out-of-range>
8888
const IN_OUTOFRANGE_STATE = 1 << 28,
89-
/// https://html.spec.whatwg.org/multipage/#selector-read-only
89+
/// <https://html.spec.whatwg.org/multipage/#selector-read-only>
9090
const IN_MOZ_READONLY_STATE = 1 << 29,
91-
/// https://html.spec.whatwg.org/multipage/#selector-read-write
91+
/// <https://html.spec.whatwg.org/multipage/#selector-read-write>
9292
const IN_MOZ_READWRITE_STATE = 1 << 30,
93-
/// https://html.spec.whatwg.org/multipage/#selector-default
93+
/// <https://html.spec.whatwg.org/multipage/#selector-default>
9494
const IN_DEFAULT_STATE = 1 << 31,
9595
/// Non-standard: https://developer.mozilla.org/en-US/docs/Web/CSS/:-moz-submit-invalid
9696
const IN_MOZ_SUBMITINVALID_STATE = 1 << 32,
@@ -114,7 +114,7 @@ bitflags! {
114114
const IN_HANDLER_VULNERABLE_UPDATABLE_STATE = 1 << 41,
115115
/// Non-standard & undocumented.
116116
const IN_HANDLER_VULNERABLE_NO_UPDATE_STATE = 1 << 42,
117-
/// https://drafts.csswg.org/selectors-4/#the-focus-within-pseudo
117+
/// <https://drafts.csswg.org/selectors-4/#the-focus-within-pseudo>
118118
const IN_FOCUS_WITHIN_STATE = 1 << 43,
119119
/// :dir matching; the states are used for dynamic change detection.
120120
/// State that elements that match :dir(ltr) are in.

servo/components/style/font_face.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ macro_rules! font_face_descriptors_common {
235235
) => {
236236
/// Data inside a `@font-face` rule.
237237
///
238-
/// https://drafts.csswg.org/css-fonts/#font-face-rule
238+
/// <https://drafts.csswg.org/css-fonts/#font-face-rule>
239239
#[derive(Clone, Debug, Eq, PartialEq)]
240240
pub struct FontFaceRuleData {
241241
$(

0 commit comments

Comments
 (0)