Skip to content

Commit

Permalink
Rename AbsolutelyPositionedBox::layout to AbsolutelyPositionedBox::to…
Browse files Browse the repository at this point in the history
…_hoisted

This method doesn't actually do any layout, but converts this block to a
HoistedAbsolutelyPositionedBox which is hoisted and then laid-out with
its containing block later. This makes the code a little easier to read.
  • Loading branch information
mrobinson committed Feb 28, 2020
1 parent 756cf66 commit c20c468
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion components/layout_2020/flow/inline.rs
Expand Up @@ -255,7 +255,7 @@ impl InlineFormattingContext {
},
};
ifc.positioning_context
.push(box_.layout(initial_start_corner, tree_rank));
.push(box_.to_hoisted(initial_start_corner, tree_rank));
},
InlineLevelBox::OutOfFlowFloatBox(_box_) => {
// TODO
Expand Down
2 changes: 1 addition & 1 deletion components/layout_2020/flow/mod.rs
Expand Up @@ -320,7 +320,7 @@ impl BlockLevelBox {
))
},
BlockLevelBox::OutOfFlowAbsolutelyPositionedBox(box_) => {
positioning_context.push(box_.layout(Vec2::zero(), tree_rank));
positioning_context.push(box_.to_hoisted(Vec2::zero(), tree_rank));
Fragment::Anonymous(AnonymousFragment::no_op(
containing_block.style.writing_mode,
))
Expand Down
2 changes: 1 addition & 1 deletion components/layout_2020/positioned.rs
Expand Up @@ -86,7 +86,7 @@ impl AbsolutelyPositionedBox {
}
}

pub(crate) fn layout(
pub(crate) fn to_hoisted(
&self,
initial_start_corner: Vec2<Length>,
tree_rank: usize,
Expand Down

0 comments on commit c20c468

Please sign in to comment.