From 956b9caced05404dd43984085fde5cf042e5ce6b Mon Sep 17 00:00:00 2001 From: Basilisk-Dev Date: Sat, 9 May 2026 14:27:59 -0400 Subject: [PATCH] Fix CSS border rounding and currentcolor clipping --- .../test/test_border_width_rounding.html | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/layout/style/test/test_border_width_rounding.html b/layout/style/test/test_border_width_rounding.html index f7c2faabda..2de866b200 100644 --- a/layout/style/test/test_border_width_rounding.html +++ b/layout/style/test/test_border_width_rounding.html @@ -42,8 +42,37 @@ function checkWidth(property, setupProperty, setupValue) { }); } +function checkOffset(property) { + tests.forEach(function(test) { + var specified = test[0]; + var expected = test[1]; + var div = document.createElement("div"); + div.style[property] = specified; + display.appendChild(div); + + is(document.defaultView.getComputedStyle(div, "")[property], expected, + property + " computes " + specified + " as " + expected); + + display.removeChild(div); + }); + + tests.forEach(function(test) { + var specified = test[0]; + var expected = test[0] == "0px" ? "0px" : "-" + test[1]; + var div = document.createElement("div"); + div.style[property] = "-" + specified; + display.appendChild(div); + + is(document.defaultView.getComputedStyle(div, "")[property], expected, + property + " computes -" + specified + " as " + expected); + + display.removeChild(div); + }); +} + checkWidth("borderWidth", "borderStyle", "solid"); checkWidth("outlineWidth", "outlineStyle", "solid"); +checkOffset("outlineOffset");