[html5] r1096 - /

whatwg at whatwg.org whatwg at whatwg.org
Thu Oct 25 16:40:10 PDT 2007


Author: ianh
Date: 2007-10-25 16:40:08 -0700 (Thu, 25 Oct 2007)
New Revision: 1096

Modified:
   index
   source
Log:
[c] (0) Revamp height/width for embedded content elements (img, embed, object, video).

Modified: index
===================================================================
--- index	2007-10-24 23:36:05 UTC (rev 1095)
+++ index	2007-10-25 23:40:08 UTC (rev 1096)
@@ -22,7 +22,7 @@
 
    <h1 id=html-5>HTML 5</h1>
 
-   <h2 class="no-num no-toc" id=working>Working Draft — 24 October 2007</h2>
+   <h2 class="no-num no-toc" id=working>Working Draft — 25 October 2007</h2>
 
    <p>You can take part in this work. <a
     href="http://www.whatwg.org/mailing-list">Join the working group's
@@ -706,6 +706,9 @@
 
        <li><a href="#image-maps"><span class=secno>3.14.14. </span>Image
         maps</a>
+
+       <li><a href="#dimension"><span class=secno>3.14.15. </span>Dimension
+        attributes</a>
       </ul>
 
      <li><a href="#tabular"><span class=secno>3.15. </span>Tabular data</a>
@@ -12179,9 +12182,9 @@
     if one of the ancestor elements is an <code><a href="#a">a</a></code>
     element)
 
-   <dd><code title=attr-img-height><a href="#height">height</a></code>
+   <dd><code title=attr-dim-width><a href="#width3">width</a></code>
 
-   <dd><code title=attr-img-width><a href="#width">width</a></code>
+   <dd><code title=attr-dim-height><a href="#height3">height</a></code>
 
    <dt>DOM interface:
 
@@ -12192,8 +12195,8 @@
            attribute DOMString <a href="#src0" title=dom-img-src>src</a>;
            attribute DOMString <a href="#usemap" title=dom-img-useMap>useMap</a>;
            attribute boolean <a href="#ismap0" title=dom-img-isMap>isMap</a>;
-           attribute long <a href="#height0" title=dom-img-height>height</a>;
-           attribute long <a href="#width0" title=dom-img-width>width</a>;
+           attribute long <a href="#width" title=dom-img-width>width</a>;
+           attribute long <a href="#height" title=dom-img-height>height</a>;
   readonly attribute boolean <a href="#complete" title=dom-img-complete>complete</a>;
 };</pre>
 
@@ -12662,30 +12665,9 @@
    must not be specified on an element that does not have an ancestor
    <code><a href="#a">a</a></code> element.
 
-  <p>The <dfn id=height title=attr-img-height><code>height</code></dfn> and
-   <dfn id=width title=attr-img-width><code>width</code></dfn> attributes
-   give the dimensions of the image (the height and width respectively,
-   relative to the nominal direction of the output medium), in CSS pixels.
-   The attributes, if specified, must have values that are <a
-   href="#valid3">valid positive non-zero integers</a>.
+  <p>The <code><a href="#img">img</a></code> element supports <a
+   href="#dimension0">dimension attributes</a>.
 
-  <p>The specified dimensions given may differ from the dimensions specified
-   in the image file itself, since the image file may have a resolution that
-   differs from the CSS pixel resolution. (On screens, CSS pixels have a
-   resolution of 96ppi, but in general the CSS pixel resolution depends on
-   the reading distance.) If both attributes are specified, then the ratio of
-   the specified width to the specified height must be the same as the ratio
-   of the logical width to the logical height in the image file.
-
-  <p>To parse the attributes, user agents must use the <a
-   href="#rules2">rules for parsing dimension values</a>. This will return
-   either an integer length, a percentage value, or nothing. The user agent
-   requirements for processing the values obtained from parsing these
-   attributes are described <a href="#sizing" title="sizing of embedded
-   content">in the rendering section</a><!-- XXX xref -->. If one of these
-   attributes, when parsing, returns no value, it must be treated, for the
-   purposes of those requirements, as if it was not specified.
-
   <p>The <code><a href="#img">img</a></code> element must be empty.</p>
   <!-- contents
   should be ignored for rendering but not for semantics,
