[html5] r6775 - [giow] (0) Define input.width and input.height. Fixing http://www.w3.org/Bugs/Pu [...]

whatwg at whatwg.org whatwg at whatwg.org
Thu Oct 27 17:07:26 PDT 2011


Author: ianh
Date: 2011-10-27 17:07:24 -0700 (Thu, 27 Oct 2011)
New Revision: 6775

Modified:
   complete.html
   index
   source
Log:
[giow] (0) Define input.width and input.height.
Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=14036

Modified: complete.html
===================================================================
--- complete.html	2011-10-27 20:53:08 UTC (rev 6774)
+++ complete.html	2011-10-28 00:07:24 UTC (rev 6775)
@@ -240,7 +240,7 @@
 
   <header class=head id=head><p><a class=logo href=http://www.whatwg.org/><img alt=WHATWG height=101 src=/images/logo width=101></a></p>
    <hgroup><h1 class=allcaps>HTML</h1>
-    <h2 class="no-num no-toc">Living Standard — Last Updated 27 October 2011</h2>
+    <h2 class="no-num no-toc">Living Standard — Last Updated 28 October 2011</h2>
    </hgroup><dl><dt><strong>Web developer edition:</strong></dt>
     <dd><strong><a href=http://developers.whatwg.org/>http://developers.whatwg.org/</a></strong></dd>
     <dt>Multiple-page version:</dt>
@@ -39401,6 +39401,10 @@
   for <code><a href=#the-video-element>video</a></code> the IDL attributes are <code>unsigned
   long</code>.</p>
 
+  <p class=note>The corresponding IDL attributes for <code title=dom-img-height><a href=#dom-img-height>img</a></code> and <code title=dom-input-height><a href=#dom-input-height>input</a></code> elements are defined in those
+  respective elements' sections, as they are slightly more specific to
+  those elements' other behaviors.</p>
+
   </div>
 
 
@@ -43230,7 +43234,7 @@
            attribute DOMString <a href=#dom-fs-formmethod title=dom-fs-formMethod>formMethod</a>;
            attribute boolean <a href=#dom-fs-formnovalidate title=dom-fs-formNoValidate>formNoValidate</a>;
            attribute DOMString <a href=#dom-fs-formtarget title=dom-fs-formTarget>formTarget</a>;
-           attribute DOMString <a href=#dom-dim-height title=dom-dim-height>height</a>;
+           attribute unsigned long <a href=#dom-input-height title=dom-input-height>height</a>;
            attribute boolean <a href=#dom-input-indeterminate title=dom-input-indeterminate>indeterminate</a>;
   readonly attribute <a href=#htmlelement>HTMLElement</a>? <a href=#dom-input-list title=dom-input-list>list</a>;
            attribute DOMString <a href=#dom-input-max title=dom-input-max>max</a>;
@@ -43250,7 +43254,7 @@
            attribute DOMString <a href=#dom-input-value title=dom-input-value>value</a>;
            attribute <span>Date</span> <a href=#dom-input-valueasdate title=dom-input-valueAsDate>valueAsDate</a>;
            attribute double <a href=#dom-input-valueasnumber title=dom-input-valueAsNumber>valueAsNumber</a>;
-           attribute DOMString <a href=#dom-dim-width title=dom-dim-width>width</a>;
+           attribute unsigned long <a href=#dom-input-width title=dom-input-width>width</a>;
 
   void <a href=#dom-input-stepup title=dom-input-stepUp>stepUp</a>(optional long n);
   void <a href=#dom-input-stepdown title=dom-input-stepDown>stepDown</a>(optional long n);
@@ -44533,6 +44537,19 @@
   attribute must <a href=#reflect>reflect</a> the <code title=attr-input-maxlength><a href=#attr-input-maxlength>maxlength</a></code> content attribute,
   <a href=#limited-to-only-non-negative-numbers>limited to only non-negative numbers</a>.</p>
 
