diff options
Diffstat (limited to 'components/layout')
-rw-r--r-- | components/layout/animation.rs | 2 | ||||
-rw-r--r-- | components/layout/css/matching.rs | 2 | ||||
-rw-r--r-- | components/layout/flow.rs | 2 | ||||
-rw-r--r-- | components/layout/fragment.rs | 6 | ||||
-rw-r--r-- | components/layout/inline.rs | 6 | ||||
-rw-r--r-- | components/layout/text.rs | 2 |
6 files changed, 10 insertions, 10 deletions
diff --git a/components/layout/animation.rs b/components/layout/animation.rs index ab11433fdfa..26c40bade35 100644 --- a/components/layout/animation.rs +++ b/components/layout/animation.rs @@ -108,7 +108,7 @@ pub fn recalc_style_for_animations(flow: &mut Flow, } let mut new_style = fragment.style.clone(); - animation.property_animation.update(&mut *Arc::make_unique(&mut new_style), + animation.property_animation.update(&mut *Arc::make_mut(&mut new_style), progress); damage.insert(incremental::compute_damage(&Some(fragment.style.clone()), &new_style)); diff --git a/components/layout/css/matching.rs b/components/layout/css/matching.rs index db14af662ec..7a0e1ba969f 100644 --- a/components/layout/css/matching.rs +++ b/components/layout/css/matching.rs @@ -448,7 +448,7 @@ impl<'ln> PrivateMatchMethods for LayoutNode<'ln> { let this_opaque = self.opaque(); if let Some(ref animations) = layout_context.running_animations.get(&this_opaque) { for animation in *animations { - animation.property_animation.update(&mut *Arc::make_unique(style), 1.0); + animation.property_animation.update(&mut *Arc::make_mut(style), 1.0); } } } diff --git a/components/layout/flow.rs b/components/layout/flow.rs index beb3b00cfef..932cab031d5 100644 --- a/components/layout/flow.rs +++ b/components/layout/flow.rs @@ -1493,7 +1493,7 @@ impl ContainingBlockLink { } fn set(&mut self, link: FlowRef) { - self.link = Some(link.downgrade()) + self.link = Some(Arc::downgrade(&link)) } #[allow(unsafe_code)] diff --git a/components/layout/fragment.rs b/components/layout/fragment.rs index 309522ab43b..faa2dd4d610 100644 --- a/components/layout/fragment.rs +++ b/components/layout/fragment.rs @@ -724,7 +724,7 @@ impl UnscannedTextFragmentInfo { #[inline] pub fn from_text(text: String) -> UnscannedTextFragmentInfo { UnscannedTextFragmentInfo { - text: text.into_boxed_slice(), + text: text.into_boxed_str(), } } } @@ -2160,7 +2160,7 @@ impl Fragment { break } if modified { - unscanned_text_fragment_info.text = new_text_string.into_boxed_slice(); + unscanned_text_fragment_info.text = new_text_string.into_boxed_str(); } WhitespaceStrippingResult::from_unscanned_text_fragment_info( @@ -2238,7 +2238,7 @@ impl Fragment { for character in trailing_bidi_control_characters_to_retain.iter().rev() { text.push(*character); } - unscanned_text_fragment_info.text = text.into_boxed_slice(); + unscanned_text_fragment_info.text = text.into_boxed_str(); } WhitespaceStrippingResult::from_unscanned_text_fragment_info( diff --git a/components/layout/inline.rs b/components/layout/inline.rs index a47e600ac28..ec69db2f622 100644 --- a/components/layout/inline.rs +++ b/components/layout/inline.rs @@ -1119,9 +1119,9 @@ impl InlineFlow { // FIXME(pcwalton): This is an awful lot of uniqueness making. I don't see any easy way // to get rid of it without regressing the performance of the non-justified case, // though. - let run = Arc::make_unique(&mut scanned_text_fragment_info.run); + let run = Arc::make_mut(&mut scanned_text_fragment_info.run); { - let glyph_runs = Arc::make_unique(&mut run.glyphs); + let glyph_runs = Arc::make_mut(&mut run.glyphs); for mut glyph_run in &mut *glyph_runs { let mut range = glyph_run.range.intersect(&fragment_range); if range.is_empty() { @@ -1129,7 +1129,7 @@ impl InlineFlow { } range.shift_by(-glyph_run.range.begin()); - let glyph_store = Arc::make_unique(&mut glyph_run.glyph_store); + let glyph_store = Arc::make_mut(&mut glyph_run.glyph_store); glyph_store.distribute_extra_space_in_range(&range, space_per_expansion_opportunity); } diff --git a/components/layout/text.rs b/components/layout/text.rs index fdac2dfa658..a61393b5d20 100644 --- a/components/layout/text.rs +++ b/components/layout/text.rs @@ -400,7 +400,7 @@ fn split_first_fragment_at_newline_if_necessary(fragments: &mut LinkedList<Fragm string_before = unscanned_text_fragment_info.text[..(position + 1)].to_owned(); unscanned_text_fragment_info.text = - unscanned_text_fragment_info.text[(position + 1)..].to_owned().into_boxed_slice(); + unscanned_text_fragment_info.text[(position + 1)..].to_owned().into_boxed_str(); } first_fragment.transform(first_fragment.border_box.size, SpecificFragmentInfo::UnscannedText( |