From 9e9fb09273ed697d38ba697d2a5190b4d9ee1ac4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Wang?= Date: Tue, 21 Jan 2020 10:54:27 +0000 Subject: [PATCH] Bug 1610238 [wpt PR 21256] - Relax feature-detection for , a=testonly Automatic update from web-platform-tests Relax feature-detection for (#21256) Discussion is still open: https://github.com/mathml-refresh/mathml/issues/105 so let's only check some minimal support. Igalia does not plan to implement this element in Chromium for now so making detection too strict is causing test failures. -- wpt-commits: ee2b3c3d8740dcfccf6d6a0c5a371335dd198654 wpt-pr: 21256 --- .../tests/mathml/support/feature-detection.js | 34 +++---------------- 1 file changed, 5 insertions(+), 29 deletions(-) diff --git a/testing/web-platform/tests/mathml/support/feature-detection.js b/testing/web-platform/tests/mathml/support/feature-detection.js index 1952d3b06c123..7ad4d953d0822 100644 --- a/testing/web-platform/tests/mathml/support/feature-detection.js +++ b/testing/web-platform/tests/mathml/support/feature-detection.js @@ -24,35 +24,11 @@ var MathMLFeatureDetection = { }, "has_menclose": function() { - if (!this.hasOwnProperty("_has_menclose")) { - document.body.insertAdjacentHTML("beforeend", "\ -\ - \ - \ - \ - A\ - \ - \ - \ -\ -\ - \ - \ - \ - A\ - \ - \ - \ -\ -"); - var math = document.body.lastElementChild; - // The boxes will make menclose wider than mrow, if the former is supported. - this._has_menclose = - math.lastElementChild.getBoundingClientRect().width - - math.firstElementChild.getBoundingClientRect().width > 5; - document.body.removeChild(math); - } - return this._has_menclose; + // Just check whether is supported because discussion on this is + // still open ( https://github.com/mathml-refresh/mathml/issues/105 ) + // and it would have to behave at least like an mrow, even if it becomes + // an unknown element at the end. + return this.has_mrow(); }, "has_merror": function() {