+  <p>The IDL attributes <dfn id=dom-input-width title=dom-input-width><code>width</code></dfn> and <dfn id=dom-input-height title=dom-input-height><code>height</code></dfn> must return the
+  rendered width and height of the image, in CSS pixels, if an image
+  is <a href=#being-rendered>being rendered</a>, and is being rendered to a visual
+  medium; or else the intrinsic width and height of the image, in CSS
+  pixels, if an image is <i title=input-img-available><a href=#input-img-available>available</a></i>
+  but not being rendered to a visual medium; or else 0, if no image is
+  <i title=input-img-available><a href=#input-img-available>available</a></i>. When the
+  <code><a href=#the-input-element>input</a></code> element's <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is not in the <a href=#image-button-state title=attr-input-type-image>Image Button</a> state, then no
+  image is <i title=input-img-available><a href=#input-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 <code title=dom-cva-willValidate><a href=#dom-cva-willvalidate>willValidate</a></code>, <code title=dom-cva-validity><a href=#dom-cva-validity>validity</a></code>, and <code title=dom-cva-validationMessage><a href=#dom-cva-validationmessage>validationMessage</a></code>
   attributes, and the <code title=dom-cva-checkValidatity><a href=#dom-cva-checkvalidatity>checkValidity()</a></code> and <code title=dom-cva-setCustomValidity><a href=#dom-cva-setcustomvalidity>setCustomValidity()</a></code>
   methods, are part of the <a href=#the-constraint-validation-api>constraint validation API</a>. The
@@ -47442,8 +47459,21 @@
   <p>The <code title=attr-fs-formaction><a href=#attr-fs-formaction>formaction</a></code>, <code title=attr-fs-formenctype><a href=#attr-fs-formenctype>formenctype</a></code>, <code title=attr-fs-formmethod><a href=#attr-fs-formmethod>formmethod</a></code>, <code title=attr-fs-formnovalidate><a href=#attr-fs-formnovalidate>formnovalidate</a></code>, and <code title=attr-fs-formtarget><a href=#attr-fs-formtarget>formtarget</a></code> attributes are <a href=#attributes-for-form-submission>attributes
   for form submission</a>.</p>
 
-  <div class=bookkeeping>
+  <dl class=domintro><dt><var title="">image</var> . <code title=dom-input-width><a href=#dom-input-width>width</a></code> [ = <var title="">value</var> ]</dt>
+   <dt><var title="">image</var> . <code title=dom-input-height><a href=#dom-input-height>height</a></code> [ = <var title="">value</var> ]</dt>
 
+   <dd>
+
+    <p>These attributes return the actual rendered dimensions of the
+    image, or zero if the dimensions are not known.</p>
+
+    <p>They can be set, to change the corresponding content
+    attributes.</p>
+
+   </dd>
+
+  </dl><div class=bookkeeping>
+
    <p>The following common <code><a href=#the-input-element>input</a></code> element content
    attributes and IDL attributes apply to the element:
    <code title=attr-input-alt><a href=#attr-input-alt>alt</a></code>,

Modified: index
===================================================================
--- index	2011-10-27 20:53:08 UTC (rev 6774)
+++ index	2011-10-28 00:07:24 UTC (rev 6775)
@@ -240,7 +240,7 @@
 
   <header class=head id=head><p><a class=logo href=http://www.whatwg.org/><img alt=WHATWG height=101 src=/images/logo width=101></a></p>
    <hgroup><h1 class=allcaps>HTML</h1>
-    <h2 class="no-num no-toc">Living Standard — Last Updated 27 October 2011</h2>
+    <h2 class="no-num no-toc">Living Standard — Last Updated 28 October 2011</h2>
    </hgroup><dl><dt><strong>Web developer edition:</strong></dt>
     <dd><strong><a href=http://developers.whatwg.org/>http://developers.whatwg.org/</a></strong></dd>
     <dt>Multiple-page version:</dt>
@@ -39401,6 +39401,10 @@
   for <code><a href=#the-video-element>video</a></code> the IDL attributes are <code>unsigned
   long</code>.</p>
 
+  <p class=note>The corresponding IDL attributes for <code title=dom-img-height><a href=#dom-img-height>img</a></code> and <code title=dom-input-height><a href=#dom-input-height>input</a></code> elements are defined in those
+  respective elements' sections, as they are slightly more specific to
+  those elements' other behaviors.</p>
+
   </div>
 
 
@@ -43230,7 +43234,7 @@
            attribute DOMString <a href=#dom-fs-formmethod title=dom-fs-formMethod>formMethod</a>;
            attribute boolean <a href=#dom-fs-formnovalidate title=dom-fs-formNoValidate>formNoValidate</a>;
            attribute DOMString <a href=#dom-fs-formtarget title=dom-fs-formTarget>formTarget</a>;
