mirror of
https://github.com/servo/servo.git
synced 2025-06-08 08:33:26 +00:00
fix clippy warning (#32667)
This commit is contained in:
parent
c0105de82b
commit
044ab3eeab
5 changed files with 8 additions and 14 deletions
|
@ -712,7 +712,7 @@ impl<'a> BuilderForBoxFragment<'a> {
|
||||||
// is used).
|
// is used).
|
||||||
if let BackgroundMode::Extra(ref extra_backgrounds) = self.fragment.background_mode {
|
if let BackgroundMode::Extra(ref extra_backgrounds) = self.fragment.background_mode {
|
||||||
for extra_background in extra_backgrounds {
|
for extra_background in extra_backgrounds {
|
||||||
let positioning_area = extra_background.rect.clone();
|
let positioning_area = extra_background.rect;
|
||||||
let painter = BackgroundPainter {
|
let painter = BackgroundPainter {
|
||||||
style: &extra_background.style,
|
style: &extra_background.style,
|
||||||
painting_area_override: None,
|
painting_area_override: None,
|
||||||
|
|
|
@ -268,7 +268,7 @@ impl InlineFormattingContextBuilder {
|
||||||
for identifier in self.inline_box_stack.iter() {
|
for identifier in self.inline_box_stack.iter() {
|
||||||
new_builder.start_inline_box(
|
new_builder.start_inline_box(
|
||||||
self.inline_boxes
|
self.inline_boxes
|
||||||
.get(&identifier)
|
.get(identifier)
|
||||||
.borrow()
|
.borrow()
|
||||||
.split_around_block(),
|
.split_around_block(),
|
||||||
);
|
);
|
||||||
|
|
|
@ -1738,7 +1738,7 @@ impl InlineFormattingContext {
|
||||||
|
|
||||||
match item {
|
match item {
|
||||||
InlineItem::StartInlineBox(identifier) => {
|
InlineItem::StartInlineBox(identifier) => {
|
||||||
ifc.start_inline_box(&*self.inline_boxes.get(identifier).borrow());
|
ifc.start_inline_box(&self.inline_boxes.get(identifier).borrow());
|
||||||
},
|
},
|
||||||
InlineItem::EndInlineBox => ifc.finish_inline_box(),
|
InlineItem::EndInlineBox => ifc.finish_inline_box(),
|
||||||
InlineItem::TextRun(run) => run.layout_into_line_items(&mut ifc),
|
InlineItem::TextRun(run) => run.layout_into_line_items(&mut ifc),
|
||||||
|
@ -2369,7 +2369,7 @@ struct ContentSizesComputation<'a> {
|
||||||
impl<'a> ContentSizesComputation<'a> {
|
impl<'a> ContentSizesComputation<'a> {
|
||||||
fn traverse(mut self, inline_formatting_context: &InlineFormattingContext) -> ContentSizes {
|
fn traverse(mut self, inline_formatting_context: &InlineFormattingContext) -> ContentSizes {
|
||||||
for inline_item in inline_formatting_context.inline_items.iter() {
|
for inline_item in inline_formatting_context.inline_items.iter() {
|
||||||
self.process_item(&mut *inline_item.borrow_mut(), inline_formatting_context);
|
self.process_item(&mut inline_item.borrow_mut(), inline_formatting_context);
|
||||||
}
|
}
|
||||||
|
|
||||||
self.forced_line_break();
|
self.forced_line_break();
|
||||||
|
|
|
@ -376,11 +376,6 @@ impl BoxFragment {
|
||||||
(content_rect.origin.x, cb_width - content_rect.max_x())
|
(content_rect.origin.x, cb_width - content_rect.max_x())
|
||||||
};
|
};
|
||||||
|
|
||||||
convert_to_length_or_auto(PhysicalSides::new(
|
convert_to_length_or_auto(PhysicalSides::new(top, right, bottom, left))
|
||||||
top.into(),
|
|
||||||
right.into(),
|
|
||||||
bottom.into(),
|
|
||||||
left.into(),
|
|
||||||
))
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -632,10 +632,9 @@ impl HoistedAbsolutelyPositionedBox {
|
||||||
|
|
||||||
let (block_size, inline_size) =
|
let (block_size, inline_size) =
|
||||||
match independent_layout.content_inline_size_for_table {
|
match independent_layout.content_inline_size_for_table {
|
||||||
Some(inline_size) => (
|
Some(inline_size) => {
|
||||||
independent_layout.content_block_size.into(),
|
(independent_layout.content_block_size, inline_size)
|
||||||
inline_size.into(),
|
},
|
||||||
),
|
|
||||||
None => (
|
None => (
|
||||||
size.auto_is(|| independent_layout.content_block_size),
|
size.auto_is(|| independent_layout.content_block_size),
|
||||||
inline_size,
|
inline_size,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue