NOTE: The current preferred location for bug reports is the GitHub issue tracker.
Bug 397 - Change the rules for the handling of dimension attributes so that the requirement that they keep their ratio takes into account the integer nature of the attributes.
Change the rules for the handling of dimension attributes so that the require...
Status: NEW
Product: Validator.nu
Classification: Unclassified
Component: General
HEAD
All All
: P2 normal
Assigned To: Nobody
http://svn.whatwg.org/webapps/source?...
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-01-04 16:49 CET by Henri Sivonen
Modified: 2009-11-23 17:17 CET (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Henri Sivonen 2009-01-04 16:49:23 CET
Index: source
===================================================================
--- source	(revision 2473)
+++ source	(revision 2474)
@@ -23468,13 +23468,34 @@
   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 intrinsic width to the
-  intrinsic height in the resource, or alternatively, in the case of
-  the <code>video</code> element, the same as the <span
-  title="concept-video-adjusted-ratio">adjusted ratio</span>. The two
-  attributes must be omitted if the resource in question does not have
-  both an intrinsic width and an intrinsic height.</p>
+  specified, then one of the following statements must be true:</p>
+
+  <ul>
+
+   <li><span><var title="">specified width</var> - 0.5 &le;
+             <var title="">specified height</var> * <var title="">target ratio</var> &le;
+             <var title="">specified width</var> + 0.5</span></li>
+
+   <li><span><var title="">specified height</var> - 0.5 &le;
+             <var title="">specified width</var> / <var title="">target ratio</var> &le;
+             <var title="">specified height</var> + 0.5</span></li>
+
+  </ul>
+
+  <p>The <var title="">target ratio</var> is, in the
+  <code>video</code> element, the same as the <span
+  title="concept-video-adjusted-ratio">adjusted ratio</span>, and in
+  the other cases, the ratio of the intrinsic width to the intrinsic
+  height in the resource. The <var title="">specified width</var> and
+  <var title="">specified height</var> are the values of the <code
+  title="attr-dim-width">width</code> and <code
+  title="attr-dim-height">height</code> attributes respectively.</p>
+
+  <p>The two attributes must be omitted if the resource in question
+  does not have both an intrinsic width and an intrinsic height.</p>
+
+  <p class="note">Basically, the dimension attributes can't be used to
+  stretch the image.</p>
 
   <p>To parse the attributes, user agents must use the <span>rules for
   parsing dimension values</span>. This will return either an integer