From a299a2c71c39611af249d006bdd40db81cfb3979 Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Thu, 30 Apr 2015 16:50:18 -0700 Subject: [PATCH] layout: Minor whitespace and formatting cleanups. --- components/gfx/display_list/mod.rs | 1 + components/layout/construct.rs | 4 +++- components/layout/display_list_builder.rs | 2 -- components/layout/inline.rs | 3 ++- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/components/gfx/display_list/mod.rs b/components/gfx/display_list/mod.rs index 94d570949e9..b3ebd81d2b8 100644 --- a/components/gfx/display_list/mod.rs +++ b/components/gfx/display_list/mod.rs @@ -240,6 +240,7 @@ pub struct StackingContext { /// The position and size of this stacking context. pub bounds: Rect, + /// The overflow rect for this stacking context in its coordinate system. pub overflow: Rect, diff --git a/components/layout/construct.rs b/components/layout/construct.rs index 632888b0095..95d07afec6f 100644 --- a/components/layout/construct.rs +++ b/components/layout/construct.rs @@ -665,7 +665,9 @@ impl<'a> FlowConstructor<'a> { } } - self.create_fragments_for_node_text_content(&mut initial_fragments, node, node.style()); + self.create_fragments_for_node_text_content(&mut initial_fragments, + node, + node.style()); } self.build_flow_for_block_starting_with_fragments(flow, node, initial_fragments) diff --git a/components/layout/display_list_builder.rs b/components/layout/display_list_builder.rs index 845ff11f879..9722fb3504e 100644 --- a/components/layout/display_list_builder.rs +++ b/components/layout/display_list_builder.rs @@ -1070,7 +1070,6 @@ impl FragmentDisplayListBuilding for Fragment { display_list: Box, layer: Option>) -> Arc { - let border_box = self.stacking_relative_border_box(&base_flow.stacking_relative_position, &base_flow.absolute_position_info .relative_containing_block_size, @@ -1408,7 +1407,6 @@ impl BlockFlowDisplayListBuilding for BlockFlow { ScrollPolicy::Scrollable }; - let transparent = color::transparent(); let stacking_context = self.fragment.create_stacking_context( &self.base, diff --git a/components/layout/inline.rs b/components/layout/inline.rs index 2a16d85d7a9..5b65fc49ce1 100644 --- a/components/layout/inline.rs +++ b/components/layout/inline.rs @@ -1501,10 +1501,11 @@ impl Flow for InlineFlow { match fragment.specific { SpecificFragmentInfo::InlineBlock(ref mut info) => { flow::mut_base(&mut *info.flow_ref).clip = clip; + let block_flow = info.flow_ref.as_block(); block_flow.base.absolute_position_info = self.base.absolute_position_info; block_flow.base.stacking_relative_position = - stacking_relative_border_box.origin; + stacking_relative_border_box.origin } SpecificFragmentInfo::InlineAbsoluteHypothetical(ref mut info) => { flow::mut_base(&mut *info.flow_ref).clip = clip;