Closed Bug 1487963 Opened 4 years ago Closed 4 years ago
Node should throw when parameters are out of range
refDistance, maxDistance, rolloffFactor, and coneOuterGain all have limits on their values. The spec asks us to throw errors when the values are out of the limits. https://webaudio.github.io/web-audio-api/#dom-pannernode-refdistance
I have patches for this, just need to figure out arcanist. One issue I'm getting is that testing/web-platform/tests/webaudio/the-audio-api/the-pannernode-interface/panner-distance-clamping.html is failing with `FAIL X panner.maxDistance = -1 threw "RangeError" instead of EcmaScript error RangeError. - assert_true: expected true got false` Not sure what's going on there, is this a bug with the test?
I'll also need to include https://github.com/servo/servo/pull/21555/commits/e1131b474c7d162ec791c10f0bc21ecca56100d7 to make this work, not sure if I should just wait for the sync to happen or copy over the test.
Comment on attachment 9005788 [details] Bug 1487963 - Throw when setting PannerNode parameters out of limits; r?padenot Andrea Marchesini [:baku] has approved the revision.
Comment on attachment 9005788 [details] Bug 1487963 - Throw when setting PannerNode parameters out of limits; r?padenot Paul Adenot (:padenot) has approved the revision.
Pushed by email@example.com: https://hg.mozilla.org/integration/autoland/rev/da0384fb1fbb Throw when setting PannerNode parameters out of limits; r=padenot,baku
cover the exceptions and in range values in our docs.
I've documented the exceptions for these properties, and indicated more clearly what their acceptable ranges are: https://developer.mozilla.org/en-US/docs/Web/API/PannerNode/PannerNode https://developer.mozilla.org/en-US/docs/Web/API/PannerNode/coneOuterGain https://developer.mozilla.org/en-US/docs/Web/API/PannerNode/maxDistance https://developer.mozilla.org/en-US/docs/Web/API/PannerNode/rolloffFactor https://developer.mozilla.org/en-US/docs/Web/API/PannerNode/refDistance I've also added a note to the Fx 64 rel notes: https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Releases/64#APIs Let me know if this looks OK. Thanks!
You need to log in before you can comment on or make changes to this bug.