[html5] r1744 - /

whatwg at whatwg.org whatwg at whatwg.org
Thu Jun 12 02:18:35 PDT 2008


Author: ianh
Date: 2008-06-12 02:18:35 -0700 (Thu, 12 Jun 2008)
New Revision: 1744

Modified:
   index
   source
Log:
[] (0) Make the handling of <video> intrinsic dimensions clearer.

Modified: index
===================================================================
--- index	2008-06-12 08:35:08 UTC (rev 1743)
+++ index	2008-06-12 09:18:35 UTC (rev 1744)
@@ -15257,6 +15257,17 @@
   <p class=note>Which frame in a video stream corresponds to a particular
    playback position is defined by the video stream's format.
 
+  <p>In addition to the above, the user agent may provide messages to the
+   user (such as "buffering", "no video loaded", "error", or more detailed
+   information) by overlaying text or icons on the video or other areas of
+   the element's playback area, or in another appropriate manner.
+
+  <p>User agents that cannot render the video may instead make the element
+   represent a link to an external video playback utility or to the video
+   data itself.
+
+  <hr>
+
   <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
@@ -15267,18 +15278,42 @@
    contain the video represent nothing.
 
   <p>The <dfn id=adjusted>adjusted aspect ratio</dfn> of a video is the ratio
-   of its <a href="#adjusted0">adjusted width</a> to its intrinsic height.
-   The <dfn id=adjusted0>adjusted width</dfn> of a video is its intrinsic
-   width multiplied by its <a href="#pixel0">pixel ratio</a>.
+   of its intrinsic width to its intrinsic height. The intrinsic height of a
+   video is the height given by the resource itself. 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>.
 
-  <p>In addition to the above, the user agent may provide messages to the
-   user (such as "buffering", "no video loaded", "error", or more detailed
-   information) by overlaying text or icons on the video or other areas of
-   the element's playback area, or in another appropriate manner.
+  <p>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. 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>User agents that cannot render the video may instead make the element
-   represent a link to an external video playback utility or to the video
-   data itself.</p>
+  <p>User agents may adjust the intrinsic height and width 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 intrinsic height of a <code><a href="#video1">video</a></code>
+   element's playback area is the intrinsic height of the video resource, if
+   available, otherwise it is 150 CSS pixels.
+
+  <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
+   available, otherwise it is 300 CSS pixels.
+
+  <p class=note>The image given by the <code title=attr-video-poster><a
+   href="#poster">poster</a></code> attribute does not influence the
+   element's intrinsic dimensions.
+
+  <hr>
   <!-- XXX
    make it an interactive element
    default activation behavior is to do the play() if paused, pause()
@@ -15646,6 +15681,14 @@
    aspect ratio). 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.
+
   <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
    whose <code title=dom-media-networkState><a
@@ -15863,7 +15906,8 @@
 
   <ol>
    <li>
-    <p>Let the <var title="">chosen resource's pixel ratio</var> be 1.0.
+    <p>Let the <var title="">chosen resource's pixel ratio override</var> be
+     <i>none</i>.
 
    <li>
     <p>If the <a href="#media7">media element</a> has a <code
@@ -15883,10 +15927,10 @@
    <li>
     <p>If <var title="">candidate</var> is not null and it has a <code
      title=attr-source-pixelratio><a href="#pixelratio">pixelratio</a></code>
-     attribute, then let the <var title="">chosen resource's pixel
-     ratio</var> be result of applying the <a href="#rules1">rules for
-     parsing floating point number values</a> to the value of that attribute,
-     or 1.0 if those rules return an error.
+     attribute, and the result of applying the <a href="#rules1">rules for
+     parsing floating point number values</a> to the value of that attribute
+     is not an error, then let the <var title="">chosen resource's pixel
+     ratio override</var> be that result.
 
    <li>
     <p>If either:</p>
@@ -15935,8 +15979,8 @@
    <li>
     <p>Let the address of the <dfn id=chosen>chosen media resource</dfn> be
      the one that was found before jumping to this step, and let its <dfn
-     id=pixel0>pixel ratio</dfn> be the value of the <var title="">chosen
-     resource's pixel ratio</var>.
+     id=pixel0>pixel ratio override</dfn> be the value of the <var
+     title="">chosen resource's pixel ratio override</var>.
   </ol>
 
   <p>The <dfn id=currentsrc

