From 27b05c58f610eaea51690f547560226388890e52 Mon Sep 17 00:00:00 2001 From: Maciej Skrzypkowski Date: Thu, 16 Jun 2016 08:57:39 +0200 Subject: Small performance improvement node.selection() is not used text_content is equal to TextContent::GeneratedContent(content_items) --- components/layout/construct.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'components/layout/construct.rs') diff --git a/components/layout/construct.rs b/components/layout/construct.rs index 3dfcfdf2689..49546fb2663 100644 --- a/components/layout/construct.rs +++ b/components/layout/construct.rs @@ -726,7 +726,6 @@ impl<'a, ConcreteThreadSafeLayoutNode: ThreadSafeLayoutNode> return } - let selection = node.selection(); let mut style = (*style).clone(); properties::modify_style_for_text(&mut style); @@ -734,7 +733,7 @@ impl<'a, ConcreteThreadSafeLayoutNode: ThreadSafeLayoutNode> match text_content { TextContent::Text(string) => { - let info = box UnscannedTextFragmentInfo::new(string, selection); + let info = box UnscannedTextFragmentInfo::new(string, node.selection()); let specific_fragment_info = SpecificFragmentInfo::UnscannedText(info); fragments.fragments.push_back(Fragment::from_opaque_node_and_style( node.opaque(), -- cgit v1.2.3