Skip to content

Commit

Permalink
[gw] (2) Add .naturalWidth/.naturalHeight IDL attributes to <img>.
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.whatwg.org/webapps@3766 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Sep 7, 2009
1 parent 0c015d5 commit 18a32a2
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 4 deletions.
21 changes: 19 additions & 2 deletions index
Expand Up @@ -17813,6 +17813,8 @@ interface <dfn id=htmlimageelement>HTMLImageElement</dfn> : <a href=#htmlelement
attribute boolean <a href=#dom-img-ismap title=dom-img-isMap>isMap</a>;
attribute unsigned long <a href=#dom-img-width title=dom-img-width>width</a>;
attribute unsigned long <a href=#dom-img-height title=dom-img-height>height</a>;
readonly attribute unsigned long <a href=#dom-img-naturalwidth title=dom-img-naturalWidth>naturalWidth</a>;
readonly attribute unsigned long <span title=dom-img-naturalHeight>naturalHeight</span>;
readonly attribute boolean <a href=#dom-img-complete title=dom-img-complete>complete</a>;
};</pre>
</dd>
Expand Down Expand Up @@ -18135,6 +18137,16 @@ interface <dfn id=htmlimageelement>HTMLImageElement</dfn> : <a href=#htmlelement

</dd>

<dt><var title="">image</var> . <code title=dom-img-naturalWidth><a href=#dom-img-naturalwidth>naturalWidth</a></code></dt>
<dt><var title="">image</var> . <code title=dom-img-naturalHeight>naturalHeight</code></dt>

<dd>

<p>These attributes return the intrinsic dimensions of the image,
or zero if the dimensions are not known.</p>

</dd>

<dt><var title="">image</var> . <code title=dom-img-complete><a href=#dom-img-complete>complete</a></code></dt>

<dd>
Expand All @@ -18160,12 +18172,17 @@ interface <dfn id=htmlimageelement>HTMLImageElement</dfn> : <a href=#htmlelement
is being rendered, and is being rendered to a visual medium; or else
the intrinsic width and height of the image, in CSS pixels, if the
image is <i title=img-available><a href=#img-available>available</a></i> but not being
rendered to a visual medium; or else 0, if the image is not <i title=img-available><a href=#img-available>available</a></i> or its dimensions are not
known. <a href=#refsCSS>[CSS]</a></p>
rendered to a visual medium; or else 0, if the image is not <i title=img-available><a href=#img-available>available</a></i>. <a href=#refsCSS>[CSS]</a></p>

<p>On setting, they must act as if they <a href=#reflect title=reflect>reflected</a> the respective content attributes
of the same name.</p>

<p>The IDL attributes <dfn id=dom-img-naturalwidth title=dom-img-naturalWidth><code>naturalWidth</code></dfn> and
<dfn id=dom-img-nturalheight title=dom-img-nturalHeight><code>naturalHeight</code></dfn>
must return the intrinsic width and height of the image, in CSS
pixels, if the image is <i title=img-available><a href=#img-available>available</a></i>, or
else 0. <a href=#refsCSS>[CSS]</a></p>

<p>The IDL attribute <dfn id=dom-img-complete title=dom-img-complete><code>complete</code></dfn> must return
true if the user agent has fetched the image specified in the <code title=attr-img-src><a href=#attr-img-src>src</a></code> attribute, and it is in a supported
image type (i.e. it was decoded without fatal errors), even if the
Expand Down
23 changes: 21 additions & 2 deletions source
Expand Up @@ -19135,6 +19135,8 @@ interface <dfn>HTMLImageElement</dfn> : <span>HTMLElement</span> {
attribute boolean <span title="dom-img-isMap">isMap</span>;
attribute unsigned long <span title="dom-img-width">width</span>;
attribute unsigned long <span title="dom-img-height">height</span>;
readonly attribute unsigned long <span title="dom-img-naturalWidth">naturalWidth</span>;
readonly attribute unsigned long <span title="dom-img-naturalHeight">naturalHeight</span>;
readonly attribute boolean <span title="dom-img-complete">complete</span>;
};</pre>
</dd>
Expand Down Expand Up @@ -19509,6 +19511,16 @@ interface <dfn>HTMLImageElement</dfn> : <span>HTMLElement</span> {

</dd>

<dt><var title="">image</var> . <code title="dom-img-naturalWidth">naturalWidth</code></dt>
<dt><var title="">image</var> . <code title="dom-img-naturalHeight">naturalHeight</code></dt>

<dd>

<p>These attributes return the intrinsic dimensions of the image,
or zero if the dimensions are not known.</p>

</dd>

<dt><var title="">image</var> . <code title="dom-img-complete">complete</code></dt>

<dd>
Expand Down Expand Up @@ -19541,13 +19553,20 @@ interface <dfn>HTMLImageElement</dfn> : <span>HTMLElement</span> {
the intrinsic width and height of the image, in CSS pixels, if the
image is <i title="img-available">available</i> but not being
rendered to a visual medium; or else 0, if the image is not <i
title="img-available">available</i> or its dimensions are not
known. <a href="#refsCSS">[CSS]</a></p>
title="img-available">available</i>. <a
href="#refsCSS">[CSS]</a></p>

<p>On setting, they must act as if they <span
title="reflect">reflected</span> the respective content attributes
of the same name.</p>

<p>The IDL attributes <dfn
title="dom-img-naturalWidth"><code>naturalWidth</code></dfn> and
<dfn title="dom-img-nturalHeight"><code>naturalHeight</code></dfn>
must return the intrinsic width and height of the image, in CSS
pixels, if the image is <i title="img-available">available</i>, or
else 0. <a href="#refsCSS">[CSS]</a></p>

<p>The IDL attribute <dfn
title="dom-img-complete"><code>complete</code></dfn> must return
true if the user agent has fetched the image specified in the <code
Expand Down

0 comments on commit 18a32a2

Please sign in to comment.