Modified: source
===================================================================
--- source	2008-06-12 08:35:08 UTC (rev 1743)
+++ source	2008-06-12 09:18:35 UTC (rev 1744)
@@ -13198,6 +13198,18 @@
   particular playback position is defined by the video stream's
   format.</p>
 
+  <p>In addition to the above, the user agent may provide messages to
+  the user (such as "buffering", "no video loaded", "error", or more
+  detailed information) by overlaying text or icons on the video or
+  other areas of the element's playback area, or in another
+  appropriate manner.</p>
+
+  <p>User agents that cannot render the video may instead make the
+  element represent a link to an external video playback utility or to
+  the video data itself.</p>
+
+  <hr>
+
   <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,
@@ -13208,20 +13220,45 @@
   do not contain the video represent nothing.</p>
 
   <p>The <dfn>adjusted aspect ratio</dfn> of a video is the ratio of
-  its <span>adjusted width</span> to its intrinsic height. The
-  <dfn>adjusted width</dfn> of a video is its intrinsic width
-  multiplied by its <span>pixel ratio</span>.</p>
+  its intrinsic width to its intrinsic height. The intrinsic height of
+  a video is the height given by the resource itself. 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>.</p>
 
-  <p>In addition to the above, the user agent may provide messages to
-  the user (such as "buffering", "no video loaded", "error", or more
-  detailed information) by overlaying text or icons on the video or
-  other areas of the element's playback area, or in another
-  appropriate manner.</p>
+  <p>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. 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>User agents that cannot render the video may instead make the
-  element represent a link to an external video playback utility or to
-  the video data itself.</p>
+  <p>User agents may adjust the intrinsic height and width 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 intrinsic height of a <code>video</code> element's playback
+  area is the intrinsic height of the video resource, if available,
+  otherwise it is 150 CSS pixels.</p>
+
+  <p>The intrinsic width of a <code>video</code> element's playback
+  area is the intrinsic width of the video resource, if available,
+  otherwise it is 300 CSS pixels.</p>
+
+  <p class="note">The image given by the <code
+  title="attr-video-poster">poster</code> attribute does not influence
+  the element's intrinsic dimensions.</p>
+
+  <hr>
+
   <!-- XXX
    make it an interactive element
    default activation behavior is to do the play() if paused, pause()
@@ -13542,6 +13579,15 @@
   that gives the correct aspect ratio). 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>
+
   <p>If a <code>source</code> element is inserted into a <span>media
   element</span> that is already in a document and whose <code
   title="dom-media-networkState">networkState</code> is in the <code
@@ -13756,8 +13802,8 @@
 
   <ol>
 
-   <li><p>Let the <var title="">chosen resource's pixel ratio</var> be
-   1.0.</p></li>
+   <li><p>Let the <var title="">chosen resource's pixel ratio
+   override</var> be <i>none</i>.</p></li>
 
    <li><p>If the <span>media element</span> has a <code
    title="attr-media-src">src</code>, then the address given in that
@@ -13773,10 +13819,10 @@
 
    <li><p>If <var title="">candidate</var> is not null and it has a
    <code title="attr-source-pixelratio">pixelratio</code> attribute,
-   then let the <var title="">chosen resource's pixel ratio</var> be
-   result of applying the <span>rules for parsing floating point
-   number values</span> to the value of that attribute, or 1.0 if
-   those rules return an error.</p></li>
+   and the result of applying the <span>rules for parsing floating
+   point number values</span> to the value of that attribute is not an
+   error, then let the <var title="">chosen resource's pixel ratio
+   override</var> be that result.</p></li>
 
    <li>
 
@@ -13828,8 +13874,8 @@
 
    <li><p>Let the address of the <dfn>chosen media resource</dfn> be
    the one that was found before jumping to this step, and let its
-   <dfn>pixel ratio</dfn> be the value of the <var title="">chosen
-   resource's pixel ratio</var>.</p></li>
+   <dfn>pixel ratio override</dfn> be the value of the <var
+   title="">chosen resource's pixel ratio override</var>.</p></li>
 
   </ol>
 




More information about the Commit-Watchers mailing list