W3C home > Mailing lists > Public > public-html-diffs@w3.org > October 2011

hixie: Define input.width and input.height. (whatwg r6775)

From: poot <cvsmail@w3.org>
Date: Thu, 27 Oct 2011 20:12:01 -0400
To: public-html-diffs@w3.org
Message-Id: <E1RJa3F-0001Cn-3p@jay.w3.org>
hixie: Define input.width and input.height. (whatwg r6775)

http://dev.w3.org/cvsweb/html5/spec/Overview.html?r1=1.5423&r2=1.5424&f=h
http://html5.org/tools/web-apps-tracker?from=6774&to=6775

===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.5423
retrieving revision 1.5424
diff -u -d -r1.5423 -r1.5424
--- Overview.html	27 Oct 2011 20:57:21 -0000	1.5423
+++ Overview.html	28 Oct 2011 00:11:36 -0000	1.5424
@@ -320,7 +320,7 @@
 
    <h1>HTML5</h1>
    <h2 class="no-num no-toc" id="a-vocabulary-and-associated-apis-for-html-and-xhtml">A vocabulary and associated APIs for HTML and XHTML</h2>
-   <h2 class="no-num no-toc" id="editor-s-draft-27-october-2011">Editor's Draft 27 October 2011</h2>
+   <h2 class="no-num no-toc" id="editor-s-draft-28-october-2011">Editor's Draft 28 October 2011</h2>
    <dl><dt>Latest Published Version:</dt>
     <dd><a href="http://www.w3.org/TR/html5/">http://www.w3.org/TR/html5/</a></dd>
     <dt>Latest Editor's Draft:</dt>
@@ -466,7 +466,7 @@
   Group</a> is the W3C working group responsible for this
   specification's progress along the W3C Recommendation
   track.
-  This specification is the 27 October 2011 Editor's Draft.
+  This specification is the 28 October 2011 Editor's Draft.
   </p><!-- UNDER NO CIRCUMSTANCES IS THE PRECEDING PARAGRAPH TO BE REMOVED OR EDITED WITHOUT TALKING TO IAN FIRST --><p>Work on this specification is also done at the <a href="http://www.whatwg.org/">WHATWG</a>. The W3C HTML working group
   actively pursues convergence with the WHATWG, as required by the <a href="http://www.w3.org/2007/03/HTML-WG-charter">W3C HTML working
   group charter</a>.</p><!-- UNDER NO CIRCUMSTANCES IS THE FOLLOWING PARAGRAPH TO BE REMOVED OR EDITED WITHOUT TALKING TO IAN FIRST --><p>This document was produced by a group operating under the <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/">5
@@ -28949,6 +28949,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><h3 id="tabular-data"><span class="secno">4.9 </span>Tabular data</h3><h4 id="the-table-element"><span class="secno">4.9.1 </span>The <dfn><code>table</code></dfn> element</h4><dl class="element"><dt>Categories</dt>
    <dd><a href="#flow-content">Flow content</a>.</dd>
    <dd><a href="#palpable-content">Palpable content</a>.</dd>
@@ -32272,7 +32276,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>;
@@ -32292,7 +32296,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);
@@ -33275,6 +33279,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
@@ -35734,7 +35751,20 @@
   pixels.</p>
 
   <hr></div><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>.<div class="bookkeeping">
+  for form submission</a>.<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:
Received on Friday, 28 October 2011 00:12:09 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 28 October 2011 00:12:10 GMT