aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout_2020/flexbox
diff options
context:
space:
mode:
authorMartin Robinson <mrobinson@igalia.com>2024-01-22 14:13:48 +0100
committerGitHub <noreply@github.com>2024-01-22 13:13:48 +0000
commit5c1723c9833c133e1af641533293e63d8723f8d3 (patch)
treec37778936ee0ffe88379632f5627cbb18710acda /components/layout_2020/flexbox
parentd7de206dbd459e8c8bf121f73755d12569c6cc55 (diff)
downloadservo-5c1723c9833c133e1af641533293e63d8723f8d3.tar.gz
servo-5c1723c9833c133e1af641533293e63d8723f8d3.zip
rustdoc: Fix many rustdoc errors (#31147)
This fixes many rustdoc errors that occur due to raw URLs in rustdoc comments as well as unescaped Rust code that should be in backticks.
Diffstat (limited to 'components/layout_2020/flexbox')
-rw-r--r--components/layout_2020/flexbox/construct.rs4
-rw-r--r--components/layout_2020/flexbox/geom.rs4
-rw-r--r--components/layout_2020/flexbox/layout.rs14
3 files changed, 11 insertions, 11 deletions
diff --git a/components/layout_2020/flexbox/construct.rs b/components/layout_2020/flexbox/construct.rs
index 04f8f0746b4..3f4f7aab734 100644
--- a/components/layout_2020/flexbox/construct.rs
+++ b/components/layout_2020/flexbox/construct.rs
@@ -38,7 +38,7 @@ impl FlexContainer {
}
}
-/// https://drafts.csswg.org/css-flexbox/#flex-items
+/// <https://drafts.csswg.org/css-flexbox/#flex-items>
struct FlexContainerBuilder<'a, 'dom, Node> {
context: &'a LayoutContext<'a>,
info: &'a NodeAndStyleInfo<Node>,
@@ -98,7 +98,7 @@ where
}
}
-/// https://drafts.csswg.org/css-text/#white-space
+/// <https://drafts.csswg.org/css-text/#white-space>
fn is_only_document_white_space<Node>(run: &TextRun<'_, Node>) -> bool {
// FIXME: is this the right definition? See
// https://github.com/w3c/csswg-drafts/issues/5146
diff --git a/components/layout_2020/flexbox/geom.rs b/components/layout_2020/flexbox/geom.rs
index 5a38bf36870..ec8f1e3346e 100644
--- a/components/layout_2020/flexbox/geom.rs
+++ b/components/layout_2020/flexbox/geom.rs
@@ -2,7 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
-//! https://drafts.csswg.org/css-flexbox/#box-model
+//! <https://drafts.csswg.org/css-flexbox/#box-model>
use style::properties::longhands::flex_direction::computed_value::T as FlexDirection;
@@ -87,7 +87,7 @@ pub(super) enum FlexAxis {
}
/// Which flow-relative sides map to the main-start and cross-start sides, respectively.
-/// See https://drafts.csswg.org/css-flexbox/#box-model
+/// See <https://drafts.csswg.org/css-flexbox/#box-model>
#[derive(Clone, Copy)]
pub(super) enum MainStartCrossStart {
InlineStartBlockStart,
diff --git a/components/layout_2020/flexbox/layout.rs b/components/layout_2020/flexbox/layout.rs
index 9b123dcb0fc..d2adec1d206 100644
--- a/components/layout_2020/flexbox/layout.rs
+++ b/components/layout_2020/flexbox/layout.rs
@@ -69,10 +69,10 @@ struct FlexItem<'a> {
/// This is the difference between an outer and inner size.
pbm_auto_is_zero: FlexRelativeVec2<Length>,
- /// https://drafts.csswg.org/css-flexbox/#algo-main-item
+ /// <https://drafts.csswg.org/css-flexbox/#algo-main-item>
flex_base_size: Length,
- /// https://drafts.csswg.org/css-flexbox/#algo-main-item
+ /// <https://drafts.csswg.org/css-flexbox/#algo-main-item>
hypothetical_main_size: Length,
/// This is `align-self`, defaulting to `align-items` if `auto`
align_self: AlignItems,
@@ -153,7 +153,7 @@ impl FlexContainer {
ContentSizes::zero() // Return an incorrect result rather than panic
}
- /// https://drafts.csswg.org/css-flexbox/#layout-algorithm
+ /// <https://drafts.csswg.org/css-flexbox/#layout-algorithm>
pub(crate) fn layout(
&self,
layout_context: &LayoutContext,
@@ -552,7 +552,7 @@ impl<'a> FlexItem<'a> {
}
}
-/// https://drafts.csswg.org/css-flexbox/#algo-main-item
+/// <https://drafts.csswg.org/css-flexbox/#algo-main-item>
fn flex_base_size(
flex_context: &FlexContext,
flex_item: &mut IndependentFormattingContext,
@@ -872,7 +872,7 @@ impl FlexLine<'_> {
}
/// Return the *main size* of each item, and the line’s remainaing free space
- /// https://drafts.csswg.org/css-flexbox/#resolve-flexible-lengths
+ /// <https://drafts.csswg.org/css-flexbox/#resolve-flexible-lengths>
fn resolve_flexible_lengths(&self, container_main_size: Length) -> (Vec<Length>, Length) {
let mut frozen = vec![false; self.items.len()];
let mut target_main_sizes_vec = self
@@ -1135,7 +1135,7 @@ impl<'a> FlexItem<'a> {
}
impl<'items> FlexLine<'items> {
- /// https://drafts.csswg.org/css-flexbox/#algo-cross-line
+ /// <https://drafts.csswg.org/css-flexbox/#algo-cross-line>
fn cross_size(
&self,
item_layout_results: &[FlexItemLayoutResult],
@@ -1238,7 +1238,7 @@ impl<'items> FlexLine<'items> {
impl FlexItem<'_> {
/// Return the cross-start and cross-end margin, with `auto` values resolved.
- /// https://drafts.csswg.org/css-flexbox/#algo-cross-margins
+ /// <https://drafts.csswg.org/css-flexbox/#algo-cross-margins>
fn resolve_auto_cross_margins(
&self,
flex_context: &FlexContext,