diff options
| author | Laurenz <laurmaedje@gmail.com> | 2022-02-22 14:31:09 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2022-02-23 14:53:55 +0100 |
| commit | e1f29d6cb9437a4afb2e4fc4ee10a5b8717ab9fa (patch) | |
| tree | 1ce5f2bd858f6665d3867a2939d4b474c1b70377 /src/library/flow.rs | |
| parent | 2bf32c51bceb2f3a8b7ebea3d7c7d6d96757591b (diff) | |
Rework the core context
Diffstat (limited to 'src/library/flow.rs')
| -rw-r--r-- | src/library/flow.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/library/flow.rs b/src/library/flow.rs index bc3bf0f1..9e039d3a 100644 --- a/src/library/flow.rs +++ b/src/library/flow.rs @@ -28,7 +28,7 @@ pub enum FlowChild { impl Layout for FlowNode { fn layout( &self, - vm: &mut Vm, + ctx: &mut Context, regions: &Regions, styles: StyleChain, ) -> TypResult<Vec<Arc<Frame>>> { @@ -56,7 +56,7 @@ impl Layout for FlowNode { layouter.layout_spacing(*kind); } FlowChild::Node(ref node) => { - layouter.layout_node(vm, node, styles)?; + layouter.layout_node(ctx, node, styles)?; } } } @@ -163,7 +163,7 @@ impl FlowLayouter { /// Layout a node. pub fn layout_node( &mut self, - vm: &mut Vm, + ctx: &mut Context, node: &LayoutNode, styles: StyleChain, ) -> TypResult<()> { @@ -176,7 +176,7 @@ impl FlowLayouter { // aligned later. if let Some(placed) = node.downcast::<PlaceNode>() { if placed.out_of_flow() { - let frame = node.layout(vm, &self.regions, styles)?.remove(0); + let frame = node.layout(ctx, &self.regions, styles)?.remove(0); self.items.push(FlowItem::Placed(frame)); return Ok(()); } @@ -193,7 +193,7 @@ impl FlowLayouter { .unwrap_or(Align::Top), ); - let frames = node.layout(vm, &self.regions, styles)?; + let frames = node.layout(ctx, &self.regions, styles)?; let len = frames.len(); for (i, frame) in frames.into_iter().enumerate() { // Grow our size, shrink the region and save the frame for later. |
