[html5] r3766 - [gw] (2) Add .naturalWidth/.naturalHeight IDL attributes to <img>.
whatwg at whatwg.org
whatwg at whatwg.org
Mon Sep 7 04:02:29 PDT 2009
Author: ianh
Date: 2009-09-07 04:02:28 -0700 (Mon, 07 Sep 2009)
New Revision: 3766
Modified:
index
source
Log:
[gw] (2) Add .naturalWidth/.naturalHeight IDL attributes to <img>.
Modified: index
===================================================================
--- index 2009-09-07 10:33:40 UTC (rev 3765)
+++ index 2009-09-07 11:02:28 UTC (rev 3766)
@@ -17813,6 +17813,8 @@
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>
@@ -18135,6 +18137,16 @@
</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>
@@ -18160,12 +18172,17 @@
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
Modified: source
===================================================================
--- source 2009-09-07 10:33:40 UTC (rev 3765)
+++ source 2009-09-07 11:02:28 UTC (rev 3766)
@@ -19135,6 +19135,8 @@
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>
@@ -19509,6 +19511,16 @@
</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>
@@ -19541,13 +19553,20 @@
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
More information about the Commit-Watchers
mailing list