diff --git a/components/gfx/paint_context.rs b/components/gfx/paint_context.rs index 0748b3db928..f34b62559f8 100644 --- a/components/gfx/paint_context.rs +++ b/components/gfx/paint_context.rs @@ -642,8 +642,7 @@ impl<'a> PaintContext<'a> { let original_bounds = self.get_scaled_bounds(bounds, border, 0.0); // select and scale the color appropriately. let scaled_color = match direction { - Top => self.scale_color(color, if is_inset { 2.0/3.0 } else { 1.0 }), - Left => self.scale_color(color, if is_inset { 1.0/6.0 } else { 0.5 }), + Top | Left => self.scale_color(color, if is_inset { 2.0/3.0 } else { 1.0 }), Right | Bottom => self.scale_color(color, if is_inset { 1.0 } else { 2.0/3.0 }) }; self.draw_border_path(&original_bounds, direction, border, radius, scaled_color); diff --git a/tests/ref/basic.list b/tests/ref/basic.list index 5d993a5fe9c..3976d902d9e 100644 --- a/tests/ref/basic.list +++ b/tests/ref/basic.list @@ -213,3 +213,5 @@ fragment=top != ../html/acid2.html acid2_ref.html == table_colspan_fixed_a.html table_colspan_fixed_ref.html == legacy_td_bgcolor_attribute_a.html legacy_td_bgcolor_attribute_ref.html == legacy_table_border_attribute_a.html legacy_table_border_attribute_ref.html +== inset.html inset_ref.html +== outset.html outset_ref.html diff --git a/tests/ref/inset.html b/tests/ref/inset.html new file mode 100644 index 00000000000..095303adab5 --- /dev/null +++ b/tests/ref/inset.html @@ -0,0 +1,53 @@ + + + + + + +
+
+
+ +
+
+ + diff --git a/tests/ref/inset.png b/tests/ref/inset.png new file mode 100644 index 00000000000..001f68cd2ed Binary files /dev/null and b/tests/ref/inset.png differ diff --git a/tests/ref/inset_ref.html b/tests/ref/inset_ref.html new file mode 100644 index 00000000000..3e1025fd871 --- /dev/null +++ b/tests/ref/inset_ref.html @@ -0,0 +1,13 @@ + + + + + + + diff --git a/tests/ref/outset.html b/tests/ref/outset.html new file mode 100644 index 00000000000..74eded318fd --- /dev/null +++ b/tests/ref/outset.html @@ -0,0 +1,52 @@ + + + + + + +
+
+
+ +
+
+ + diff --git a/tests/ref/outset.png b/tests/ref/outset.png new file mode 100644 index 00000000000..fdef12129ef Binary files /dev/null and b/tests/ref/outset.png differ diff --git a/tests/ref/outset_ref.html b/tests/ref/outset_ref.html new file mode 100644 index 00000000000..6da0826efdf --- /dev/null +++ b/tests/ref/outset_ref.html @@ -0,0 +1,19 @@ + + + + + + +