diff options
-rw-r--r-- | components/layout/block.rs | 6 | ||||
-rw-r--r-- | components/layout/inline.rs | 3 |
2 files changed, 5 insertions, 4 deletions
diff --git a/components/layout/block.rs b/components/layout/block.rs index 4a7b4ac149b..16ef0c28c53 100644 --- a/components/layout/block.rs +++ b/components/layout/block.rs @@ -452,7 +452,7 @@ fn translate_including_floats(cur_b: &mut Au, delta: Au, floats: &mut Floats) { /// /// Note that flows with position 'fixed' just form a flat list as they all /// have the Root flow as their CB. -pub struct AbsoluteAssignBSizesTraversal<'a>(pub &'a LayoutContext<'a>); +pub struct AbsoluteAssignBSizesTraversal<'a>(pub &'a SharedStyleContext); impl<'a> PreorderFlowTraversal for AbsoluteAssignBSizesTraversal<'a> { #[inline] @@ -475,7 +475,7 @@ impl<'a> PreorderFlowTraversal for AbsoluteAssignBSizesTraversal<'a> { return } - block.calculate_absolute_block_size_and_margins(self.0.shared_context()); + block.calculate_absolute_block_size_and_margins(self.0); } } @@ -1046,7 +1046,7 @@ impl BlockFlow { // This is preorder because the block-size of an absolute flow may depend on // the block-size of its containing block, which may also be an absolute flow. (&mut *self as &mut Flow).traverse_preorder_absolute_flows( - &mut AbsoluteAssignBSizesTraversal(layout_context)); + &mut AbsoluteAssignBSizesTraversal(layout_context.shared_context())); } // Don't remove the dirty bits yet if we're absolutely-positioned, since our final size diff --git a/components/layout/inline.rs b/components/layout/inline.rs index ab2054a00ac..d2fa2cc84f4 100644 --- a/components/layout/inline.rs +++ b/components/layout/inline.rs @@ -33,6 +33,7 @@ use std::sync::Arc; use std::{fmt, i32, isize, mem}; use style::computed_values::{display, overflow_x, position, text_align, text_justify}; use style::computed_values::{text_overflow, vertical_align, white_space}; +use style::context::StyleContext; use style::logical_geometry::{LogicalRect, LogicalSize, WritingMode}; use style::properties::{ComputedValues, ServoComputedValues}; use style::values::computed::LengthOrPercentage; @@ -1466,7 +1467,7 @@ impl Flow for InlineFlow { // This is preorder because the block-size of an absolute flow may depend on // the block-size of its containing block, which may also be an absolute flow. (&mut *self as &mut Flow).traverse_preorder_absolute_flows( - &mut AbsoluteAssignBSizesTraversal(layout_context)); + &mut AbsoluteAssignBSizesTraversal(layout_context.shared_context())); } self.base.position.size.block = match self.lines.last() { |