Fix some typos

Signed-off-by: Dirk Stolle <striezel-dev@web.de>
This commit is contained in:
Dirk Stolle 2022-12-17 03:22:34 +01:00
parent dca3b2f0c1
commit f2260e7c18
8 changed files with 12 additions and 12 deletions

View file

@ -289,7 +289,7 @@ fn tile_image(position: &mut Au, size: &mut Au, absolute_anchor_origin: Au, imag
*position = new_position; *position = new_position;
} }
/// For either the x or the y axis ajust various values to account for tiling. /// For either the x or the y axis adjust various values to account for tiling.
/// ///
/// This is done separately for both axes because the repeat keywords may differ. /// This is done separately for both axes because the repeat keywords may differ.
fn tile_image_axis( fn tile_image_axis(

View file

@ -20,7 +20,7 @@ struct StopRun {
stop_count: usize, stop_count: usize,
} }
/// Determines the radius of a circle if it was not explictly provided. /// Determines the radius of a circle if it was not explicitly provided.
/// <https://drafts.csswg.org/css-images-3/#typedef-size> /// <https://drafts.csswg.org/css-images-3/#typedef-size>
fn circle_size_keyword( fn circle_size_keyword(
keyword: ShapeExtent, keyword: ShapeExtent,
@ -57,7 +57,7 @@ where
) )
} }
/// Determines the radius of an ellipse if it was not explictly provided. /// Determines the radius of an ellipse if it was not explicitly provided.
/// <https://drafts.csswg.org/css-images-3/#typedef-size> /// <https://drafts.csswg.org/css-images-3/#typedef-size>
fn ellipse_size_keyword( fn ellipse_size_keyword(
keyword: ShapeExtent, keyword: ShapeExtent,

View file

@ -1164,11 +1164,11 @@ impl Fragment {
// https://drafts.csswg.org/css2/visudet.html#min-max-widths // https://drafts.csswg.org/css2/visudet.html#min-max-widths
(MaybeAuto::Auto, MaybeAuto::Auto) => { (MaybeAuto::Auto, MaybeAuto::Auto) => {
if self.has_intrinsic_ratio() { if self.has_intrinsic_ratio() {
// This approch follows the spirit of cover and contain constraint. // This approach follows the spirit of cover and contain constraint.
// https://drafts.csswg.org/css-images-3/#cover-contain // https://drafts.csswg.org/css-images-3/#cover-contain
// First, create two rectangles that keep aspect ratio while may be clamped // First, create two rectangles that keep aspect ratio while may be clamped
// by the contraints; // by the constraints;
let first_isize = inline_constraint.clamp(intrinsic_inline_size); let first_isize = inline_constraint.clamp(intrinsic_inline_size);
let first_bsize = Au::new( let first_bsize = Au::new(
(first_isize.0 as i64 * intrinsic_block_size.0 as i64 / (first_isize.0 as i64 * intrinsic_block_size.0 as i64 /

View file

@ -183,7 +183,7 @@ pub fn guess_float_placement(flow: &mut dyn Flow) {
.flags .flags
.contains(FlowFlags::IS_ABSOLUTELY_POSITIONED) .contains(FlowFlags::IS_ABSOLUTELY_POSITIONED)
{ {
// Do not propagate floats in or out, but do propogate between kids. // Do not propagate floats in or out, but do propagate between kids.
guess_float_placement(kid); guess_float_placement(kid);
} else { } else {
floats_in.compute_floats_in(kid); floats_in.compute_floats_in(kid);

View file

@ -312,8 +312,8 @@ impl<'a> PostorderFlowTraversal for AssignBSizes<'a> {
fn should_process(&self, flow: &mut dyn Flow) -> bool { fn should_process(&self, flow: &mut dyn Flow) -> bool {
let base = flow.base(); let base = flow.base();
base.restyle_damage.intersects(ServoRestyleDamage::REFLOW_OUT_OF_FLOW | ServoRestyleDamage::REFLOW) && base.restyle_damage.intersects(ServoRestyleDamage::REFLOW_OUT_OF_FLOW | ServoRestyleDamage::REFLOW) &&
// The fragmentation countainer is responsible for calling // The fragmentation container is responsible for calling
// Flow::fragment recursively // Flow::fragment recursively.
!base.flags.contains(FlowFlags::CAN_BE_FRAGMENTED) !base.flags.contains(FlowFlags::CAN_BE_FRAGMENTED)
} }
} }

View file

@ -352,7 +352,7 @@ fn layout<'context, 'boxes>(
let content_block_size = match flex_context.flex_axis { let content_block_size = match flex_context.flex_axis {
FlexAxis::Row => { FlexAxis::Row => {
// `container_main_size` ends up unused here but in this case thats fine // `container_main_size` ends up unused here but in this case thats fine
// since it was already excatly the one decided by the outer formatting context. // since it was already exactly the one decided by the outer formatting context.
container_cross_size container_cross_size
}, },
FlexAxis::Column => { FlexAxis::Column => {
@ -362,7 +362,7 @@ fn layout<'context, 'boxes>(
// The spec is missing something to resolve this conflict: // The spec is missing something to resolve this conflict:
// https://github.com/w3c/csswg-drafts/issues/5190 // https://github.com/w3c/csswg-drafts/issues/5190
// And well need to change the signature of `IndependentFormattingContext::layout` // And well need to change the signature of `IndependentFormattingContext::layout`
// to allow the inner formatting context to “negociate” a used inline-size // to allow the inner formatting context to “negotiate” a used inline-size
// with the outer one somehow. // with the outer one somehow.
container_main_size container_main_size
}, },

View file

@ -30,7 +30,7 @@ pub(crate) struct ReplacedContent {
intrinsic: IntrinsicSizes, intrinsic: IntrinsicSizes,
} }
/// * Raster images always have an instrinsic width and height, with 1 image pixel = 1px. /// * Raster images always have an intrinsic width and height, with 1 image pixel = 1px.
/// The intrinsic ratio should be based on dividing those. /// The intrinsic ratio should be based on dividing those.
/// See https://github.com/w3c/csswg-drafts/issues/4572 for the case where either is zero. /// See https://github.com/w3c/csswg-drafts/issues/4572 for the case where either is zero.
/// PNG specifically disallows this but I (SimonSapin) am not sure about other formats. /// PNG specifically disallows this but I (SimonSapin) am not sure about other formats.

View file

@ -1363,7 +1363,7 @@ impl<'le> ThreadSafeLayoutElement<'le> for ServoThreadSafeLayoutElement<'le> {
/// but they have no use right now. /// but they have no use right now.
/// ///
/// Note that the element implementation is needed only for selector matching, /// Note that the element implementation is needed only for selector matching,
/// not for inheritance (styles are inherited appropiately). /// not for inheritance (styles are inherited appropriately).
impl<'le> ::selectors::Element for ServoThreadSafeLayoutElement<'le> { impl<'le> ::selectors::Element for ServoThreadSafeLayoutElement<'le> {
type Impl = SelectorImpl; type Impl = SelectorImpl;