From fdb85cda3c7fa7956f2c8db518e3573a7795a381 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Tue, 3 Jan 2017 14:45:43 +0000 Subject: [PATCH] Inherit a fieldset's border-radius down into its content wrapper box, so it doesn't leak out and mess up hit-testing in the corner areas when it has rounded borders. Upstreamed from https://bugzilla.mozilla.org/show_bug.cgi?id=1326163 --- cssom-view/elementFromPoint.html | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/cssom-view/elementFromPoint.html b/cssom-view/elementFromPoint.html index 20d3077b3a9132..55a14072b6021e 100644 --- a/cssom-view/elementFromPoint.html +++ b/cssom-view/elementFromPoint.html @@ -59,7 +59,9 @@
-
+
@@ -189,6 +191,14 @@ divRect.top + divRect.height/2), fieldsetDiv, "The fieldset should not cover up the div it doesn't even overlap"); + + var fieldset = document.getElementById("fieldset"); + var rect = fieldset.getBoundingClientRect(); + // A point 5px in from topleft will be outside the rounded border. + assert_not_equals(document.elementFromPoint(rect.left + 5, + rect.top + 5), + fieldset, + "The fieldset should not be hit by hit-tests outside its rounded border"); }, "Fieldsets"); done(); }