Skip to content

Commit

Permalink
[e] (0) Revamp the CanvasPixelArray and Window[n] texts, for better c…
Browse files Browse the repository at this point in the history
…ompatibility with WebIDL.

git-svn-id: http://svn.whatwg.org/webapps@2654 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Jan 13, 2009
1 parent 4a60b8d commit d1b0a30
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 53 deletions.
50 changes: 26 additions & 24 deletions index
Expand Up @@ -21110,20 +21110,22 @@ XXXDVT (also check for '- -' bits in the part above) --><p>The <dfn id=dom-conte
<p>The object's <span>indices of the supported indexed
properties</span> are the numbers in the range 0 .. <span><var title="">h</var>&times;<var title="">w</var>&times;4-1</span>.</p>

<p>The value of the <span>corresponding indexed property</span> <var title="">index</var> whenever an indexed property is retrieved is
the value of the <var title="">index</var>th component in the
array.</p>

<p>The behavior for setting an indexed property <var title="">index</var> to a value <var title="">value</var> is to set
the value of the <var title="">index</var>th component in the array
to <var title="">value</var>. JS <code>undefined</code> values must
be converted to zero. Other values must first be converted to
numbers using JavaScript's ToNumber algorithm, and if the result is
a NaN value, then the value be must converted to zero. If the result
is less than 0, it must be clamped to zero. If the result is more
than 255, it must be clamped to 255. If the number is not an
integer, it should be rounded to the nearest integer using the IEEE
754r <i>convertToIntegerTiesToEven</i> rounding mode. <a href=#refsECMA262>[ECMA262]</a> <a href=#refsIEEE754r>[IEEE754R]</a></p>
<p>When a <code><a href=#canvaspixelarray>CanvasPixelArray</a></code> object is indexed to
retrieve an indexed property <var title="">index</var>, the value
returned must be the value of the <var title="">index</var>th
component in the array.</p>

<p>When a <code><a href=#canvaspixelarray>CanvasPixelArray</a></code> object is indexed to modify
an indexed property <var title="">index</var> with value <var title="">value</var>, the value of the <var title="">index</var>th
component in the array must be set to <var title="">value</var>. JS
<code>undefined</code> values must be converted to zero. Other
values must first be converted to numbers using JavaScript's
ToNumber algorithm, and if the result is a NaN value, then the value
must be converted to zero. If the result is less than 0, it must be
clamped to zero. If the result is more than 255, it must be clamped
to 255. If the number is not an integer, it should be rounded to the
nearest integer using the IEEE 754r
<i>convertToIntegerTiesToEven</i> rounding mode. <a href=#refsECMA262>[ECMA262]</a> <a href=#refsIEEE754r>[IEEE754R]</a></p>

