W3C home > Mailing lists > Public > public-script-coord@w3.org > July to September 2015

[Bug 28875] [EnforceRange] accepts an odd set of input values

From: <bugzilla@jessica.w3.org>
Date: Thu, 02 Jul 2015 01:54:06 +0000
To: public-script-coord@w3.org
Message-ID: <bug-28875-3890-fdodDwdWQp@http.www.w3.org/Bugs/Public/>

--- Comment #6 from Boris Zbarsky <bzbarsky@mit.edu> ---
> but not a consistent set

Well, it's consistent with how everything else in JS converts things to
numbers...  It's fairly intentionally matching those other conversions, yes.

You raise a good point about how conversion to integers in JS typically
converts non-finite doubles to 0.  That's a pretty odd thing to do in
[EnforceRange], though (at least for the positive and negative Infinity
values).  So [EnforceRange] basically just codifies what people would otherwise
do in prose: take a double or 53-bit int (depending on whether they wanted to
throw or round on non-integers). and then check the range.

> Maybe we should just unify those behaviors

I could live with that, probably; we'd need to think a bit about what the
behavior looks like for integer sizes other than 32-bit.

You are receiving this mail because:
You are on the CC list for the bug.
Received on Thursday, 2 July 2015 01:54:11 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:14:24 UTC