aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout/flow.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/layout/flow.rs')
-rw-r--r--components/layout/flow.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/components/layout/flow.rs b/components/layout/flow.rs
index 30877defa43..399a21087c4 100644
--- a/components/layout/flow.rs
+++ b/components/layout/flow.rs
@@ -1155,6 +1155,19 @@ impl BaseFlow {
self.speculated_float_placement_out.left > Au(0) ||
self.speculated_float_placement_out.right > Au(0)
}
+
+
+ /// Compute the fragment position relative to the parent stacking context. If the fragment
+ /// itself establishes a stacking context, then the origin of its position will be (0, 0)
+ /// for the purposes of this computation.
+ pub fn stacking_relative_border_box_for_display_list(&self, fragment: &Fragment) -> Rect<Au> {
+ fragment.stacking_relative_border_box(
+ &self.stacking_relative_position,
+ &self.early_absolute_position_info.relative_containing_block_size,
+ self.early_absolute_position_info.relative_containing_block_mode,
+ CoordinateSystem::Own,
+ )
+ }
}
impl<'a> ImmutableFlowUtils for &'a Flow {