@@ -12699,8 +12681,8 @@
    href="#reflect">reflect</a> the respective content attributes of the same
    name.
 
-  <p>The DOM attributes <dfn id=height0
-   title=dom-img-height><code>height</code></dfn> and <dfn id=width0
+  <p>The DOM attributes <dfn id=height
+   title=dom-img-height><code>height</code></dfn> and <dfn id=width
    title=dom-img-width><code>width</code></dfn> must return the rendered
    height and width of the image, in CSS pixels, if the image is being
    rendered, and is being rendered to a visual medium, or 0 otherwise. <a
@@ -12845,9 +12827,9 @@
 
    <dd><code title=attr-embed-type><a href="#type4">type</a></code>
 
-   <dd><code title=attr-embed-height>height</code>
+   <dd><code title=attr-dim-width><a href="#width3">width</a></code>
 
-   <dd><code title=attr-embed-width>width</code>
+   <dd><code title=attr-dim-height><a href="#height3">height</a></code>
 
    <dd>Any other attribute that has no namespace (see prose).
 
@@ -12858,8 +12840,8 @@
      class=idl>interface <dfn id=htmlembedelement>HTMLEmbedElement</dfn> : <a href="#htmlelement">HTMLElement</a> {
            attribute DOMString <a href="#src4" title=dom-embed-src>src</a>;
            attribute DOMString <a href="#type5" title=dom-embed-type>type</a>;
-           attribute long <a href="#height1" title=dom-embed-height>height</a>;
-           attribute long <a href="#width1" title=dom-embed-width>width</a>;
+           attribute long <a href="#width4" title=dom-dim-width>width</a>;
+           attribute long <a href="#height4" title=dom-dim-height>height</a>;
 };</pre>
 
     <p>Depending on the type of content instantiated by the <code><a
@@ -12944,7 +12926,8 @@
    the same privileges as the user agent itself, vulnerabilities in the
    third-party software become as dangerous as those in the user agent.
 
-  <p class=big-issue>height/width
+  <p>The <code><a href="#embed">embed</a></code> element supports <a
+   href="#dimension0">dimension attributes</a>.
 
   <p>The DOM attributes <dfn id=src4
    title=dom-embed-src><code>src</code></dfn> and <dfn id=type5
@@ -12952,13 +12935,6 @@
    href="#reflect">reflect</a> the respective content attributes of the same
    name.
 
-  <p>The DOM attributes <dfn id=height1
-   title=dom-embed-height><code>height</code></dfn> and <dfn id=width1
-   title=dom-embed-width><code>width</code></dfn> must return the rendered
-   height and width of the image, in CSS pixels, if the image is being
-   rendered, and is being rendered to a visual medium, or 0 otherwise. <a
-   href="#refsCSS21">[CSS21]</a>
-
   <h4 id=the-object><span class=secno>3.14.5. </span>The <dfn
    id=object><code>object</code></dfn> element</h4>
 
@@ -13000,9 +12976,9 @@
 
    <dd><code title=attr-hyperlink-usemap><a href="#usemap1">usemap</a></code>
 
-   <dd><code title=attr-object-height>height</code>
+   <dd><code title=attr-dim-width><a href="#width3">width</a></code>
 
-   <dd><code title=attr-object-width>width</code>
+   <dd><code title=attr-dim-height><a href="#height3">height</a></code>
 
    <dt>DOM interface:
 
@@ -13012,8 +12988,8 @@
            attribute DOMString <a href="#data0" title=dom-object-data>data</a>;
            attribute DOMString <a href="#type7" title=dom-object-type>type</a>;
            attribute DOMString <a href="#usemap0" title=dom-object-useMap>useMap</a>;
-           attribute long <a href="#height2" title=dom-object-height>height</a>;
-           attribute long <a href="#width2" title=dom-object-width>width</a>;<!--
+           attribute long <a href="#width4" title=dom-dim-width>width</a>;
+           attribute long <a href="#height4" title=dom-dim-height>height</a>;<!--
   readonly attribute Document <span title="dom-object-contentDocument">contentDocument</span>;
   readonly attribute <span>Window</span> <span title="dom-object-contentWindow">contentWindow</span>;-->
 };</pre>
@@ -13237,14 +13213,13 @@
    attribute must be ignored if the <code><a href="#object">object</a></code>
    element doesn't represent an image.
 
-  <p class=big-issue>height/width
+  <p>The <code><a href="#object">object</a></code> element supports <a
+   href="#dimension0">dimension attributes</a>.
 
   <p>The DOM attributes <dfn id=data0
    title=dom-object-data><code>data</code></dfn>, <dfn id=type7
-   title=dom-object-type><code>type</code></dfn>, <dfn id=usemap0
-   title=dom-object-useMap><code>useMap</code></dfn>, <dfn id=height2
-   title=dom-object-height><code>height</code></dfn>, and <dfn id=width2
-   title=dom-object-width><code>width</code></dfn> each must <a
+   title=dom-object-type><code>type</code></dfn>, and <dfn id=usemap0
+   title=dom-object-useMap><code>useMap</code></dfn> each must <a
    href="#reflect">reflect</a> the respective content attributes of the same
    name.
 
@@ -13354,11 +13329,17 @@
    <dd><code title=attr-media-controls><a
     href="#controls">controls</a></code>
 
+   <dd><code title=attr-dim-width><a href="#width3">width</a></code>
+
+   <dd><code title=attr-dim-height><a href="#height3">height</a></code>
+
    <dt>DOM interface:
 
    <dd>
     <pre
      class=idl>interface <dfn id=htmlvideoelement>HTMLVideoElement</dfn> : <a href="#htmlmediaelement">HTMLMediaElement</a> {
+           attribute long <a href="#width4" title=dom-dim-width>width</a>;
+           attribute long <a href="#height4" title=dom-dim-height>height</a>;
   readonly attribute unsigned long <a href="#videowidth" title=dom-video-videoWidth>videoWidth</a>;
   readonly attribute unsigned long <a href="#videoheight" title=dom-video-videoHeight>videoHeight</a>;
 };</pre>
@@ -13396,6 +13377,9 @@
    attributes are <a href="#media6" title="media element attributes">the
    attributes common to all media elements</a>.
 
+  <p>The <code><a href="#video1">video</a></code> element supports <a
+   href="#dimension0">dimension attributes</a>.
+
   <p>The <dfn id=videowidth
    title=dom-video-videoWidth><code>videoWidth</code></dfn> DOM attribute
    must return the native width of the video in CSS pixels. The <dfn
@@ -15826,17 +15810,17 @@
 
    <dt>Element-specific attributes:
 
-   <dd><code title=attr-canvas-height><a href="#height3">height</a></code>
+   <dd><code title=attr-canvas-width><a href="#width0">width</a></code>
 
