From ba172678f07f962e9f54b398df087e86217d7a13 Mon Sep 17 00:00:00 2001 From: flyskyko Date: Fri, 7 May 2021 18:32:51 +0900 Subject: [PATCH] fix top right border radius (#2522) --- src/render/bound-curves.ts | 2 +- tests/reftests/border/radius.html | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/render/bound-curves.ts b/src/render/bound-curves.ts index 0b260bd4b..6f19899dd 100644 --- a/src/render/bound-curves.ts +++ b/src/render/bound-curves.ts @@ -91,7 +91,7 @@ export class BoundCurves { ? getCurvePoints( bounds.left + Math.min(topWidth, bounds.width + borderLeftWidth), bounds.top + borderTopWidth, - topWidth > bounds.width + borderLeftWidth ? 0 : trh - borderLeftWidth, + topWidth > bounds.width + borderRightWidth ? 0 : trh - borderRightWidth, trv - borderTopWidth, CORNER.TOP_RIGHT ) diff --git a/tests/reftests/border/radius.html b/tests/reftests/border/radius.html index 37136e18f..1949c2fdf 100644 --- a/tests/reftests/border/radius.html +++ b/tests/reftests/border/radius.html @@ -63,6 +63,13 @@ border-radius: 200px; } + .box7 { + border-width: 10px 10px 10px 1px; + border-left-color: transparent; + border-top-color: red; + border-right-color: green; + } + .gauge{ display: inline-block; width: 100px; @@ -91,6 +98,7 @@
 
 
 
+