aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout/construct.rs
diff options
context:
space:
mode:
authorEmilio Cobos Álvarez <ecoal95@gmail.com>2016-03-29 02:53:54 +0200
committerEmilio Cobos Álvarez <ecoal95@gmail.com>2016-03-30 14:28:11 +0200
commit5303048c06b4d07e6b0b82eadf9044c1900fa1b4 (patch)
treea99140c76c649262bdfe44f5345bf63521e27622 /components/layout/construct.rs
parent92f39ea5cfb1db3bbbfb7dccc906826895cf4423 (diff)
downloadservo-5303048c06b4d07e6b0b82eadf9044c1900fa1b4.tar.gz
servo-5303048c06b4d07e6b0b82eadf9044c1900fa1b4.zip
layout: prevent an extra arc clone for selected_style
Diffstat (limited to 'components/layout/construct.rs')
-rw-r--r--components/layout/construct.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/components/layout/construct.rs b/components/layout/construct.rs
index b052d9e1176..60713082436 100644
--- a/components/layout/construct.rs
+++ b/components/layout/construct.rs
@@ -717,7 +717,7 @@ impl<'a, ConcreteThreadSafeLayoutNode: ThreadSafeLayoutNode>
let mut style = (*style).clone();
properties::modify_style_for_text(&mut style);
- let selected_style = node.selected_style().clone();
+ let selected_style = node.selected_style();
match text_content {
TextContent::Text(string) => {
@@ -727,7 +727,7 @@ impl<'a, ConcreteThreadSafeLayoutNode: ThreadSafeLayoutNode>
node.opaque(),
node.get_pseudo_element_type().strip(),
style,
- selected_style,
+ selected_style.clone(),
node.restyle_damage(),
specific_fragment_info))
}