From 3c5da6588d412400e17a3c46afc122b46102c7f3 Mon Sep 17 00:00:00 2001 From: Martin Robinson Date: Thu, 10 Apr 2025 20:53:08 +0200 Subject: [PATCH] layout: Add documentation for `CacheableLayoutResultAndInputs` (#36448) Signed-off-by: Martin Robinson Co-authored-by: Oriol Brufau --- components/layout_2020/layout_box_base.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/components/layout_2020/layout_box_base.rs b/components/layout_2020/layout_box_base.rs index 885ff0d26d3..b52c9a6bce5 100644 --- a/components/layout_2020/layout_box_base.rs +++ b/components/layout_2020/layout_box_base.rs @@ -103,10 +103,16 @@ pub(crate) struct CacheableLayoutResult { pub specific_layout_info: Option, } +/// A collection of layout inputs and a cached layout result for a [`LayoutBoxBase`]. pub(crate) struct CacheableLayoutResultAndInputs { + /// The [`CacheableLayoutResult`] for this layout. pub result: CacheableLayoutResult, + /// The [`ContainingBlockSize`] to use for this box's contents, but not + /// for the box itself. pub containing_block_for_children_size: ContainingBlockSize, + /// A [`PositioningContext`] holding absolutely-positioned descendants + /// collected during the layout of this box. pub positioning_context: PositioningContext, }