diff --git a/src/components/main/layout/box.rs b/src/components/main/layout/box.rs index 844e37954f5..a8e5177a155 100644 --- a/src/components/main/layout/box.rs +++ b/src/components/main/layout/box.rs @@ -599,6 +599,10 @@ impl RenderBox { match *self { UnscannedTextRenderBoxClass(*) => fail!(~"Shouldn't see unscanned boxes here."), TextRenderBoxClass(text_box) => { + + // Add the background to the list, if applicable. + self.paint_background_if_applicable(list, &absolute_box_bounds); + let nearest_ancestor_element = self.nearest_ancestor_element(); let color = nearest_ancestor_element.style().color().to_gfx_color(); diff --git a/src/test/html/inline_bg_color_simple.html b/src/test/html/inline_bg_color_simple.html new file mode 100644 index 00000000000..5f145e64e96 --- /dev/null +++ b/src/test/html/inline_bg_color_simple.html @@ -0,0 +1,11 @@ + +
+ + [block background color test] +paragraph yellow
+ + [inline background color test] + span bluetexttexttextspan yellownested-span redtest finishes + + +