Skip to content

Commit

Permalink
[giow] (0) Define input.width and input.height.
Browse files Browse the repository at this point in the history
Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=14036

git-svn-id: http://svn.whatwg.org/webapps@6775 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Oct 28, 2011
1 parent 591ea67 commit dddea78
Show file tree
Hide file tree
Showing 3 changed files with 112 additions and 10 deletions.
38 changes: 34 additions & 4 deletions complete.html
Expand Up @@ -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 &mdash; Last Updated 27 October 2011</h2>
<h2 class="no-num no-toc">Living Standard &mdash; 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>
Expand Down Expand Up @@ -39401,6 +39401,10 @@ <h4 id=dimension-attributes><span class=secno>4.8.17 </span><dfn>Dimension attri
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>


Expand Down Expand Up @@ -43230,7 +43234,7 @@ <h4 id=the-input-element><span class=secno>4.10.7 </span>The <dfn><code>input</c
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>;
Expand All @@ -43250,7 +43254,7 @@ <h4 id=the-input-element><span class=secno>4.10.7 </span>The <dfn><code>input</c
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);
Expand Down Expand Up @@ -44533,6 +44537,19 @@ <h4 id=the-input-element><span class=secno>4.10.7 </span>The <dfn><code>input</c
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
Expand Down Expand Up @@ -47442,7 +47459,20 @@ <h6 id=image-button-state><span class=secno>4.10.7.1.20 </span><dfn title=attr-i
<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:
Expand Down
38 changes: 34 additions & 4 deletions index
Expand Up @@ -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 &mdash; Last Updated 27 October 2011</h2>
<h2 class="no-num no-toc">Living Standard &mdash; 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>
Expand Down Expand Up @@ -39401,6 +39401,10 @@ function AddCloud(data, x, y) { ... }</pre>
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>


Expand Down Expand Up @@ -43230,7 +43234,7 @@ interface <dfn id=htmlformelement>HTMLFormElement</dfn> : <a href=#htmlelement>H
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>;
Expand All @@ -43250,7 +43254,7 @@ interface <dfn id=htmlformelement>HTMLFormElement</dfn> : <a href=#htmlelement>H
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);
Expand Down Expand Up @@ -44533,6 +44537,19 @@ interface <dfn id=htmlformelement>HTMLFormElement</dfn> : <a href=#htmlelement>H
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
Expand Down Expand Up @@ -47442,7 +47459,20 @@ interface <dfn id=htmlformelement>HTMLFormElement</dfn> : <a href=#htmlelement>H
<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:
Expand Down
46 changes: 44 additions & 2 deletions source
Expand Up @@ -43711,6 +43711,12 @@ function AddCloud(data, x, y) { ... }</pre>
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>


Expand Down Expand Up @@ -48212,7 +48218,7 @@ interface <dfn>HTMLFormElement</dfn> : <span>HTMLElement</span> {
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>;
Expand All @@ -48232,7 +48238,7 @@ interface <dfn>HTMLFormElement</dfn> : <span>HTMLElement</span> {
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);
Expand Down Expand Up @@ -49719,6 +49725,25 @@ interface <dfn>HTMLFormElement</dfn> : <span>HTMLElement</span> {
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>
Expand Down Expand Up @@ -53026,6 +53051,23 @@ interface <dfn>HTMLFormElement</dfn> : <span>HTMLElement</span> {
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
Expand Down

0 comments on commit dddea78

Please sign in to comment.