[html5] r1903 - [gow] (2) Revamp of the intrinsic dimensions and pixel ratio definitions. (Re: H [...]

whatwg at whatwg.org whatwg at whatwg.org
Tue Jul 22 14:57:12 PDT 2008


Author: ianh
Date: 2008-07-22 14:57:11 -0700 (Tue, 22 Jul 2008)
New Revision: 1903

Modified:
   index
   source
Log:
[gow] (2) Revamp of the intrinsic dimensions and pixel ratio definitions. (Re: HTMLMediaElement: more issues and ambiguities) (credit: pj)

Modified: index
===================================================================
--- index	2008-07-22 09:26:59 UTC (rev 1902)
+++ index	2008-07-22 21:57:11 UTC (rev 1903)
@@ -16922,65 +16922,94 @@
 
   <hr>
 
-  <p>The <code><a href="#video1">video</a></code> element supports <a
-   href="#dimension0">dimension attributes</a>.
+  <p>The intrinsic width and height of the video are the aspect-ratio
+   corrected dimensions given by the video data itself: the <dfn id=intrinsic
+   title=concept-video-intrinsic-width>intrinsic width</dfn> is the number of
+   pixels per line of the video data multiplied by the pixel ratio given by
+   the resource, multiplied by the resolution of the resource; the <dfn
+   id=intrinsic0 title=concept-video-intrinsic-height>intrinsic height</dfn>
+   is the number of pixels per column of the video data multiplied by the
+   resolution of the resource. The <dfn id=resolution
+   title=concept-video-resolution>resolution of the resource</dfn> is the
+   physical distance intended for each pixel of video data, and assumes
+   square pixels, with the resource's pixel ratio then adjusting the width of
+   the pixels to the actual aspect-ratio-corrected width. In the absence of
+   resolution information defining the mapping of pixels in the video to
+   physical dimensions, user agents should assume that one pixel in the video
+   corresponds to one CSS pixel. The <dfn id=pixel0
+   title=concept-video-pixel-ratio>pixel ratio of the resource</dfn> is the
+   corrected aspect ratio of the video divided by the ratio of the number of
+   pixels per line to the number of pixels per column. In the absence of
+   pixel ratio information in the resource, user agents should assume a
+   default of 1.0 (square pixels).
 
   <p>The <dfn id=videowidth
    title=dom-video-videoWidth><code>videoWidth</code></dfn> DOM attribute
-   must return the intrinsic width of the video in CSS pixels. The <dfn
-   id=videoheight title=dom-video-videoHeight><code>videoHeight</code></dfn>
-   DOM attribute must return the intrinsic height of the video in CSS pixels.
-   In the absence of resolution information defining the mapping of pixels in
-   the video to physical dimensions, user agents may assume that one pixel in
-   the video corresponds to one CSS pixel. If no video data is available,
-   then the attributes must return 0.
+   must return the <a href="#intrinsic"
+   title=concept-video-intrinsic-width>intrinsic width</a> of the video in
+   CSS pixels. The <dfn id=videoheight
+   title=dom-video-videoHeight><code>videoHeight</code></dfn> DOM attribute
+   must return the <a href="#intrinsic0"
+   title=concept-video-intrinsic-height>intrinsic height</a> of the video in
+   CSS pixels. If no video data is available, then the attributes must return
+   0.
 
-  <p>Video content should be rendered inside the element's playback area such
-   that the video content is shown centered in the playback area at the
-   largest possible size that fits completely within it, with the video
-   content's <a href="#adjusted">adjusted aspect ratio</a> being preserved.
-   Thus, if the aspect ratio of the playback area does not match the <a
-   href="#adjusted">adjusted aspect ratio</a> of the video, the video will be
-   shown letterboxed. Areas of the element's playback area that do not
-   contain the video represent nothing.
+  <p>If the video's <a href="#pixel1">pixel ratio override</a>'s is
+   <i>none</i>, then the video's <dfn id=adjusted
+   title=concept-video-adjusted-width>adjusted width</dfn> is the same as the
+   video's <a href="#intrinsic" title=concept-video-intrinsic-width>intrinsic
+   width</a>. If the video has a <a href="#pixel1">pixel ratio override</a>
+   other than <i>none</i>, then the adjusted width of the video is the number
+   of pixels per line of the video data multiplied by the video's <a
+   href="#pixel1">pixel ratio override</a>, multiplied by the <a
+   href="#resolution" title=concept-video-resolution>resolution of the
+   resource</a>; the <a href="#pixel0" title=concept-video-pixel-ratio>pixel
+   ratio of the resource</a> is thus ignored.
 
-  <p>The <dfn id=adjusted>adjusted aspect ratio</dfn> of a video is the ratio
-   of its intrinsic width to its intrinsic height.
+  <p>The video's <dfn id=adjusted0
+   title=concept-video-adjusted-height>adjusted height</dfn> is the same as
+   the video's <a href="#intrinsic0"
+   title=concept-video-intrinsic-height>intrinsic height</a>.
 
-  <p>If the video's <a href="#pixel0">pixel ratio override</a>'s is
-   <i>none</i>, then the video's intrinsic width is the width given by the
-   resource itself. If the video has a <a href="#pixel0">pixel ratio
-   override</a> other than <i>none</i>, then the intrinsic width of the video
-   is the width given by the resource itself, divided by the pixel ratio
-   given by the resource itself, multiplied by the video's <a
-   href="#pixel0">pixel ratio override</a>. If the resource doesn't give an
-   explicit width, then user agents should assume that the width of each
-   pixel of the video data is exactly one CSS pixel multiplied by the
-   resource's pixel ratio. If the resource doesn't give an explicit pixel
-   ratio, then user agents should assume that the pixel ratio is 1.0.
+  <p>The <dfn id=adjusted1 title=concept-video-adjusted-ratio>adjusted aspect
+   ratio</dfn> of a video is the ratio of its <a href="#adjusted"
+   title=concept-video-adjusted-width>adjusted width</a> to its <a
+   href="#adjusted0" title=concept-video-adjusted-height>adjusted height</a>.
 
-  <p>The intrinsic height of a video is the height given by the resource
-   itself. If the resource doesn't give an explicit height, then user agents
-   should assume that the height of each pixel of the video data is exactly
-   one CSS pixel.
+  <p>User agents may adjust the <a href="#adjusted"
+   title=concept-video-adjusted-width>adjusted width</a> and <a
+   href="#adjusted0" title=concept-video-adjusted-height>height</a> of the
+   video to ensure that each pixel of video data corresponds to at least one
+   device pixel, so long as this doesn't affect the <a href="#adjusted1"
+   title=concept-video-adjusted-ratio>adjusted aspect ratio</a> (this is
+   especially relevant for pixel ratios that are less than 1.0).
 
-  <p>User agents may adjust the intrinsic width and height of the video to
-   ensure that each pixel of video data corresponds to at least one device
-   pixel, so long as this doesn't affect the <a href="#adjusted">adjusted
-   aspect ratio</a> (this is especially relevant for pixel ratios that are
-   less than 1.0).
+  <p>The <code><a href="#video1">video</a></code> element supports <a
+   href="#dimension0">dimension attributes</a>.
 
+  <p>Video content should be rendered inside the element's playback area such
+   that the video content is shown centered in the playback area at the
+   largest possible size that fits completely within it, with the video
+   content's <a href="#adjusted1" title=concept-video-adjusted-ratio>adjusted
+   aspect ratio</a> being preserved. Thus, if the aspect ratio of the
+   playback area does not match the <a href="#adjusted1"
+   title=concept-video-adjusted-ratio>adjusted aspect ratio</a> of the video,
+   the video will be shown letterboxed. Areas of the element's playback area
+   that do not contain the video represent nothing.
+
   <p>The intrinsic width of a <code><a href="#video1">video</a></code>
-   element's playback area is the intrinsic width of the video resource, if
-   that is available; otherwise it is the intrinsic width of the <a
-   href="#poster0">poster frame</a>, if that is available; otherwise it is
+   element's playback area is the <a href="#adjusted"
+   title=concept-video-adjusted-width>adjusted width</a> of the video
+   resource, if that is available; otherwise it is the intrinsic width of the
+   <a href="#poster0">poster frame</a>, if that is available; otherwise it is
    300 CSS pixels.
 
   <p>The intrinsic height of a <code><a href="#video1">video</a></code>
-   element's playback area is the intrinsic height of the video resource, if
-   that is available; otherwise it is the intrinsic height of the <a
-   href="#poster0">poster frame</a>, if that is available; otherwise it is
-   150 CSS pixels.
+   element's playback area is the <a href="#adjusted0"
+   title=concept-video-adjusted-height>intrinsic height</a> of the video
+   resource, if that is available; otherwise it is the intrinsic height of
+   the <a href="#poster0">poster frame</a>, if that is available; otherwise
+   it is 150 CSS pixels.
 
   <p class=note>The <a href="#poster0">poster frame</a> is not affected by
    the pixel ratio conversions.
@@ -17345,19 +17374,21 @@
    title=attr-source-pixelratio><code>pixelratio</code></dfn> attribute
    allows the author to specify the pixel ratio of anamorphic <a
    href="#media10" title="media resource">media resources</a> that do not
-   self-describe their pixel ratio. The attribute value, if specified, must
-   be a <a href="#valid2">valid floating point number</a> giving the ratio of
-   the correct rendered width of each pixel to the actual height of each
-   pixel in the image. The default value, if the attribute is omitted or
-   cannot be parsed, is 1.0.
+   self-describe their <a href="#adjusted1"
+   title=concept-video-adjusted-ratio>pixel ratio</a>. The attribute value,
+   if specified, must be a <a href="#valid2">valid floating point number</a>
+   giving the ratio of the correct rendered width of each pixel to the actual
+   height of each pixel in the image. The default value, if the attribute is
+   omitted or cannot be parsed, is 1.0.
 
   <p class=note>The only way this default is used is in deciding what number
    the <code title=dom-source-pixelRatio><a
    href="#pixelratio0">pixelRatio</a></code> DOM attribute will return if the
    content attribute is omitted or cannot be parsed. If the content attribute
-   is omitted or cannot be parsed, then the user agent doesn't adjust the
-   intrinsic width of the video at all; the intrinsic dimensions and the
-   intrinsic pixel ratio of the video are honoured.
+   is omitted or cannot be parsed, then the user agent doesn't adjust the <a
+   href="#intrinsic" title=concept-video-intrinsic-width>intrinsic width</a>
+   of the video at all; the intrinsic dimensions and the <a href="#pixel0"
+   title=concept-video-pixel-ratio>pixel ratio</a> of the video are honoured.
 
   <p>If a <code><a href="#source">source</a></code> element is inserted into
    a <a href="#media7">media element</a> that is already in a document and
@@ -17660,7 +17691,7 @@
    <li>
     <p>Let the address of the <dfn id=chosen>chosen media resource</dfn> be
      the <a href="#absolute">absolute URL</a> that was found before jumping
-     to this step, and let its <dfn id=pixel0>pixel ratio override</dfn> be
+     to this step, and let its <dfn id=pixel1>pixel ratio override</dfn> be
      the value of the <var title="">chosen resource's pixel ratio
      override</var>.
   </ol>
@@ -21811,7 +21842,7 @@
   of the target element, not the rendered image (e.g. height/width
   attributes don't affect it -->
 
-  <h6 id=pixel><span class=secno>4.7.11.1.11. </span><dfn id=pixel1>Pixel
+  <h6 id=pixel><span class=secno>4.7.11.1.11. </span><dfn id=pixel2>Pixel
    manipulation</dfn></h6>
 
   <p>The <dfn id=createimagedata
@@ -22969,9 +23000,12 @@
    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.
+   of the intrinsic width to the intrinsic height in the resource, or
+   alternatively, in the case of the <code><a href="#video1">video</a></code>
+   element, the same as the <a href="#adjusted1"
+   title=concept-video-adjusted-ratio>adjusted ratio</a>. The two attributes
+   must be omitted if the resource in question does not have both an
+   intrinsic width and an intrinsic height.
 
   <p>To parse the attributes, user agents must use the <a
    href="#rules2">rules for parsing dimension values</a>. This will return

Modified: source
===================================================================
--- source	2008-07-22 09:26:59 UTC (rev 1902)
+++ source	2008-07-22 21:57:11 UTC (rev 1903)
@@ -14670,68 +14670,96 @@
 
   <hr>
 
-  <p>The <code>video</code> element supports <span>dimension
-  attributes</span>.</p>
+  <p>The intrinsic width and height of the video are the aspect-ratio
+  corrected dimensions given by the video data itself: the <dfn
+  title="concept-video-intrinsic-width">intrinsic width</dfn> is the
+  number of pixels per line of the video data multiplied by the pixel
+  ratio given by the resource, multiplied by the resolution of the
+  resource; the <dfn title="concept-video-intrinsic-height">intrinsic
+  height</dfn> is the number of pixels per column of the video data
+  multiplied by the resolution of the resource. The <dfn
+  title="concept-video-resolution">resolution of the resource</dfn> is
+  the physical distance intended for each pixel of video data, and
+  assumes square pixels, with the resource's pixel ratio then
+  adjusting the width of the pixels to the actual
+  aspect-ratio-corrected width. In the absence of resolution
+  information defining the mapping of pixels in the video to physical
+  dimensions, user agents should assume that one pixel in the video
+  corresponds to one CSS pixel. The <dfn
+  title="concept-video-pixel-ratio">pixel ratio of the resource</dfn>
+  is the corrected aspect ratio of the video divided by the ratio of
+  the number of pixels per line to the number of pixels per column. In
+  the absence of pixel ratio information in the resource, user agents
+  should assume a default of 1.0 (square pixels).</p>
 
   <p>The <dfn
   title="dom-video-videoWidth"><code>videoWidth</code></dfn> DOM
-  attribute must return the intrinsic width of the video in CSS
-  pixels. The <dfn
+  attribute must return the <span
+  title="concept-video-intrinsic-width">intrinsic width</span> of the
+  video in CSS pixels. The <dfn
   title="dom-video-videoHeight"><code>videoHeight</code></dfn> DOM
-  attribute must return the intrinsic height of the video in CSS
-  pixels. In the absence of resolution information defining the
-  mapping of pixels in the video to physical dimensions, user agents
-  may assume that one pixel in the video corresponds to one CSS
-  pixel. If no video data is available, then the attributes must
-  return 0.</p>
+  attribute must return the <span
+  title="concept-video-intrinsic-height">intrinsic height</span> of
+  the video in CSS pixels. If no video data is available, then the
+  attributes must return 0.</p>
 
-  <p>Video content should be rendered inside the element's playback
-  area such that the video content is shown centered in the playback
-  area at the largest possible size that fits completely within it,
-  with the video content's <span>adjusted aspect ratio</span> being
-  preserved. Thus, if the aspect ratio of the playback area does not
-  match the <span>adjusted aspect ratio</span> of the video, the video
-  will be shown letterboxed. Areas of the element's playback area that
-  do not contain the video represent nothing.</p>
+  <p>If the video's <span>pixel ratio override</span>'s is
+  <i>none</i>, then the video's <dfn
+  title="concept-video-adjusted-width">adjusted width</dfn> is the
+  same as the video's <span
+  title="concept-video-intrinsic-width">intrinsic width</span>. If the
+  video has a <span>pixel ratio override</span> other than
+  <i>none</i>, then the adjusted width of the video is the number of
+  pixels per line of the video data multiplied by the video's
+  <span>pixel ratio override</span>, multiplied by the <span
+  title="concept-video-resolution">resolution of the resource</span>;
+  the <span title="concept-video-pixel-ratio">pixel ratio of the
+  resource</span> is thus ignored.</p>
 
-  <p>The <dfn>adjusted aspect ratio</dfn> of a video is the ratio of
-  its intrinsic width to its intrinsic height.</p>
+  <p>The video's <dfn title="concept-video-adjusted-height">adjusted
+  height</dfn> is the same as the video's <span
+  title="concept-video-intrinsic-height">intrinsic height</span>.</p>
 
-  <p>If the video's <span>pixel ratio override</span>'s is
-  <i>none</i>, then the video's intrinsic width is the width given by
-  the resource itself. If the video has a <span>pixel ratio
-  override</span> other than <i>none</i>, then the intrinsic width of
-  the video is the width given by the resource itself, divided by the
-  pixel ratio given by the resource itself, multiplied by the video's
-  <span>pixel ratio override</span>. If the resource doesn't give an
-  explicit width, then user agents should assume that the width of
-  each pixel of the video data is exactly one CSS pixel multiplied by
-  the resource's pixel ratio. If the resource doesn't give an explicit
-  pixel ratio, then user agents should assume that the pixel ratio is
-  1.0.</p>
+  <p>The <dfn title="concept-video-adjusted-ratio">adjusted aspect
+  ratio</dfn> of a video is the ratio of its <span
+  title="concept-video-adjusted-width">adjusted width</span> to its
+  <span title="concept-video-adjusted-height">adjusted
+  height</span>.</p>
 
-  <p>The intrinsic height of a video is the height given by the
-  resource itself. If the resource doesn't give an explicit height,
-  then user agents should assume that the height of each pixel of the
-  video data is exactly one CSS pixel.</p>
+  <p>User agents may adjust the <span
+  title="concept-video-adjusted-width">adjusted width</span> and <span
+  title="concept-video-adjusted-height">height</span> of the video to
+  ensure that each pixel of video data corresponds to at least one
+  device pixel, so long as this doesn't affect the <span
+  title="concept-video-adjusted-ratio">adjusted aspect ratio</span>
+  (this is especially relevant for pixel ratios that are less than
+  1.0).</p>
 
-  <p>User agents may adjust the intrinsic width and height of the
-  video to ensure that each pixel of video data corresponds to at
-  least one device pixel, so long as this doesn't affect the
-  <span>adjusted aspect ratio</span> (this is especially relevant for
-  pixel ratios that are less than 1.0).</p>
+  <p>The <code>video</code> element supports <span>dimension
+  attributes</span>.</p>
 
+  <p>Video content should be rendered inside the element's playback
+  area such that the video content is shown centered in the playback
+  area at the largest possible size that fits completely within it,
+  with the video content's <span
+  title="concept-video-adjusted-ratio">adjusted aspect ratio</span>
+  being preserved. Thus, if the aspect ratio of the playback area does
+  not match the <span title="concept-video-adjusted-ratio">adjusted
+  aspect ratio</span> of the video, the video will be shown
+  letterboxed. Areas of the element's playback area that do not
+  contain the video represent nothing.</p>
+
   <p>The intrinsic width of a <code>video</code> element's playback
-  area is the intrinsic width of the video resource, if that is
-  available; otherwise it is the intrinsic width of the <span>poster
-  frame</span>, if that is available; otherwise it is 300 CSS
-  pixels.</p>
+  area is the <span title="concept-video-adjusted-width">adjusted
+  width</span> of the video resource, if that is available; otherwise
+  it is the intrinsic width of the <span>poster frame</span>, if that
+  is available; otherwise it is 300 CSS pixels.</p>
 
   <p>The intrinsic height of a <code>video</code> element's playback
-  area is the intrinsic height of the video resource, if that is
-  available; otherwise it is the intrinsic height of the <span>poster
-  frame</span>, if that is available; otherwise it is 150 CSS
-  pixels.</p>
+  area is the <span title="concept-video-adjusted-height">intrinsic
+  height</span> of the video resource, if that is available; otherwise
+  it is the intrinsic height of the <span>poster frame</span>, if that
+  is available; otherwise it is 150 CSS pixels.</p>
 
   <p class="note">The <span>poster frame</span> is not affected by the
   pixel ratio conversions.</p>
@@ -15050,20 +15078,23 @@
   title="attr-source-pixelratio"><code>pixelratio</code></dfn>
   attribute allows the author to specify the pixel ratio of anamorphic
   <span title="media resource">media resources</span> that do not
-  self-describe their pixel ratio. The attribute value, if specified,
-  must be a <span>valid floating point number</span> giving the ratio
-  of the correct rendered width of each pixel to the actual height of
-  each pixel in the image. The default value, if the attribute is
-  omitted or cannot be parsed, is 1.0.</p>
+  self-describe their <span title="concept-video-adjusted-ratio">pixel
+  ratio</span>. The attribute value, if specified, must be a
+  <span>valid floating point number</span> giving the ratio of the
+  correct rendered width of each pixel to the actual height of each
+  pixel in the image. The default value, if the attribute is omitted
+  or cannot be parsed, is 1.0.</p>
 
   <p class="note">The only way this default is used is in deciding
   what number the <code
   title="dom-source-pixelRatio">pixelRatio</code> DOM attribute will
   return if the content attribute is omitted or cannot be parsed. If
   the content attribute is omitted or cannot be parsed, then the user
-  agent doesn't adjust the intrinsic width of the video at all; the
-  intrinsic dimensions and the intrinsic pixel ratio of the video are
-  honoured.</p>
+  agent doesn't adjust the <span
+  title="concept-video-intrinsic-width">intrinsic width</span> of the
+  video at all; the intrinsic dimensions and the <span
+  title="concept-video-pixel-ratio">pixel ratio</span> of the video
+  are honoured.</p>
 
   <p>If a <code>source</code> element is inserted into a <span>media
   element</span> that is already in a document and whose <code
@@ -20397,10 +20428,12 @@
   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>
+  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>
 
   <p>To parse the attributes, user agents must use the <span>rules for
   parsing dimension values</span>. This will return either an integer




More information about the Commit-Watchers mailing list