<p class=note>The width and height (<var title="">w</var> and <var title="">h</var>) might be different from the <var title="">sw</var>
and <var title="">sh</var> arguments to the above methods, e.g. if
Expand Down Expand Up @@ -33526,8 +33528,7 @@ interface <dfn id=window>Window</dfn> {

<li>The <code title=dom-frames><a href=#dom-frames>frames</a></code> attribute

<li>Any <span title="corresponding indexed property">corresponding
indexed properties</span> (used for <a href=#dom-window-item title=dom-window-item>accessing nested browsing contexts</a>)
<li>The <a href=#dynamic-nested-browsing-context-properties>dynamic nested browsing context properties</a>

</ul><p>User agents must not allow scripts to override the <code title=dom-location><a href=#dom-location>location</a></code> object's setter.</p>

Expand Down Expand Up @@ -33630,21 +33631,22 @@ interface <dfn id=window>Window</dfn> {
contexts</a> of the <a href=#active-document title="active document">active</a>
<code>Document</code>.</p>

<p>The <span>indices of the supported indexed properties</span> on the <code><a href=#window>Window</a></code> object at
any instant are the numbers in the range 0 .. <var title="">n</var>, where <var title="">n</var> is the
<p>The <span>indices of the supported indexed properties</span> on
the <code><a href=#window>Window</a></code> object at any instant are the numbers in the
range 0 .. <var title="">n</var>, where <var title="">n</var> is the
number of <a href=#child-browsing-context title="child browsing context">child browsing
contexts</a> of the <a href=#active-document title="active document">active</a>
<code>Document</code>.</p>
<code>Document</code>. These properties are the <dfn id=dynamic-nested-browsing-context-properties>dynamic nested
browsing context properties</dfn>.</p>

<p>The value of a <span>corresponding indexed property</span> <var title="">index</var> whenever <dfn id=dom-window-item title=dom-window-item>an
indexed property on a <code>Window</code> object is retrieved</dfn>
is the <var title="">index</var>th <a href=#child-browsing-context>child browsing
context</a> of the <a href=#active-document title="active document">active</a>
<p>When a <code><a href=#window>Window</a></code> object is <dfn id=dom-window-item title=dom-window-item>indexed to retrieve an indexed
property</dfn> <var title="">index</var>, the value returned must be
the <var title="">index</var>th <a href=#child-browsing-context>child browsing context</a>
of the <a href=#active-document title="active document">active</a>
<code>Document</code>, sorted in document order of the elements
nesting those browsing contexts.</p>



<h4 id=garbage-collection-and-browsing-contexts><span class=secno>5.2.4 </span>Garbage collection and browsing contexts</h4>

<p>A <a href=#browsing-context>browsing context</a> has a strong reference to each of
Expand Down
58 changes: 29 additions & 29 deletions source
Expand Up @@ -23164,22 +23164,23 @@ XXXDVT (also check for '- -' bits in the part above) -->
properties</span> are the numbers in the range 0 .. <span><var
title="">h</var>&times;<var title="">w</var>&times;4-1</span>.</p>

<p>The value of the <span>corresponding indexed property</span> <var
title="">index</var> whenever an indexed property is retrieved is
the value of the <var title="">index</var>th component in the
array.</p>

<p>The behavior for setting an indexed property <var
title="">index</var> to a value <var title="">value</var> is to set
the value of the <var title="">index</var>th component in the array
to <var title="">value</var>. JS <code>undefined</code> values must
be converted to zero. Other values must first be converted to
numbers using JavaScript's ToNumber algorithm, and if the result is
a NaN value, then the value be must converted to zero. If the result
is less than 0, it must be clamped to zero. If the result is more
than 255, it must be clamped to 255. If the number is not an
integer, it should be rounded to the nearest integer using the IEEE
754r <i>convertToIntegerTiesToEven</i> rounding mode. <a
<p>When a <code>CanvasPixelArray</code> object is indexed to
retrieve an indexed property <var title="">index</var>, the value
returned must be the value of the <var title="">index</var>th
component in the array.</p>

<p>When a <code>CanvasPixelArray</code> object is indexed to modify
an indexed property <var title="">index</var> with value <var
title="">value</var>, the value of the <var title="">index</var>th
component in the array must be set to <var title="">value</var>. JS
<code>undefined</code> values must be converted to zero. Other
values must first be converted to numbers using JavaScript's
ToNumber algorithm, and if the result is a NaN value, then the value
must be converted to zero. If the result is less than 0, it must be
clamped to zero. If the result is more than 255, it must be clamped
to 255. If the number is not an integer, it should be rounded to the
nearest integer using the IEEE 754r
<i>convertToIntegerTiesToEven</i> rounding mode. <a
href="#refsECMA262">[ECMA262]</a> <a
href="#refsIEEE754r">[IEEE754R]</a></p>

Expand Down Expand Up @@ -38071,9 +38072,7 @@ interface <dfn>Window</dfn> {

<li>The <code title="dom-frames">frames</code> attribute

<li>Any <span title="corresponding indexed property">corresponding
indexed properties</span> (used for <span
title="dom-window-item">accessing nested browsing contexts</span>)
<li>The <span>dynamic nested browsing context properties</span>

</ul>

Expand Down Expand Up @@ -38185,22 +38184,23 @@ interface <dfn>Window</dfn> {
contexts</span> of the <span title="active document">active</span>
<code>Document</code>.</p>

<p>The <span>indices of the supported indexed properties</span> on the <code>Window</code> object at
any instant are the numbers in the range 0 .. <var title="">n</var>, where <var title="">n</var> is the
<p>The <span>indices of the supported indexed properties</span> on
the <code>Window</code> object at any instant are the numbers in the
range 0 .. <var title="">n</var>, where <var title="">n</var> is the
number of <span title="child browsing context">child browsing
contexts</span> of the <span title="active document">active</span>
<code>Document</code>.</p>

<p>The value of a <span>corresponding indexed property</span> <var
title="">index</var> whenever <dfn title="dom-window-item">an
indexed property on a <code>Window</code> object is retrieved</dfn>
is the <var title="">index</var>th <span>child browsing
context</span> of the <span title="active document">active</span>
<code>Document</code>. These properties are the <dfn>dynamic nested
browsing context properties</dfn>.</p>

<p>When a <code>Window</code> object is <dfn
title="dom-window-item">indexed to retrieve an indexed
property</dfn> <var title="">index</var>, the value returned must be
the <var title="">index</var>th <span>child browsing context</span>
of the <span title="active document">active</span>
<code>Document</code>, sorted in document order of the elements
nesting those browsing contexts.</p>



<h4>Garbage collection and browsing contexts</h4>

<p>A <span>browsing context</span> has a strong reference to each of
Expand Down

0 comments on commit d1b0a30

Please sign in to comment.