-           attribute DOMString <a href=#dom-dim-height title=dom-dim-height>height</a>;
+           attribute unsigned long <a href=#dom-input-height title=dom-input-height>height</a>;
            attribute boolean <a href=#dom-input-indeterminate title=dom-input-indeterminate>indeterminate</a>;
   readonly attribute <a href=#htmlelement>HTMLElement</a>? <a href=#dom-input-list title=dom-input-list>list</a>;
            attribute DOMString <a href=#dom-input-max title=dom-input-max>max</a>;
@@ -43250,7 +43254,7 @@
            attribute DOMString <a href=#dom-input-value title=dom-input-value>value</a>;
            attribute <span>Date</span> <a href=#dom-input-valueasdate title=dom-input-valueAsDate>valueAsDate</a>;
            attribute double <a href=#dom-input-valueasnumber title=dom-input-valueAsNumber>valueAsNumber</a>;
-           attribute DOMString <a href=#dom-dim-width title=dom-dim-width>width</a>;
+           attribute unsigned long <a href=#dom-input-width title=dom-input-width>width</a>;
 
   void <a href=#dom-input-stepup title=dom-input-stepUp>stepUp</a>(optional long n);
   void <a href=#dom-input-stepdown title=dom-input-stepDown>stepDown</a>(optional long n);
@@ -44533,6 +44537,19 @@
   attribute must <a href=#reflect>reflect</a> the <code title=attr-input-maxlength><a href=#attr-input-maxlength>maxlength</a></code> content attribute,
   <a href=#limited-to-only-non-negative-numbers>limited to only non-negative numbers</a>.</p>
 
+  <p>The IDL attributes <dfn id=dom-input-width title=dom-input-width><code>width</code></dfn> and <dfn id=dom-input-height title=dom-input-height><code>height</code></dfn> must return the
+  rendered width and height of the image, in CSS pixels, if an image
+  is <a href=#being-rendered>being rendered</a>, and is being rendered to a visual
+  medium; or else the intrinsic width and height of the image, in CSS
+  pixels, if an image is <i title=input-img-available><a href=#input-img-available>available</a></i>
+  but not being rendered to a visual medium; or else 0, if no image is
+  <i title=input-img-available><a href=#input-img-available>available</a></i>. When the
+  <code><a href=#the-input-element>input</a></code> element's <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is not in the <a href=#image-button-state title=attr-input-type-image>Image Button</a> state, then no
+  image is <i title=input-img-available><a href=#input-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 <code title=dom-cva-willValidate><a href=#dom-cva-willvalidate>willValidate</a></code>, <code title=dom-cva-validity><a href=#dom-cva-validity>validity</a></code>, and <code title=dom-cva-validationMessage><a href=#dom-cva-validationmessage>validationMessage</a></code>
   attributes, and the <code title=dom-cva-checkValidatity><a href=#dom-cva-checkvalidatity>checkValidity()</a></code> and <code title=dom-cva-setCustomValidity><a href=#dom-cva-setcustomvalidity>setCustomValidity()</a></code>
   methods, are part of the <a href=#the-constraint-validation-api>constraint validation API</a>. The
@@ -47442,8 +47459,21 @@
   <p>The <code title=attr-fs-formaction><a href=#attr-fs-formaction>formaction</a></code>, <code title=attr-fs-formenctype><a href=#attr-fs-formenctype>formenctype</a></code>, <code title=attr-fs-formmethod><a href=#attr-fs-formmethod>formmethod</a></code>, <code title=attr-fs-formnovalidate><a href=#attr-fs-formnovalidate>formnovalidate</a></code>, and <code title=attr-fs-formtarget><a href=#attr-fs-formtarget>formtarget</a></code> attributes are <a href=#attributes-for-form-submission>attributes
   for form submission</a>.</p>
 
-  <div class=bookkeeping>
+  <dl class=domintro><dt><var title="">image</var> . <code title=dom-input-width><a href=#dom-input-width>width</a></code> [ = <var title="">value</var> ]</dt>
+   <dt><var title="">image</var> . <code title=dom-input-height><a href=#dom-input-height>height</a></code> [ = <var title="">value</var> ]</dt>
 
