mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
cargo fix --edition-idioms
This commit is contained in:
parent
b1fd6237d1
commit
2012be4a8b
203 changed files with 665 additions and 1281 deletions
|
@ -19,14 +19,14 @@ use servo_config::opts;
|
|||
use style::servo::restyle_damage::ServoRestyleDamage;
|
||||
use webrender_api::LayoutPoint;
|
||||
|
||||
pub fn resolve_generated_content(root: &mut Flow, layout_context: &LayoutContext) {
|
||||
pub fn resolve_generated_content(root: &mut dyn Flow, layout_context: &LayoutContext) {
|
||||
ResolveGeneratedContent::new(&layout_context).traverse(root, 0);
|
||||
}
|
||||
|
||||
/// Run the main layout passes sequentially.
|
||||
pub fn reflow(root: &mut Flow, layout_context: &LayoutContext, relayout_mode: RelayoutMode) {
|
||||
pub fn reflow(root: &mut dyn Flow, layout_context: &LayoutContext, relayout_mode: RelayoutMode) {
|
||||
fn doit(
|
||||
flow: &mut Flow,
|
||||
flow: &mut dyn Flow,
|
||||
assign_inline_sizes: AssignISizes,
|
||||
assign_block_sizes: AssignBSizes,
|
||||
relayout_mode: RelayoutMode,
|
||||
|
@ -70,7 +70,7 @@ pub fn reflow(root: &mut Flow, layout_context: &LayoutContext, relayout_mode: Re
|
|||
}
|
||||
|
||||
pub fn build_display_list_for_subtree<'a>(
|
||||
flow_root: &mut Flow,
|
||||
flow_root: &mut dyn Flow,
|
||||
layout_context: &'a LayoutContext,
|
||||
) -> DisplayListBuildState<'a> {
|
||||
let mut state = StackingContextCollectionState::new(layout_context.id);
|
||||
|
@ -83,13 +83,13 @@ pub fn build_display_list_for_subtree<'a>(
|
|||
}
|
||||
|
||||
pub fn iterate_through_flow_tree_fragment_border_boxes(
|
||||
root: &mut Flow,
|
||||
iterator: &mut FragmentBorderBoxIterator,
|
||||
root: &mut dyn Flow,
|
||||
iterator: &mut dyn FragmentBorderBoxIterator,
|
||||
) {
|
||||
fn doit(
|
||||
flow: &mut Flow,
|
||||
flow: &mut dyn Flow,
|
||||
level: i32,
|
||||
iterator: &mut FragmentBorderBoxIterator,
|
||||
iterator: &mut dyn FragmentBorderBoxIterator,
|
||||
stacking_context_position: &Point2D<Au>,
|
||||
) {
|
||||
flow.iterate_through_fragment_border_boxes(iterator, level, stacking_context_position);
|
||||
|
@ -119,7 +119,7 @@ pub fn iterate_through_flow_tree_fragment_border_boxes(
|
|||
doit(root, 0, iterator, &Point2D::zero());
|
||||
}
|
||||
|
||||
pub fn store_overflow(layout_context: &LayoutContext, flow: &mut Flow) {
|
||||
pub fn store_overflow(layout_context: &LayoutContext, flow: &mut dyn Flow) {
|
||||
if !flow
|
||||
.base()
|
||||
.restyle_damage
|
||||
|
@ -142,7 +142,7 @@ pub fn store_overflow(layout_context: &LayoutContext, flow: &mut Flow) {
|
|||
/// Guesses how much inline size will be taken up by floats on the left and right sides of the
|
||||
/// given flow. This is needed to speculatively calculate the inline sizes of block formatting
|
||||
/// contexts. The speculation typically succeeds, but if it doesn't we have to lay it out again.
|
||||
pub fn guess_float_placement(flow: &mut Flow) {
|
||||
pub fn guess_float_placement(flow: &mut dyn Flow) {
|
||||
if !flow
|
||||
.base()
|
||||
.restyle_damage
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue