[html5] r1007 - /

whatwg at whatwg.org whatwg at whatwg.org
Wed Aug 15 02:25:55 PDT 2007


Author: ianh
Date: 2007-08-15 02:25:54 -0700 (Wed, 15 Aug 2007)
New Revision: 1007

Modified:
   index
   source
Log:
[] (0) Let's try this for img height/width

Modified: index
===================================================================
--- index	2007-08-15 03:43:54 UTC (rev 1006)
+++ index	2007-08-15 09:25:54 UTC (rev 1007)
@@ -4554,11 +4554,10 @@
   <h5 id=percentages-and-dimensions><span class=secno>3.2.3.5.
    </span>Percentages and dimensions</h5>
 
-  <p class=big-issue><dfn id=valid3 title="valid non-negative
-   percentage">valid non-negative percentages</dfn>, <dfn id=rules2>rules for
-   parsing dimension values</dfn> (only used by height/width on img, embed,
-   object — maybe they should do the same as canvas, then this wouldn't
-   even be needed)
+  <p class=big-issue><dfn id=valid3>valid positive non-zero integers</dfn>
+   <dfn id=rules2>rules for parsing dimension values</dfn> (only used by
+   height/width on img, embed, object — lengths in css pixels or
+   percentages)
 
   <h5 id=lists><span class=secno>3.2.3.6. </span>Lists of integers</h5>
 
@@ -12391,30 +12390,31 @@
 
   <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 preferred rendered dimensions of the image if the image is to be
-   shown in a visual medium.
+   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 class=big-issue>Should we require the dimensions to be correct? Should
-   we disallow percentages?
+  <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.) 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>The values of the <code title=attr-img-height><a
-   href="#height">height</a></code> and <code title=attr-img-width><a
-   href="#width">width</a></code> attributes must be either <a href="#valid"
-   title="valid non-negative integer">valid non-negative integers</a> or <a
-   href="#valid3" title="valid non-negative percentage">valid non-negative
-   percentages</a>.
+  <p>If either attribute is specified, the other must be as well (a lone
+   width or height is not conforming).
 
   <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. When one of
-   these attributes has no value, it must be
-   <span>ignored</span><!-- XXX xref -->.
+   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 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
-  -->.
-
   <p>The <code><a href="#img">img</a></code> element must be empty.</p>
   <!-- contents
   should be ignored for rendering but not for semantics,

Modified: source
===================================================================
--- source	2007-08-15 03:43:54 UTC (rev 1006)
+++ source	2007-08-15 09:25:54 UTC (rev 1007)
@@ -3229,11 +3229,10 @@
 
   <h5 id="percentages-and-dimensions">Percentages and dimensions</h5>
 
-  <p class="big-issue"><dfn title="valid non-negative
-  percentage">valid non-negative percentages</dfn>, <dfn>rules for
-  parsing dimension values</dfn> (only used by height/width on img,
-  embed, object — maybe they should do the same as canvas, then
-  this wouldn't even be needed)</p>
+  <p class="big-issue"><dfn>valid positive non-zero integers</dfn>
+  <dfn>rules for parsing dimension values</dfn> (only used by
+  height/width on img, embed, object — lengths in css pixels or
+  percentages)</p>
 
 
 
@@ -10413,30 +10412,34 @@
   on an element that does not have an ancestor <code>a</code>
   element.</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 preferred rendered dimensions of the image if the image is to be
-  shown in a visual medium.</p>
+  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 class="big-issue">Should we require the dimensions to be correct?
-  Should we disallow percentages?</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.) 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>The values of the <code title="attr-img-height">height</code> and
-  <code title="attr-img-width">width</code> attributes must be either
-  <span title="valid non-negative integer">valid non-negative
-  integers</span> or <span title="valid non-negative percentage">valid
-  non-negative percentages</span>.</p>
+  <p>If either attribute is specified, the other must be as well (a
+  lone width or height is not conforming).</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. When one of these attributes
-  has no value, it must be <span>ignored</span><!-- XXX xref -->.</p>
+  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 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
-  -->.</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. -->




More information about the Commit-Watchers mailing list