From 39471cda1b54dc7cf079cf60c5239ee7cef44c44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Mon, 8 May 2017 11:04:14 +0200 Subject: [PATCH] layout: Avoid a few dumb refcount bumps. --- components/layout/display_list_builder.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/layout/display_list_builder.rs b/components/layout/display_list_builder.rs index 785025cc3e1..ac1735b7a16 100644 --- a/components/layout/display_list_builder.rs +++ b/components/layout/display_list_builder.rs @@ -577,7 +577,7 @@ fn build_border_radius(abs_bounds: &Rect, /// Get the border radius for the rectangle inside of a rounded border. This is useful /// for building the clip for the content inside the border. fn build_border_radius_for_inner_rect(outer_rect: &Rect, - style: ::StyleArc) + style: &ServoComputedValues) -> BorderRadii { let mut radii = build_border_radius(&outer_rect, style.get_border()); if radii.is_square() { @@ -2376,7 +2376,7 @@ impl BlockFlowDisplayListBuilding for BlockFlow { let mut clip = ClippingRegion::from_rect(&clip_rect); let border_radii = build_border_radius_for_inner_rect(&border_box, - self.fragment.style.clone()); + &self.fragment.style); if !border_radii.is_square() { clip.intersect_with_rounded_rect(&clip_rect, &border_radii) } @@ -2398,7 +2398,7 @@ impl BlockFlowDisplayListBuilding for BlockFlow { let clip_rect = Rect::new(Point2D::zero(), content_box.size); let mut clip = ClippingRegion::from_rect(&clip_rect); - let radii = build_border_radius_for_inner_rect(&border_box, self.fragment.style.clone()); + let radii = build_border_radius_for_inner_rect(&border_box, &self.fragment.style); if !radii.is_square() { clip.intersect_with_rounded_rect(&clip_rect, &radii) }