diff options
author | Patrick Walton <pcwalton@mimiga.net> | 2016-10-24 18:22:01 -0700 |
---|---|---|
committer | Patrick Walton <pcwalton@mimiga.net> | 2016-10-26 14:14:16 -0700 |
commit | ba005a93b89c5b6b1a4ce315c5d30058f7bfae1e (patch) | |
tree | 7601a0ae9ebc7cfb69db14273f6ba9e5035cabbf /components/layout/construct.rs | |
parent | 824a5e2e13fc02b93c9257e794253788d94dd8fc (diff) | |
download | servo-ba005a93b89c5b6b1a4ce315c5d30058f7bfae1e.tar.gz servo-ba005a93b89c5b6b1a4ce315c5d30058f7bfae1e.zip |
layout: Minor style cleanup.
Diffstat (limited to 'components/layout/construct.rs')
-rw-r--r-- | components/layout/construct.rs | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/components/layout/construct.rs b/components/layout/construct.rs index f59c76d2885..d3a0c63e7a6 100644 --- a/components/layout/construct.rs +++ b/components/layout/construct.rs @@ -397,8 +397,9 @@ impl<'a, ConcreteThreadSafeLayoutNode: ThreadSafeLayoutNode> let scanned_fragments = TextRunScanner::new().scan_for_runs(&mut self.layout_context.font_context(), fragments.fragments); - let mut inline_flow_ref: FlowRef = Arc::new( - InlineFlow::from_fragments(scanned_fragments, node.style(self.style_context()).writing_mode)); + let mut inline_flow_ref: FlowRef = + Arc::new(InlineFlow::from_fragments(scanned_fragments, + node.style(self.style_context()).writing_mode)); // Add all the inline-block fragments as children of the inline flow. for inline_block_flow in &inline_block_flows { @@ -1019,9 +1020,10 @@ impl<'a, ConcreteThreadSafeLayoutNode: ThreadSafeLayoutNode> /// Builds a flow for a node with `column-count` or `column-width` non-`auto`. /// This yields a `MulticolFlow` with a single `MulticolColumnFlow` underneath it. - fn build_flow_for_multicol(&mut self, node: &ConcreteThreadSafeLayoutNode, - float_kind: Option<FloatKind>) - -> ConstructionResult { + fn build_flow_for_multicol(&mut self, + node: &ConcreteThreadSafeLayoutNode, + float_kind: Option<FloatKind>) + -> ConstructionResult { let fragment = Fragment::new(node, SpecificFragmentInfo::Multicol, self.layout_context); let mut flow: FlowRef = Arc::new(MulticolFlow::from_fragment(fragment, float_kind)); @@ -1110,6 +1112,7 @@ impl<'a, ConcreteThreadSafeLayoutNode: ThreadSafeLayoutNode> // The flow is done. legalizer.finish(&mut wrapper_flow); wrapper_flow.finish(); + let contains_positioned_fragments = wrapper_flow.contains_positioned_fragments(); if contains_positioned_fragments { // This is the containing block for all the absolute descendants. @@ -1177,7 +1180,9 @@ impl<'a, ConcreteThreadSafeLayoutNode: ThreadSafeLayoutNode> /// Builds a flow for a node with `display: list-item`. This yields a `ListItemFlow` with /// possibly other `BlockFlow`s or `InlineFlow`s underneath it. - fn build_flow_for_list_item(&mut self, node: &ConcreteThreadSafeLayoutNode, flotation: float::T) + fn build_flow_for_list_item(&mut self, + node: &ConcreteThreadSafeLayoutNode, + flotation: float::T) -> ConstructionResult { let flotation = FloatKind::from_property(flotation); let marker_fragments = match node.style(self.style_context()).get_list().list_style_image { @@ -1280,7 +1285,9 @@ impl<'a, ConcreteThreadSafeLayoutNode: ThreadSafeLayoutNode> } /// Builds a flow for a node with 'display: flex'. - fn build_flow_for_flex(&mut self, node: &ConcreteThreadSafeLayoutNode, float_kind: Option<FloatKind>) + fn build_flow_for_flex(&mut self, + node: &ConcreteThreadSafeLayoutNode, + float_kind: Option<FloatKind>) -> ConstructionResult { let fragment = self.build_fragment_for_block(node); let flow = Arc::new(FlexFlow::from_fragment(fragment, float_kind)); |