diff --git a/components/layout/display_list_builder.rs b/components/layout/display_list_builder.rs index c4937791140..103b8a6b10e 100644 --- a/components/layout/display_list_builder.rs +++ b/components/layout/display_list_builder.rs @@ -971,14 +971,14 @@ impl FragmentDisplayListBuilding for Fragment { // Add shadows, background, borders, and outlines, if applicable. if let Some(ref inline_context) = self.inline_context { for node in inline_context.nodes.iter().rev() { - self.build_display_list_for_box_shadow_if_applicable( + self.build_display_list_for_background_if_applicable( &*node.style, display_list, layout_context, level, &stacking_relative_border_box, &clip); - self.build_display_list_for_background_if_applicable( + self.build_display_list_for_box_shadow_if_applicable( &*node.style, display_list, layout_context, @@ -1008,13 +1008,13 @@ impl FragmentDisplayListBuilding for Fragment { } if !self.is_scanned_text_fragment() { - self.build_display_list_for_box_shadow_if_applicable(&*self.style, + self.build_display_list_for_background_if_applicable(&*self.style, display_list, layout_context, level, &stacking_relative_border_box, &clip); - self.build_display_list_for_background_if_applicable(&*self.style, + self.build_display_list_for_box_shadow_if_applicable(&*self.style, display_list, layout_context, level, diff --git a/tests/ref/basic.list b/tests/ref/basic.list index 174a7a645b8..e6a93eb22d4 100644 --- a/tests/ref/basic.list +++ b/tests/ref/basic.list @@ -77,10 +77,12 @@ flaky_cpu == append_style_a.html append_style_b.html == border_spacing_fixed_layout_a.html border_spacing_ref.html == border_style_none_a.html border_style_none_b.html == borders_a.html borders_b.html +== box_shadow_bg.html box_shadow_bg_ref.html != box_shadow_blur_a.html box_shadow_blur_ref.html == box_shadow_border_box_a.html box_shadow_border_box_ref.html == box_shadow_default_color_a.html box_shadow_default_color_ref.html == box_shadow_inset_a.html box_shadow_inset_ref.html +== box_shadow_inset_bg.html box_shadow_inset_bg_ref.html == box_shadow_inset_parsing_a.html box_shadow_inset_parsing_ref.html == box_shadow_paint_order_a.html box_shadow_paint_order_ref.html == box_shadow_spread_a.html box_shadow_spread_ref.html diff --git a/tests/ref/box_shadow_bg.html b/tests/ref/box_shadow_bg.html new file mode 100644 index 00000000000..6a2bcc9a7ea --- /dev/null +++ b/tests/ref/box_shadow_bg.html @@ -0,0 +1,11 @@ +
+ + + diff --git a/tests/ref/box_shadow_bg_ref.html b/tests/ref/box_shadow_bg_ref.html new file mode 100644 index 00000000000..da1ebf46373 --- /dev/null +++ b/tests/ref/box_shadow_bg_ref.html @@ -0,0 +1,16 @@ +
+ + + diff --git a/tests/ref/box_shadow_inset_bg.html b/tests/ref/box_shadow_inset_bg.html new file mode 100644 index 00000000000..c728a08e827 --- /dev/null +++ b/tests/ref/box_shadow_inset_bg.html @@ -0,0 +1,11 @@ +
+ + + diff --git a/tests/ref/box_shadow_inset_bg_ref.html b/tests/ref/box_shadow_inset_bg_ref.html new file mode 100644 index 00000000000..7c7229ff5da --- /dev/null +++ b/tests/ref/box_shadow_inset_bg_ref.html @@ -0,0 +1,16 @@ +
+ + +