hixie: Add .naturalWidth/.naturalHeight IDL attributes to <img>. (whatwg r3766)

hixie: Add .naturalWidth/.naturalHeight IDL attributes to <img>. (whatwg
r3766)

http://dev.w3.org/cvsweb/html5/spec/Overview.html?r1=1.2935&r2=1.2936&f=h
http://html5.org/tools/web-apps-tracker?from=3765&to=3766

===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.2935
retrieving revision 1.2936
diff -u -d -r1.2935 -r1.2936
--- Overview.html 7 Sep 2009 10:29:48 -0000 1.2935
+++ Overview.html 7 Sep 2009 10:58:35 -0000 1.2936
@@ -15494,6 +15494,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>
@@ -15790,6 +15792,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>
@@ -15815,12 +15827,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

Received on Monday, 7 September 2009 10:59:38 UTC