Auto merge of #25864 - mrobinson:rename-layout, r=jdm

Rename AbsolutelyPositionedBox::layout to AbsolutelyPositionedBox::to_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.

<!-- Please describe your changes on the following line: -->

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [ ] These changes fix #___ (GitHub issue number if applicable)

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because it does not change behavior.

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
This commit is contained in:
bors-servo 2020-02-28 12:34:48 -05:00 committed by GitHub
commit 1fa0863f28
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View file

@ -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

View file

@ -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,
))

View file

@ -86,7 +86,7 @@ impl AbsolutelyPositionedBox {
}
}
pub(crate) fn layout(
pub(crate) fn to_hoisted(
&self,
initial_start_corner: Vec2<Length>,
tree_rank: usize,