From 4cd3c056e520978a0df111aa4f09ab17e363a98c Mon Sep 17 00:00:00 2001 From: Tumuhairwe <51232461+jahielkomu@users.noreply.github.com> Date: Fri, 15 Mar 2024 19:24:11 +0300 Subject: [PATCH] rustdoc: Fix errors in `components` and `ports` (#31654) * Fixed warnings in components/gfx/text/shaping/harfbuzz-rs components/layout_2020/fragment_tree ports/servoshell/minibrowser.rs * Fixed warnings in components/gfx/text/shaping/harfbuzz-rs components/layout_2020/fragment_tree ports/servoshell/minibrowser.rs. * Update minibrowser.rs Returned "if" back to "iff" * Update minibrowser.rs Changed ```BrowserManager``` to ```WebViewManager``` * Update fragment.rs Changed ```[SequentialLayoutState]``` to ```[crate::flow::float::SequentialLayoutState]``` * Update fragment.rs Balanced the length of paragraph lines in fragment.rs * Fix tidy errors --------- Co-authored-by: Martin Robinson --- components/gfx/text/shaping/harfbuzz.rs | 2 +- components/layout_2020/fragment_tree/fragment.rs | 6 +++--- .../layout_2020/fragment_tree/positioning_fragment.rs | 2 +- ports/servoshell/minibrowser.rs | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/components/gfx/text/shaping/harfbuzz.rs b/components/gfx/text/shaping/harfbuzz.rs index 74df4b5dccf..5f2e801f40a 100644 --- a/components/gfx/text/shaping/harfbuzz.rs +++ b/components/gfx/text/shaping/harfbuzz.rs @@ -47,7 +47,7 @@ pub struct ShapedGlyphEntry { } impl ShapedGlyphData { - /// Create a new [`SharedGlyphData`] from the given HarfBuzz buffer. + /// Create a new [`ShapedGlyphData`] from the given HarfBuzz buffer. /// /// # Safety /// diff --git a/components/layout_2020/fragment_tree/fragment.rs b/components/layout_2020/fragment_tree/fragment.rs index ccbfe229cc4..151a004aa13 100644 --- a/components/layout_2020/fragment_tree/fragment.rs +++ b/components/layout_2020/fragment_tree/fragment.rs @@ -29,9 +29,9 @@ pub(crate) enum Fragment { Box(BoxFragment), /// Floating content. A floated fragment is very similar to a normal /// [BoxFragment] but it isn't positioned using normal in block flow - /// positioning rules (margin collapse, etc). Instead, they are laid out by - /// the [SequentialLayoutState] of their float containing block formatting - /// context. + /// positioning rules (margin collapse, etc). Instead, they are laid + /// out by the [crate::flow::float::SequentialLayoutState] of their + /// float containing block formatting context. Float(BoxFragment), Positioning(PositioningFragment), /// Absolute and fixed position fragments are hoisted up so that they diff --git a/components/layout_2020/fragment_tree/positioning_fragment.rs b/components/layout_2020/fragment_tree/positioning_fragment.rs index 4a629b31698..2865e58121e 100644 --- a/components/layout_2020/fragment_tree/positioning_fragment.rs +++ b/components/layout_2020/fragment_tree/positioning_fragment.rs @@ -14,7 +14,7 @@ use crate::cell::ArcRefCell; use crate::geom::{LogicalRect, PhysicalRect}; /// Can contain child fragments with relative coordinates, but does not contribute to painting -/// itself. [`PositioningFragments`] may be completely anonymous, or just non-painting Fragments +/// itself. [`PositioningFragment`]s may be completely anonymous, or just non-painting Fragments /// generated by boxes. #[derive(Serialize)] pub(crate) struct PositioningFragment { diff --git a/ports/servoshell/minibrowser.rs b/ports/servoshell/minibrowser.rs index cd6cc01fa5d..bb0ee95f900 100644 --- a/ports/servoshell/minibrowser.rs +++ b/ports/servoshell/minibrowser.rs @@ -295,7 +295,7 @@ impl Minibrowser { } } - /// Updates the location field from the given [BrowserManager], unless the user has started + /// Updates the location field from the given [WebViewManager], unless the user has started /// editing it without clicking Go, returning true iff it has changed (needing an egui update). pub fn update_location_in_toolbar( &mut self,