Audio min / pref isize should not depend the controls.

Otherwise the adjustments that the media controls do in response to size
changes affect the size itself, which can cause cyclic layout.

Differential Revision: https://phabricator.services.mozilla.com/D100722

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1683979
gecko-commit: b6ffa373415664405a767cd30b6681d54fd8f4fb
gecko-reviewers: dholbert
diff --git a/html/rendering/replaced-elements/embedded-content/audio-controls-intrinsic-size.html b/html/rendering/replaced-elements/embedded-content/audio-controls-intrinsic-size.html
new file mode 100644
index 0000000..6cbbcd0
--- /dev/null
+++ b/html/rendering/replaced-elements/embedded-content/audio-controls-intrinsic-size.html
@@ -0,0 +1,25 @@
+<!doctype html>
+<title>Audio intrinsic size doesn't depend on its max size</title>
+<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1683979">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<div style="display: inline-block">
+  <audio controls style="max-width: 99%" id="test"></audio>
+</div>
+<script>
+let audio = document.getElementById("test");
+
+function computeSize() {
+  return audio.getBoundingClientRect().width;
+}
+
+let size = computeSize();
+async_test(function(t) {
+  requestAnimationFrame(t.step_func(function() {
+    assert_equals(computeSize(), size, "Shouldn't have changed size");
+    requestAnimationFrame(t.step_func_done(function() {
+      assert_equals(computeSize(), size, "Shouldn't have changed size");
+    }));
+  }));
+});
+</script>