aboutsummaryrefslogtreecommitdiffstats
path: root/components
diff options
context:
space:
mode:
authorMartin Robinson <mrobinson@igalia.com>2020-02-28 14:42:29 +0100
committerMartin Robinson <mrobinson@igalia.com>2020-02-28 14:42:29 +0100
commitc20c4688147927124160c61befc1362d9e7612e5 (patch)
treed308eb1c757122d32d8216f999967abe5ec803f7 /components
parent756cf66cd2f134edf4b3a14226a3028650af9379 (diff)
downloadservo-c20c4688147927124160c61befc1362d9e7612e5.tar.gz
servo-c20c4688147927124160c61befc1362d9e7612e5.zip
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.
Diffstat (limited to 'components')
-rw-r--r--components/layout_2020/flow/inline.rs2
-rw-r--r--components/layout_2020/flow/mod.rs2
-rw-r--r--components/layout_2020/positioned.rs2
3 files changed, 3 insertions, 3 deletions
diff --git a/components/layout_2020/flow/inline.rs b/components/layout_2020/flow/inline.rs
index bab919f38c9..a33e5d8932a 100644
--- a/components/layout_2020/flow/inline.rs
+++ b/components/layout_2020/flow/inline.rs
@@ -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
diff --git a/components/layout_2020/flow/mod.rs b/components/layout_2020/flow/mod.rs
index 39f57bf4402..d6ab15071f6 100644
--- a/components/layout_2020/flow/mod.rs
+++ b/components/layout_2020/flow/mod.rs
@@ -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,
))
diff --git a/components/layout_2020/positioned.rs b/components/layout_2020/positioned.rs
index ef561a05692..3747b4661b5 100644
--- a/components/layout_2020/positioned.rs
+++ b/components/layout_2020/positioned.rs
@@ -86,7 +86,7 @@ impl AbsolutelyPositionedBox {
}
}
- pub(crate) fn layout(
+ pub(crate) fn to_hoisted(
&self,
initial_start_corner: Vec2<Length>,
tree_rank: usize,