-   <dd><code title=attr-canvas-width><a href="#width3">width</a></code>
+   <dd><code title=attr-canvas-height><a href="#height0">height</a></code>
 
    <dt>DOM interface:
 
    <dd>
     <pre
      class=idl>interface <dfn id=htmlcanvaselement>HTMLCanvasElement</dfn> : <a href="#htmlelement">HTMLElement</a> {
-         attribute unsigned long <a href="#width4" title=dom-canvas-width>width</a>;
-         attribute unsigned long <a href="#height4" title=dom-canvas-height>height</a>;
+         attribute unsigned long <a href="#width1" title=dom-canvas-width>width</a>;
+         attribute unsigned long <a href="#height1" title=dom-canvas-height>height</a>;
 
   DOMString <a href="#todataurl" title=dom-canvas-toDataURL>toDataURL</a>();
   DOMString <a href="#todataurl0" title=dom-canvas-toDataURL-type>toDataURL</a>(in DOMString type);
@@ -15886,17 +15870,17 @@
    fallback content must be used instead.
 
   <p>The <code><a href="#canvas">canvas</a></code> element has two attributes
-   to control the size of the coordinate space: <dfn id=height3
-   title=attr-canvas-height><code>height</code></dfn> and <dfn id=width3
-   title=attr-canvas-width><code>width</code></dfn>. These attributes, when
+   to control the size of the coordinate space: <dfn id=width0
+   title=attr-canvas-width><code>width</code></dfn> and <dfn id=height0
+   title=attr-canvas-height><code>height</code></dfn>. These attributes, when
    specified, must have values that are <a href="#valid" title="valid
    non-negative integer">valid non-negative integers</a>. The <a
    href="#rules">rules for parsing non-negative integers</a> must be used to
    obtain their numeric values. If an attribute is missing, or if parsing its
    value returns an error, then the default value must be used instead. The
-   <code title=attr-canvas-width><a href="#width3">width</a></code> attribute
+   <code title=attr-canvas-width><a href="#width0">width</a></code> attribute
    defaults to 300, and the <code title=attr-canvas-height><a
-   href="#height3">height</a></code> attribute defaults to 150.
+   href="#height0">height</a></code> attribute defaults to 150.
 
   <p>The intrinsic dimensions of the <code><a
    href="#canvas">canvas</a></code> element equal the size of the coordinate
@@ -15913,14 +15897,14 @@
   <p>The canvas must initially be fully transparent black.
 
   <p>Whenever the <code title=attr-canvas-width><a
-   href="#width3">width</a></code> and <code title=attr-canvas-height><a
-   href="#height3">height</a></code> attributes are set (whether to a new
+   href="#width0">width</a></code> and <code title=attr-canvas-height><a
+   href="#height0">height</a></code> attributes are set (whether to a new
    value or to the previous value), the bitmap and any associated contexts
    must be cleared back to their initial state and reinitialised with the
    newly specified coordinate space dimensions.
 
-  <p>The <dfn id=width4 title=dom-canvas-width><code>width</code></dfn> and
-   <dfn id=height4 title=dom-canvas-height><code>height</code></dfn> DOM
+  <p>The <dfn id=width1 title=dom-canvas-width><code>width</code></dfn> and
+   <dfn id=height1 title=dom-canvas-height><code>height</code></dfn> DOM
    attributes must <a href="#reflect">reflect</a> the content attributes of
    the same name.
 
@@ -16128,8 +16112,8 @@
 };
 
 interface <dfn id=imagedata>ImageData</dfn> {
-  readonly attribute long int <a href="#width5" title=dom-imagedata-width>width</a>;
-  readonly attribute long int <a href="#height5" title=dom-imagedata-height>height</a>;
+  readonly attribute long int <a href="#width2" title=dom-imagedata-width>width</a>;
+  readonly attribute long int <a href="#height2" title=dom-imagedata-height>height</a>;
   readonly attribute int[] <a href="#data1" title=dom-imagedata-data>data</a>;
 };</pre>
 
@@ -17149,10 +17133,10 @@
    values.
 
   <p><code><a href="#imagedata">ImageData</a></code> objects must be
-   initialised so that their <dfn id=height5
+   initialised so that their <dfn id=height2
    title=dom-imagedata-height><code>height</code></dfn> attribute is set to
    <var title="">h</var>, the number of rows in the image data, their <dfn
-   id=width5 title=dom-imagedata-width><code>width</code></dfn> attribute is
+   id=width2 title=dom-imagedata-width><code>width</code></dfn> attribute is
    set to <var title="">w</var>, the number of physical device pixels per row
    in the image data, and the <dfn id=data1
    title=dom-imagedata-data><code>data</code></dfn> attribute is initialised
@@ -17194,23 +17178,23 @@
 
   <ul>
    <li>The method's first argument is an object with <code
-    title=dom-imagedata-width><a href="#width5">width</a></code> and <code
-    title=dom-imagedata-height><a href="#height5">height</a></code>
+    title=dom-imagedata-width><a href="#width2">width</a></code> and <code
+    title=dom-imagedata-height><a href="#height2">height</a></code>
     attributes with integer values and a <code title=dom-imagedata-data><a
     href="#data1">data</a></code> attribute whose value is an integer array.
 
    <li>The <code><a href="#imagedata">ImageData</a></code> object's <code
-    title=dom-imagedata-width><a href="#width5">width</a></code> is greater
+    title=dom-imagedata-width><a href="#width2">width</a></code> is greater
     than zero.
 
    <li>The <code><a href="#imagedata">ImageData</a></code> object's <code
-    title=dom-imagedata-height><a href="#height5">height</a></code> is
+    title=dom-imagedata-height><a href="#height2">height</a></code> is
     greater than zero.
 
    <li>The <code><a href="#imagedata">ImageData</a></code> object's <code
-    title=dom-imagedata-width><a href="#width5">width</a></code> multiplied
+    title=dom-imagedata-width><a href="#width2">width</a></code> multiplied
     by its <code title=dom-imagedata-height><a
-    href="#height5">height</a></code> multiplied by 4 is equal to the number
+    href="#height2">height</a></code> multiplied by 4 is equal to the number
     of entries in the <code><a href="#imagedata">ImageData</a></code>
     object's <code title=dom-imagedata-data><a href="#data1">data</a></code>
     array.
@@ -17925,6 +17909,45 @@
    then the user agent must act as if it had rerun the algorithms for image
    maps.
 
+  <h4 id=dimension><span class=secno>3.14.15. </span><dfn
+   id=dimension0>Dimension attributes</dfn></h4>
+
+  <p>The <dfn id=width3 title=attr-dim-width><code>width</code></dfn> and
+   <dfn id=height3 title=attr-dim-height><code>height</code></dfn> attributes
+   on <code><a href="#img">img</a></code>, <code><a
+   href="#embed">embed</a></code>, <code><a href="#object">object</a></code>,
+   and <code><a href="#video1">video</a></code> elements may be specified to
+   give the dimensions of the visual content of the element (the width and
+   height respectively, relative to the nominal direction of the output
+   medium), in CSS pixels. The attributes, if specified, must have values
+   that are <a href="#valid3">valid positive non-zero integers</a>.
+
+  <p>The specified dimensions given may differ from the dimensions specified
+   in the resource itself, since the resource may have a resolution that
+   differs from the CSS pixel resolution. (On screens, CSS pixels have a
+   resolution of 96ppi, but in general the CSS pixel resolution depends on
+   the reading distance.) If both attributes are specified, then the ratio of
+   the specified width to the specified height must be the same as the ratio
+   of the logical width to the logical height in the resource. The two
+   attributes must be omitted if the resource in question does not have both
+   a logical width and a logical height.
+
+  <p>To parse the attributes, user agents must use the <a
+   href="#rules2">rules for parsing dimension values</a>. This will return
+   either an integer length, a percentage value, or nothing. The user agent
+   requirements for processing the values obtained from parsing these
+   attributes are described <a href="#sizing" title="sizing of embedded
+   content">in the rendering section</a><!-- XXX xref -->. If one of these
+   attributes, when parsing, returns no value, it must be treated, for the
+   purposes of those requirements, as if it was not specified.
+
+  <p>The <dfn id=width4 title=dom-dim-width><code>width</code></dfn> and <dfn
+   id=height4 title=dom-dim-height><code>height</code></dfn> DOM attributes
+   on the <code><a href="#embed">embed</a></code>, <code><a
+   href="#object">object</a></code>, and <code><a
+   href="#video1">video</a></code> elements must reflect the content
+   attributes of the same name.
+
   <h3 id=tabular><span class=secno>3.15. </span>Tabular data</h3>
 
   <h4 id=the-table><span class=secno>3.15.1. </span>The <dfn
@@ -24844,11 +24867,10 @@
      href="#htmlimageelement">HTMLImageElement</a></code> object (a new
      <code><a href="#img">img</a></code> element). If the <var
      title="">h</var> argument is present, the new object's <code
-     title=attr-img-height><a href="#height">height</a></code> content
-     attribute must be set to <var title="">h</var>. If the <var
-     title="">w</var> argument is present, the new object's <code
-     title=attr-img-width><a href="#width">width</a></code> content attribute
-     must be set to <var title="">w</var>.
+     title=attr-img-height>height</code> content attribute must be set to
+     <var title="">h</var>. If the <var title="">w</var> argument is present,
+     the new object's <code title=attr-img-width>width</code> content
+     attribute must be set to <var title="">w</var>.
 
    <dt><dfn id=option title=dom-option><code>Option()</code></dfn>
 

Modified: source
===================================================================
--- source	2007-10-24 23:36:05 UTC (rev 1095)
+++ source	2007-10-25 23:40:08 UTC (rev 1096)
@@ -10073,8 +10073,8 @@
    <dd><code title="attr-img-src">src</code> (required)</dd>
    <dd><code title="attr-hyperlink-usemap">usemap</code></dd>
    <dd><code title="attr-img-ismap">ismap</code> (but only if one of the ancestor elements is an <code>a</code> element)</dd>
-   <dd><code title="attr-img-height">height</code></dd>
-   <dd><code title="attr-img-width">width</code></dd>
+   <dd><code title="attr-dim-width">width</code></dd>
+   <dd><code title="attr-dim-height">height</code></dd>
    <dt>DOM interface:</dt>
    <dd>
 <pre class="idl">interface <dfn>HTMLImageElement</dfn> : <span>HTMLElement</span> {
@@ -10082,8 +10082,8 @@
            attribute DOMString <span title="dom-img-src">src</span>;
            attribute DOMString <span title="dom-img-useMap">useMap</span>;
            attribute boolean <span title="dom-img-isMap">isMap</span>;
+           attribute long <span title="dom-img-width">width</span>;
            attribute long <span title="dom-img-height">height</span>;
-           attribute long <span title="dom-img-width">width</span>;
   readonly attribute boolean <span title="dom-img-complete">complete</span>;
 };</pre>
     <p class="note">An instance of <code>HTMLImageElement</code> can
@@ -10608,32 +10608,9 @@
   on an element that does not have an ancestor <code>a</code>
   element.</p>
 
+  <p>The <code>img</code> element supports <span>dimension
+  attributes</span>.</p>
 
-  <p>The <dfn title="attr-img-height"><code>height</code></dfn> and
-  <dfn title="attr-img-width"><code>width</code></dfn> attributes give
-  the dimensions of the image (the height and width respectively,
-  relative to the nominal direction of the output medium), in CSS
-  pixels. The attributes, if specified, must have values that are
-  <span>valid positive non-zero integers</span>.</p>
-
-  <p>The specified dimensions given may differ from the dimensions
-  specified in the image file itself, since the image file may have a
-  resolution that differs from the CSS pixel resolution. (On screens,
-  CSS pixels have a resolution of 96ppi, but in general the CSS pixel
-  resolution depends on the reading distance.) If both attributes are
-  specified, then the ratio of the specified width to the specified
-  height must be the same as the ratio of the logical width to the
-  logical height in the image file.</p>
-
-  <p>To parse the attributes, user agents must use the <span>rules for
-  parsing dimension values</span>. This will return either an integer
-  length, a percentage value, or nothing. The user agent requirements
-  for processing the values obtained from parsing these attributes are
-  described <span title="sizing of embedded content">in the rendering
-  section</span><!-- XXX xref -->. If one of these attributes, when
-  parsing, returns no value, it must be treated, for the purposes of
-  those requirements, as if it was not specified.</p>
-
   <p>The <code>img</code> element must be empty.</p><!-- contents
   should be ignored for rendering but not for semantics,
   e.g. <script>, <input>, etc. -->
@@ -10765,16 +10742,16 @@
    <dt>Element-specific attributes:</dt>
    <dd><code title="attr-embed-src">src</code> (required)</dd>
    <dd><code title="attr-embed-type">type</code></dd>
-   <dd><code title="attr-embed-height">height</code></dd>
-   <dd><code title="attr-embed-width">width</code></dd>
+   <dd><code title="attr-dim-width">width</code></dd>
+   <dd><code title="attr-dim-height">height</code></dd>
    <dd>Any other attribute that has no namespace (see prose).</dd>
    <dt>DOM interface:</dt>
    <dd>
 <pre class="idl">interface <dfn>HTMLEmbedElement</dfn> : <span>HTMLElement</span> {
            attribute DOMString <span title="dom-embed-src">src</span>;
            attribute DOMString <span title="dom-embed-type">type</span>;
-           attribute long <span title="dom-embed-height">height</span>;
-           attribute long <span title="dom-embed-width">width</span>;
+           attribute long <span title="dom-dim-width">width</span>;
+           attribute long <span title="dom-dim-height">height</span>;
 };</pre>
     <p>Depending on the type of content instantiated by the
     <code>embed</code> element, the node may also support other
@@ -10864,7 +10841,8 @@
   vulnerabilities in the third-party software become as dangerous as
   those in the user agent.</p>
 
-  <p class="big-issue">height/width</p>
+  <p>The <code>embed</code> element supports <span>dimension
+  attributes</span>.</p>
 
   <p>The DOM attributes <dfn
   title="dom-embed-src"><code>src</code></dfn> and <dfn
@@ -10872,14 +10850,7 @@
   <span>reflect</span> the respective content attributes of the same
   name.</p>
 
-  <p>The DOM attributes <dfn
-  title="dom-embed-height"><code>height</code></dfn> and <dfn
-  title="dom-embed-width"><code>width</code></dfn> must return the
-  rendered height and width of the image, in CSS pixels, if the image
-  is being rendered, and is being rendered to a visual medium, or 0
-  otherwise. <a href="#refsCSS21">[CSS21]</a></p>
 
-
   <h4>The <dfn><code>object</code></dfn> element</h4>
 
   <p><span title="Strictly inline-level content">Strictly inline-level</span> <span>embedded content</span>.</p>
@@ -10902,16 +10873,16 @@
    <dd><code title="attr-object-data">data</code> (required if <code title="attr-object-type">type</code> is not given)</dd>
    <dd><code title="attr-object-type">type</code> (required if <code title="attr-object-data">data</code> is not given)</dd>
    <dd><code title="attr-hyperlink-usemap">usemap</code></dd>
-   <dd><code title="attr-object-height">height</code></dd>
-   <dd><code title="attr-object-width">width</code></dd>
+   <dd><code title="attr-dim-width">width</code></dd>
+   <dd><code title="attr-dim-height">height</code></dd>
    <dt>DOM interface:</dt>
    <dd>
 <pre class="idl">interface <dfn>HTMLObjectElement</dfn> : <span>HTMLElement</span> {
            attribute DOMString <span title="dom-object-data">data</span>;
            attribute DOMString <span title="dom-object-type">type</span>;
            attribute DOMString <span title="dom-object-useMap">useMap</span>;
-           attribute long <span title="dom-object-height">height</span>;
-           attribute long <span title="dom-object-width">width</span>;<!--
+           attribute long <span title="dom-dim-width">width</span>;
+           attribute long <span title="dom-dim-height">height</span>;<!--
   readonly attribute Document <span title="dom-object-contentDocument">contentDocument</span>;
   readonly attribute <span>Window</span> <span title="dom-object-contentWindow">contentWindow</span>;-->
 };</pre>
@@ -11154,14 +11125,13 @@
   map</span>. The attribute must be ignored if the <code>object</code>
   element doesn't represent an image.</p>
 
-  <p class="big-issue">height/width</p>
+  <p>The <code>object</code> element supports <span>dimension
+  attributes</span>.</p>
 
   <p>The DOM attributes <dfn
   title="dom-object-data"><code>data</code></dfn>, <dfn
-  title="dom-object-type"><code>type</code></dfn>, <dfn
-  title="dom-object-useMap"><code>useMap</code></dfn>, <dfn
-  title="dom-object-height"><code>height</code></dfn>, and <dfn
-  title="dom-object-width"><code>width</code></dfn> each must
+  title="dom-object-type"><code>type</code></dfn>, and <dfn
+  title="dom-object-useMap"><code>useMap</code></dfn> each must
   <span>reflect</span> the respective content attributes of the same
   name.</p>
 
@@ -11237,9 +11207,13 @@
    <dd><code title="attr-media-end">end</code></dd>
    <dd><code title="attr-media-loopcount">loopcount</code></dd>
    <dd><code title="attr-media-controls">controls</code></dd>
+   <dd><code title="attr-dim-width">width</code></dd>
+   <dd><code title="attr-dim-height">height</code></dd>
    <dt>DOM interface:</dt>
    <dd>
     <pre class="idl">interface <dfn>HTMLVideoElement</dfn> : <span>HTMLMediaElement</span> {
+           attribute long <span title="dom-dim-width">width</span>;
+           attribute long <span title="dom-dim-height">height</span>;
   readonly attribute unsigned long <span title="dom-video-videoWidth">videoWidth</span>;
   readonly attribute unsigned long <span title="dom-video-videoHeight">videoHeight</span>;
 };</pre>
@@ -11277,6 +11251,9 @@
   title="media element attributes">the attributes common to all media
   elements</span>.</p>
 
+  <p>The <code>video</code> element supports <span>dimension
+  attributes</span>.</p>
+
   <p>The <dfn
   title="dom-video-videoWidth"><code>videoWidth</code></dfn> DOM
   attribute must return the native width of the video in CSS
@@ -13431,8 +13408,8 @@
    <dt>Content model:</dt>
    <dd><span>Inline-level content</span>.</dd>
    <dt>Element-specific attributes:</dt>
+   <dd><code title="attr-canvas-width">width</code></dd>
    <dd><code title="attr-canvas-height">height</code></dd>
-   <dd><code title="attr-canvas-width">width</code></dd>
    <dt>DOM interface:</dt>
    <dd>
     <pre class="idl">interface <dfn>HTMLCanvasElement</dfn> : <span>HTMLElement</span> {
@@ -13489,8 +13466,8 @@
 
   <p>The <code>canvas</code> element has two attributes to control the
   size of the coordinate space: <dfn
-  title="attr-canvas-height"><code>height</code></dfn> and <dfn
-  title="attr-canvas-width"><code>width</code></dfn>. These
+  title="attr-canvas-width"><code>width</code></dfn> and <dfn
+  title="attr-canvas-height"><code>height</code></dfn>. These
   attributes, when specified, must have values that are <span
   title="valid non-negative integer">valid non-negative
   integers</span>. The <span>rules for parsing non-negative
@@ -15513,6 +15490,46 @@
   maps.</p>
 
 
+
+  <h4><dfn>Dimension attributes</dfn></h4>
+
+  <p>The <dfn title="attr-dim-width"><code>width</code></dfn> and <dfn
+  title="attr-dim-height"><code>height</code></dfn> attributes on
+  <code>img</code>, <code>embed</code>, <code>object</code>, and
+  <code>video</code> elements may be specified to give the dimensions
+  of the visual content of the element (the width and height
+  respectively, relative to the nominal direction of the output
+  medium), in CSS pixels. The attributes, if specified, must have
+  values that are <span>valid positive non-zero integers</span>.</p>
+
+  <p>The specified dimensions given may differ from the dimensions
+  specified in the resource itself, since the resource may have a
+  resolution that differs from the CSS pixel resolution. (On screens,
+  CSS pixels have a resolution of 96ppi, but in general the CSS pixel
+  resolution depends on the reading distance.) If both attributes are
+  specified, then the ratio of the specified width to the specified
+  height must be the same as the ratio of the logical width to the
+  logical height in the resource. The two attributes must be omitted
+  if the resource in question does not have both a logical width and a
+  logical height.</p>
+
+  <p>To parse the attributes, user agents must use the <span>rules for
+  parsing dimension values</span>. This will return either an integer
+  length, a percentage value, or nothing. The user agent requirements
+  for processing the values obtained from parsing these attributes are
+  described <span title="sizing of embedded content">in the rendering
+  section</span><!-- XXX xref -->. If one of these attributes, when
+  parsing, returns no value, it must be treated, for the purposes of
+  those requirements, as if it was not specified.</p>
+
+  <p>The <dfn title="dom-dim-width"><code>width</code></dfn> and <dfn
+  title="dom-dim-height"><code>height</code></dfn> DOM attributes on
+  the <code>embed</code>, <code>object</code>, and <code>video</code>
+  elements must reflect the content attributes of the same name.</p>
+
+
+
+
   <h3>Tabular data</h3>
 
   <h4>The <dfn><code>table</code></dfn> element</h4>




More information about the Commit-Watchers mailing list