@@ -5972,7 +5972,8 @@ type that corresponds to the set of finite single-precision 32 bit
5972
5972
IEEE 754 floating point numbers. [[!IEEE-754]]
5973
5973
5974
5974
When defined with the [{{Unrestricted}}] [=extended attribute=], the {{float}} type
5975
- additionally corresponds to IEEE 754 non-finite, and special "not a number" values (NaNs). [[!IEEE-754]]
5975
+ additionally corresponds to the single-precision 32 bit IEEE 754 non-finite,
5976
+ and special "not a number" values (NaNs). [[!IEEE-754]]
5976
5977
5977
5978
{{float}} constant values in IDL are
5978
5979
represented with <emu-t class="regex"><a href="#prod-decimal">decimal</a></emu-t>
@@ -5997,7 +5998,8 @@ type that corresponds to the set of finite double-precision 64 bit
5997
5998
IEEE 754 floating point numbers. [[!IEEE-754]]
5998
5999
5999
6000
When defined with the [{{Unrestricted}}] [=extended attribute=], the {{double}} type
6000
- additionally corresponds to IEEE 754 non-finite, and special "not a number" values (NaNs). [[!IEEE-754]]
6001
+ additionally corresponds to the double-precision 64 bit IEEE 754 non-finite,
6002
+ and special "not a number" values (NaNs). [[!IEEE-754]]
6001
6003
6002
6004
{{double}} constant values in IDL are
6003
6005
represented with <emu-t class="regex"><a href="#prod-decimal">decimal</a></emu-t>
@@ -7125,8 +7127,8 @@ ECMAScript value type.
7125
7127
return the {{boolean}} value that represents the same truth value.
7126
7128
1. If <a abstract-op>Type</a>(|V|) is Number, then
7127
7129
return the result of <a href="#es-to-double">converting</a> |V|
7128
- to an {{double}} [=extended attribute associated with|associated with=]
7129
- the [{{Unrestricted}}] [=extended attribute=].
7130
+ to a {{double}} [=extended attribute associated with|with an associated =]
7131
+ [{{Unrestricted}}] [=extended attribute=].
7130
7132
1. If <a abstract-op>Type</a>(|V|) is String, then
7131
7133
return the result of <a href="#es-DOMString">converting</a> |V|
7132
7134
to a {{DOMString}}.
@@ -7436,8 +7438,8 @@ In effect, where <var ignore>x</var> is a Number value,
7436
7438
to an IDL {{float}} value by running the following algorithm:
7437
7439
7438
7440
1. Let |x| be [=?=] <a abstract-op>ToNumber</a>(|V|).
7439
- 1. If the conversion is to an IDL type [=extended attribute associated with|associated with=]
7440
- the [{{Unrestricted}}] [=extended attribute=], then:
7441
+ 1. If the conversion is to an IDL type [=extended attribute associated with|with an associated =]
7442
+ [{{Unrestricted}}] [=extended attribute=], then:
7441
7443
1. If |x| is <emu-val>NaN</emu-val>, then
7442
7444
return the IDL {{float}} value that represents
7443
7445
the IEEE 754 NaN value with the bit pattern 0x7fc00000 [[!IEEE-754]].
@@ -7451,8 +7453,8 @@ In effect, where <var ignore>x</var> is a Number value,
7451
7453
<em>even significand</em> if there are two [=equally close values=].
7452
7454
(The two special values 2<sup>128</sup> and −2<sup>128</sup>
7453
7455
are considered to have even significands for this purpose.)
7454
- 1. If the conversion is to an IDL type [=extended attribute associated with|associated with=]
7455
- the [{{Unrestricted}}] [=extended attribute=], then:
7456
+ 1. If the conversion is to an IDL type [=extended attribute associated with|with an associated =]
7457
+ [{{Unrestricted}}] [=extended attribute=], then:
7456
7458
1. If |y| is 2<sup>128</sup>, return +∞.
7457
7459
1. If |y| is −2<sup>128</sup>, return −∞.
7458
7460
1. Else, if |y| is 2<sup>128</sup> or −2<sup>128</sup>, then [=ECMAScript/throw=] a {{ECMAScript/TypeError}}.
@@ -7470,8 +7472,8 @@ value when its bit pattern is interpreted as an unsigned 32 bit integer.
7470
7472
an IDL {{float}} value to an ECMAScript
7471
7473
value is a Number:
7472
7474
7473
- 1. If the conversion is from an IDL type [=extended attribute associated with|associated with=]
7474
- the [{{Unrestricted}}] [=extended attribute=], then:
7475
+ 1. If the conversion is from an IDL type [=extended attribute associated with|with an associated =]
7476
+ [{{Unrestricted}}] [=extended attribute=], then:
7475
7477
1. If the IDL {{float}} value is a NaN,
7476
7478
then the Number value is <emu-val>NaN</emu-val>.
7477
7479
1. Else, assert: The IDL {{float}} value is not a NaN, +∞ or −∞.
@@ -7489,8 +7491,8 @@ value when its bit pattern is interpreted as an unsigned 32 bit integer.
7489
7491
to an IDL {{double}} value by running the following algorithm:
7490
7492
7491
7493
1. Let |x| be [=?=] <a abstract-op>ToNumber</a>(|V|).
7492
- 1. If the conversion is to an IDL type [=extended attribute associated with|associated with=]
7493
- the [{{Unrestricted}}] [=extended attribute=], then:
7494
+ 1. If the conversion is to an IDL type [=extended attribute associated with|with an associated =]
7495
+ [{{Unrestricted}}] [=extended attribute=], then:
7494
7496
1. If |x| is <emu-val>NaN</emu-val>, then
7495
7497
return the IDL {{double}} value that represents
7496
7498
the IEEE 754 NaN value with the bit pattern 0x7ff8000000000000 [[!IEEE-754]].
@@ -7510,8 +7512,8 @@ value when its bit pattern is interpreted as an unsigned 64 bit integer.
7510
7512
an IDL {{double}} value to an ECMAScript
7511
7513
value is a Number:
7512
7514
7513
- 1. If the conversion is from an IDL type [=extended attribute associated with|associated with=]
7514
- the [{{Unrestricted}}] [=extended attribute=], then:
7515
+ 1. If the conversion is from an IDL type [=extended attribute associated with|with an associated =]
7516
+ [{{Unrestricted}}] [=extended attribute=], then:
7515
7517
1. If the IDL {{double}} value is a NaN,
7516
7518
then the Number value is <emu-val>NaN</emu-val>.
7517
7519
1. Else, assert: The IDL {{double}} value is not a NaN, +∞ or −∞.
@@ -10691,12 +10693,12 @@ for the specific requirements that the use of
10691
10693
<pre highlight="webidl">
10692
10694
[Exposed=Window]
10693
10695
interface GraphicsContext {
10694
- void setColorFloat (double red, double green, double blue);
10695
- void setColorUnrestrictedFloat ([Unrestricted] double red, [Unrestricted] double green, [Unrestricted] double blue);
10696
+ void setColorDouble (double red, double green, double blue);
10697
+ void setColorUnrestrictedDouble ([Unrestricted] double red, [Unrestricted] double green, [Unrestricted] double blue);
10696
10698
};
10697
10699
</pre>
10698
10700
10699
- In an ECMAScript implementation of the IDL, a call to setColor3f with
10701
+ In an ECMAScript implementation of the IDL, a call to setColorDouble with
10700
10702
Number values that are out of range for a
10701
10703
{{double}} will result in an exception being
10702
10704
thrown.
@@ -10706,14 +10708,14 @@ for the specific requirements that the use of
10706
10708
var context = getGraphicsContext();
10707
10709
10708
10710
// Calling the [Unrestricted] version uses allows NaN and non-finite numbers values:
10709
- context.setColorUnrestrictedFloat (NaN, +Infinity, -Infinity);
10711
+ context.setColorUnrestrictedDouble (NaN, +Infinity, -Infinity);
10710
10712
10711
- // When setColorFloat is called, floating point values are allowed:
10712
- context.setColorFloat (-0.9, 1, 1.1);
10713
+ // When setColorDouble is called, floating point values are allowed:
10714
+ context.setColorDouble (-0.9, 1, 1.1);
10713
10715
10714
10716
// The following will cause a TypeError to be thrown, since NaN and non-finite
10715
10717
// number values are not allowed when [Unrestricted] is not specified:
10716
- context.setColorFloat (NaN, +Infinity, -Infinity);
10718
+ context.setColorDouble (NaN, +Infinity, -Infinity);
10717
10719
</pre>
10718
10720
</div>
10719
10721
0 commit comments