From eedb81ef9e114366a7e286e975659360cf9d0983 Mon Sep 17 00:00:00 2001 From: Niklas von Hertzen Date: Sat, 21 Sep 2019 20:33:54 -0700 Subject: [PATCH] fix: correctly render partial borders (fix #1920) (#2010) --- src/render/canvas/canvas-renderer.ts | 3 ++- tests/reftests/border/solid.html | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/render/canvas/canvas-renderer.ts b/src/render/canvas/canvas-renderer.ts index eb95e3c..0196d3e 100644 --- a/src/render/canvas/canvas-renderer.ts +++ b/src/render/canvas/canvas-renderer.ts @@ -701,8 +701,9 @@ export class CanvasRenderer { let side = 0; for (const border of borders) { if (border.style !== BORDER_STYLE.NONE && !isTransparent(border.color)) { - await this.renderBorder(border.color, side++, paint.curves); + await this.renderBorder(border.color, side, paint.curves); } + side++; } } diff --git a/tests/reftests/border/solid.html b/tests/reftests/border/solid.html index 4f3acb4..b689661 100644 --- a/tests/reftests/border/solid.html +++ b/tests/reftests/border/solid.html @@ -40,6 +40,12 @@ border-bottom-width: 50px; } + .box6 { + border-style: none solid none solid; + border-color: #807d32; + border-width: 50px; + } + html { background: #3a84c3; } @@ -51,5 +57,6 @@
 
 
 
+