+   <dd>
+
+    <p>These attributes return the actual rendered dimensions of the
+    image, or zero if the dimensions are not known.</p>
+
+    <p>They can be set, to change the corresponding content
+    attributes.</p>
+
+   </dd>
+
+  </dl><div class=bookkeeping>
+
    <p>The following common <code><a href=#the-input-element>input</a></code> element content
    attributes and IDL attributes apply to the element:
    <code title=attr-input-alt><a href=#attr-input-alt>alt</a></code>,

Modified: source
===================================================================
--- source	2011-10-27 20:53:08 UTC (rev 6774)
+++ source	2011-10-28 00:07:24 UTC (rev 6775)
@@ -43711,6 +43711,12 @@
   for <code>video</code> the IDL attributes are <code>unsigned
   long</code>.</p>
 
+  <p class="note">The corresponding IDL attributes for <code
+  title="dom-img-height">img</code> and <code
+  title="dom-input-height">input</code> elements are defined in those
+  respective elements' sections, as they are slightly more specific to
+  those elements' other behaviors.</p>
+
   </div>
 
 
@@ -48212,7 +48218,7 @@
            attribute DOMString <span title="dom-fs-formMethod">formMethod</span>;
            attribute boolean <span title="dom-fs-formNoValidate">formNoValidate</span>;
            attribute DOMString <span title="dom-fs-formTarget">formTarget</span>;
-           attribute DOMString <span title="dom-dim-height">height</span>;
+           attribute unsigned long <span title="dom-input-height">height</span>;
            attribute boolean <span title="dom-input-indeterminate">indeterminate</span>;
   readonly attribute <span>HTMLElement</span>? <span title="dom-input-list">list</span>;
            attribute DOMString <span title="dom-input-max">max</span>;
@@ -48232,7 +48238,7 @@
            attribute DOMString <span title="dom-input-value">value</span>;
            attribute <span>Date</span> <span title="dom-input-valueAsDate">valueAsDate</span>;
            attribute double <span title="dom-input-valueAsNumber">valueAsNumber</span>;
-           attribute DOMString <span title="dom-dim-width">width</span>;
+           attribute unsigned long <span title="dom-input-width">width</span>;
 
   void <span title="dom-input-stepUp">stepUp</span>(optional long n);
   void <span title="dom-input-stepDown">stepDown</span>(optional long n);
@@ -49719,6 +49725,25 @@
   title="attr-input-maxlength">maxlength</code> content attribute,
   <span>limited to only non-negative numbers</span>.</p>
 
+  <p>The IDL attributes <dfn
+  title="dom-input-width"><code>width</code></dfn> and <dfn
+  title="dom-input-height"><code>height</code></dfn> must return the
+  rendered width and height of the image, in CSS pixels, if an image
+  is <span>being rendered</span>, and is being rendered to a visual
+  medium; or else the intrinsic width and height of the image, in CSS
+  pixels, if an image is <i title="input-img-available">available</i>
+  but not being rendered to a visual medium; or else 0, if no image is
+  <i title="input-img-available">available</i>. When the
+  <code>input</code> element's <code
+  title="attr-input-type">type</code> attribute is not in the <span
+  title="attr-input-type-image">Image Button</span> state, then no
+  image is <i title="input-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 <code title="dom-cva-willValidate">willValidate</code>, <code
   title="dom-cva-validity">validity</code>, and <code
   title="dom-cva-validationMessage">validationMessage</code>
@@ -53026,6 +53051,23 @@
   title="attr-fs-formtarget">formtarget</code> attributes are <span>attributes
   for form submission</span>.</p>
 
+  <dl class="domintro">
+
+   <dt><var title="">image</var> . <code title="dom-input-width">width</code> [ = <var title="">value</var> ]</dt>
+   <dt><var title="">image</var> . <code title="dom-input-height">height</code> [ = <var title="">value</var> ]</dt>
+
+   <dd>
+
+    <p>These attributes return the actual rendered dimensions of the
+    image, or zero if the dimensions are not known.</p>
+
+    <p>They can be set, to change the corresponding content
+    attributes.</p>
+
+   </dd>
+
+  </dl>
+
   <div class="bookkeeping">
 
    <p>The following common <code>input</code> element content




More information about the Commit-Watchers mailing list