- From: poot <cvsmail@w3.org>
- Date: Mon, 1 Dec 2008 19:18:01 +0900 (JST)
- To: public-html-diffs@w3.org
Put pixelratio='' to rest. (whatwg r2493) HTMLSourceElement http://people.w3.org/mike/diffs/html5/spec/Overview.1.1664.html#htmlsourceelement HTMLMediaElement http://people.w3.org/mike/diffs/html5/spec/Overview.1.1664.html#htmlmediaelement media http://people.w3.org/mike/diffs/html5/spec/Overview.1.1664.html#attr-source-media 4.8.17 Dimension attributes http://people.w3.org/mike/diffs/html5/spec/Overview.1.1664.html#dimension-attributes currentSrc http://people.w3.org/mike/diffs/html5/spec/Overview.1.1664.html#dom-media-currentsrc videoHeight http://people.w3.org/mike/diffs/html5/spec/Overview.1.1664.html#dom-video-videoheight poster http://people.w3.org/mike/diffs/html5/spec/Overview.1.1664.html#dom-video-poster intrinsic width http://people.w3.org/mike/diffs/html5/spec/Overview.1.1664.html#concept-video-intrinsic-width videoWidth http://people.w3.org/mike/diffs/html5/spec/Overview.1.1664.html#dom-video-videowidth intrinsic height http://people.w3.org/mike/diffs/html5/spec/Overview.1.1664.html#concept-video-intrinsic-height generate the list of potential media resources http://people.w3.org/mike/diffs/html5/spec/Overview.1.1664.html#generate-the-list-of-potential-media-resources autoplaying flag http://people.w3.org/mike/diffs/html5/spec/Overview.1.1664.html#autoplaying-flag 4.8.9 The source element http://people.w3.org/mike/diffs/html5/spec/Overview.1.1664.html#the-source-element 4.8.10 Media elements http://people.w3.org/mike/diffs/html5/spec/Overview.1.1664.html#media-elements src http://people.w3.org/mike/diffs/html5/spec/Overview.1.1664.html#dom-source-src http://people.w3.org/mike/diffs/html5/spec/Overview.diff.html http://dev.w3.org/cvsweb/html5/spec/Overview.html?r1=1.1663&r2=1.1664&f=h http://html5.org/tools/web-apps-tracker?from=2492&to=2493 =================================================================== RCS file: /sources/public/html5/spec/Overview.html,v retrieving revision 1.1663 retrieving revision 1.1664 diff -u -d -r1.1663 -r1.1664 --- Overview.html 1 Dec 2008 09:59:16 -0000 1.1663 +++ Overview.html 1 Dec 2008 10:15:19 -0000 1.1664 @@ -13494,63 +13494,33 @@ 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.</p><hr><p>The intrinsic width and height of the video are the aspect-ratio - corrected dimensions given by the video data itself: the <dfn id=concept-video-intrinsic-width 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=concept-video-intrinsic-height 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=concept-video-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=concept-video-pixel-ratio 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=dom-video-videowidth title=dom-video-videoWidth><code>videoWidth</code></dfn> DOM + the video data itself.</p><hr><p>The <dfn id=concept-video-intrinsic-width title=concept-video-intrinsic-width>intrinsic + width</dfn> and <dfn id=concept-video-intrinsic-height title=concept-video-intrinsic-height>intrinsic height</dfn> of the + <a href=#media-resource>media resource</a> are the dimensions of the resource in + CSS pixels after taking into account the resource's dimensions, + aspect ratio, clean aperture, resolution, and so forth, as defined + for the format used by the resource..<p>The <dfn id=dom-video-videowidth title=dom-video-videoWidth><code>videoWidth</code></dfn> DOM attribute must return the <a href=#concept-video-intrinsic-width title=concept-video-intrinsic-width>intrinsic width</a> of the video in CSS pixels. The <dfn id=dom-video-videoheight title=dom-video-videoHeight><code>videoHeight</code></dfn> DOM attribute must return the <a href=#concept-video-intrinsic-height 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>If the video's <a href=#pixel-ratio-override>pixel ratio override</a>'s is - <i>none</i>, then the video's <dfn id=concept-video-adjusted-width title=concept-video-adjusted-width>adjusted width</dfn> is the - same as the video's <a href=#concept-video-intrinsic-width title=concept-video-intrinsic-width>intrinsic width</a>. If the - video has a <a href=#pixel-ratio-override>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=#pixel-ratio-override>pixel ratio override</a>, multiplied by the <a href=#concept-video-resolution title=concept-video-resolution>resolution of the resource</a>; - the <a href=#concept-video-pixel-ratio title=concept-video-pixel-ratio>pixel ratio of the - resource</a> is thus ignored.<p>The video's <dfn id=concept-video-adjusted-height title=concept-video-adjusted-height>adjusted - height</dfn> is the same as the video's <a href=#concept-video-intrinsic-height title=concept-video-intrinsic-height>intrinsic height</a>.<p>The <dfn id=concept-video-adjusted-ratio title=concept-video-adjusted-ratio>adjusted aspect - ratio</dfn> of a video is the ratio of its <a href=#concept-video-adjusted-width title=concept-video-adjusted-width>adjusted width</a> to its - <a href=#concept-video-adjusted-height title=concept-video-adjusted-height>adjusted - height</a>.<p>User agents may adjust the <a href=#concept-video-adjusted-width title=concept-video-adjusted-width>adjusted width</a> and <a href=#concept-video-adjusted-height 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=#concept-video-adjusted-ratio title=concept-video-adjusted-ratio>adjusted aspect ratio</a> - (this is especially relevant for pixel ratios that are less than - 1.0).<p>The <code><a href=#video>video</a></code> element supports <a href=#dimension-attributes>dimension + attributes must return 0.<p>The <code><a href=#video>video</a></code> element supports <a href=#dimension-attributes>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=#concept-video-adjusted-ratio 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=#concept-video-adjusted-ratio 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=#video>video</a></code> element's playback - area is the <a href=#concept-video-adjusted-width title=concept-video-adjusted-width>adjusted + with the video content's aspect ratio being preserved. Thus, if the + aspect ratio of the playback area does not match the aspect ratio of + the video, the video will be shown letterboxed or pillarboxed. Areas + of the element's playback area that do not contain the video + represent nothing.<p>The intrinsic width of a <code><a href=#video>video</a></code> element's playback + area is the <a href=#concept-video-intrinsic-width title=concept-video-intrinsic-width>intrinsic width</a> of the video resource, if that is available; otherwise it is the intrinsic width of the <a href=#poster-frame>poster frame</a>, if that is available; otherwise it is 300 CSS pixels.<p>The intrinsic height of a <code><a href=#video>video</a></code> element's playback - area is the <a href=#concept-video-adjusted-height title=concept-video-adjusted-height>intrinsic + area is the <a href=#concept-video-intrinsic-height title=concept-video-intrinsic-height>intrinsic height</a> of the video resource, if that is available; otherwise it is the intrinsic height of the <a href=#poster-frame>poster frame</a>, if that - is available; otherwise it is 150 CSS pixels.<p class=note>The <a href=#poster-frame>poster frame</a> is not affected by the - pixel ratio conversions.</p><hr><!-- XXX + is available; otherwise it is 150 CSS pixels.</p><hr><!-- XXX default activation behavior is to do the play() if paused, pause() otherwise --><p>User agents should provide controls to enable or disable the @@ -13649,14 +13619,12 @@ <dd><code title=attr-source-src><a href=#attr-source-src>src</a></code></dd> <dd><code title=attr-source-type><a href=#attr-source-type>type</a></code></dd> <dd><code title=attr-source-media><a href=#attr-source-media>media</a></code></dd> - <dd><code title=attr-source-pixelratio><a href=#attr-source-pixelratio>pixelratio</a></code></dd> <dt>DOM interface:</dt> <dd> <pre class=idl>interface <dfn id=htmlsourceelement>HTMLSourceElement</dfn> : <a href=#htmlelement>HTMLElement</a> { attribute DOMString <a href=#dom-source-src title=dom-source-src>src</a>; attribute DOMString <a href=#dom-source-type title=dom-source-type>type</a>; attribute DOMString <a href=#dom-source-media title=dom-source-media>media</a>; - attribute float <a href=#dom-source-pixelratio title=dom-source-pixelRatio>pixelRatio</a>; };</pre> </dd> </dl><p>The <code><a href=#the-source-element>source</a></code> element allows authors to specify @@ -13758,21 +13726,7 @@ attribute gives the intended media type of the <a href=#media-resource>media resource</a>, to help the user agent determine if this <a href=#media-resource>media resource</a> is useful to the user before fetching - it. Its value must be a valid <a href=#mq>media query</a>. <a href=#references>[MQ]</a><p>The <dfn id=attr-source-pixelratio title=attr-source-pixelratio><code>pixelratio</code></dfn> - attribute allows the author to specify the pixel ratio of anamorphic - <a href=#media-resource title="media resource">media resources</a> that do not - self-describe their <a href=#concept-video-adjusted-ratio title=concept-video-adjusted-ratio>pixel - ratio</a>. The attribute value, if specified, must be a - <a href=#valid-floating-point-number>valid floating point number</a> greater than zero 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=#dom-source-pixelratio>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 <a href=#concept-video-intrinsic-width title=concept-video-intrinsic-width>intrinsic width</a> of the - video at all; the intrinsic dimensions and the <a href=#concept-video-pixel-ratio title=concept-video-pixel-ratio>pixel ratio</a> of the video - are honoured.<p>If a <code><a href=#the-source-element>source</a></code> element is inserted into a <a href=#media-element>media + it. Its value must be a valid <a href=#mq>media query</a>. <a href=#references>[MQ]</a><p>If a <code><a href=#the-source-element>source</a></code> element is inserted into a <a href=#media-element>media element</a> that is already in a document and whose <code title=dom-media-networkState><a href=#dom-media-networkstate>networkState</a></code> is in the <code title=dom-media-NETWORK_EMPTY><a href=#dom-media-network_empty>NETWORK_EMPTY</a></code> state, the user agent must <a href=#queue-a-task>queue a task</a> that implicitly invokes the <code title=dom-media-load><a href=#dom-media-load>load()</a></code> method on the <a href=#media-element>media @@ -13780,9 +13734,7 @@ source</a> for this task is the <a href=#media-element>media element</a>'s own <a href=#media-element-new-resource-task-source>media element new resource task source</a>.<p>The DOM attributes <dfn id=dom-source-src title=dom-source-src><code>src</code></dfn>, <dfn id=dom-source-type title=dom-source-type><code>type</code></dfn>, and <dfn id=dom-source-media title=dom-source-media><code>media</code></dfn> must <a href=#reflect>reflect</a> the respective content attributes of the same - name.<p>The DOM attribute <dfn id=dom-source-pixelratio title=dom-source-pixelRatio><code>pixelRatio</code></dfn> must - <a href=#reflect>reflect</a> the <code title=attr-source-pixelratio><a href=#attr-source-pixelratio>pixelratio</a></code> content - attribute.<h4 id=media-elements><span class=secno>4.8.10 </span>Media elements</h4><p><dfn id=media-element title="media element">Media elements</dfn> implement the + name.<h4 id=media-elements><span class=secno>4.8.10 </span>Media elements</h4><p><dfn id=media-element title="media element">Media elements</dfn> implement the following interface:<pre class=idl>interface <dfn id=htmlmediaelement>HTMLMediaElement</dfn> : <a href=#htmlelement>HTMLElement</a> { // error state @@ -13933,15 +13885,10 @@ name.<p>The <dfn id=dom-media-currentsrc title=dom-media-currentSrc><code>currentSrc</code></dfn> DOM attribute is initially the empty string. Its value is changed by the algorithm for the <code title=dom-media-load><a href=#dom-media-load>load()</a></code> method - defined below.<p>The <dfn id=pixel-ratio-override>pixel ratio override</dfn> of a <a href=#media-element>media - element</a> is initially <i>none</i>. Its value is changed by the - algorithm for the <code title=dom-media-load><a href=#dom-media-load>load()</a></code> method defined below.<p>To <dfn id=generate-the-list-of-potential-media-resources>generate the list of potential media resources</dfn> for a <a href=#media-element>media element</a>, a user agent must use the following - steps. These steps return a list of items, each consisting of an - <a href=#absolute-url>absolute URL</a> giving a resource's address, and the - resource's pixel ratio override (either a number or - <i>none</i>).<ol><li> + steps. These steps return a list of <a href=#absolute-url title="absolute + URL">absolute URLs</a> giving a resource's address.<ol><li> <p>If the <a href=#media-element>media element</a> has a <code title=attr-media-src><a href=#attr-media-src>src</a></code> attribute, then run these substeps:</p> @@ -13950,9 +13897,8 @@ <a href=#url>URL</a> given in that attribute.</p> <li><p>If that is successful, then return a list consisting of - only one entry, with the resulting <a href=#absolute-url>absolute URL</a> as - the resource's address, and with the resource's pixel ratio - override being <i>none</i>.</li> + only one entry, the resulting <a href=#absolute-url>absolute URL</a> as the + resource's address.</li> <li><p>Otherwise, return the empty list.</li> @@ -13975,13 +13921,6 @@ <li><p><i>Loop</i>: this is the start of the loop that looks at the <code><a href=#the-source-element>source</a></code> elements.</li> - <li><p>If <var title="">candidate</var> has a <code title=attr-source-pixelratio><a href=#attr-source-pixelratio>pixelratio</a></code> attribute, and the - result of applying the <a href=#rules-for-parsing-floating-point-number-values>rules for parsing floating point - number values</a> to the value of that attribute is a number - greater than zero, then let the <var title="">candidate pixel ratio - override</var> be that result. Otherwise, let it be - <i>none</i>.</li> - <li> <p>If all the following conditions are true:</p> @@ -14003,11 +13942,9 @@ processed according to the rules for <a href=#mq>media queries</a>, matches the current environment. <a href=#references>[MQ]</a></li> - </ul><p>...then append an item to the <var title="">result</var> list - consisting of the <a href=#absolute-url>absolute URL</a> resulting from <a href=#resolve-a-url title="resolve a url">resolving</a> the <a href=#url>URL</a> given - in that <var title="">candidate</var> element's <code title=attr-source-src><a href=#attr-source-src>src</a></code> attribute as the resource's - address, and the <var title="">candidate pixel ratio - override</var> as the resource's pixel ratio override.</p> + </ul><p>...then append the <a href=#absolute-url>absolute URL</a> resulting from + <a href=#resolve-a-url title="resolve a url">resolving</a> the <a href=#url>URL</a> + given in that <var title="">candidate</var> element's <code title=attr-source-src><a href=#attr-source-src>src</a></code> attribute to the <var title="">result</var> list.</p> </li> @@ -14214,10 +14151,6 @@ item in <var title="">candidates</var>. This is now the element's <a href=#media-resource>media resource</a>.</li> - <li><p>Set the <a href=#media-element>media element</a>'s <a href=#pixel-ratio-override>pixel ratio - override</a> to the pixel ratio override given for the current - item in <var title="">candidates</var>.</li> - <li><p>Set the <code title=dom-media-currentSrc><a href=#dom-media-currentsrc>currentSrc</a></code> attribute to the <a href=#absolute-url>absolute URL</a> of the <var title="">current media resource</var>.</li> @@ -17319,11 +17252,9 @@ <var title="">specified width</var> / <var title="">target ratio</var> ≤ <var title="">specified height</var> + 0.5</span></li> - </ul><p>The <var title="">target ratio</var> is, in the - <code><a href=#video>video</a></code> element, the same as the <a href=#concept-video-adjusted-ratio title=concept-video-adjusted-ratio>adjusted ratio</a>, 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><a href=#attr-dim-width>width</a></code> and <code title=attr-dim-height><a href=#attr-dim-height>height</a></code> attributes respectively.<p>The two attributes must be omitted if the resource in question + </ul><p>The <var title="">target ratio</var> is 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><a href=#attr-dim-width>width</a></code> and <code title=attr-dim-height><a href=#attr-dim-height>height</a></code> attributes respectively.<p>The two attributes must be omitted if the resource in question does not have both an intrinsic width and an intrinsic height.<p class=note>Basically, the dimension attributes can't be used to stretch the image.<p>To parse the attributes, user agents must use the <a href=#rules-for-parsing-dimension-values>rules for parsing dimension values</a>. This will return either an integer
Received on Monday, 1 December 2008 10:18:44 UTC