From fdb791bdd5f40d6d25c9350b39ac400b72747826 Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Wed, 6 Jan 2016 10:34:30 -0800 Subject: [PATCH] layout: Take the value of `background-clip` into account when determining the painting area for background images and gradients. See: https://drafts.csswg.org/css-backgrounds-3/#the-background-clip --- components/layout/display_list_builder.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/layout/display_list_builder.rs b/components/layout/display_list_builder.rs index 7cc1d3f6311..99f26266189 100644 --- a/components/layout/display_list_builder.rs +++ b/components/layout/display_list_builder.rs @@ -335,7 +335,7 @@ impl FragmentDisplayListBuilding for Fragment { Some(computed::Image::LinearGradient(ref gradient)) => { self.build_display_list_for_background_linear_gradient(display_list, level, - absolute_bounds, + &bounds, &clip, gradient, style) @@ -345,7 +345,7 @@ impl FragmentDisplayListBuilding for Fragment { display_list, layout_context, level, - absolute_bounds, + &bounds, &clip, image_url) }