W3C home > Mailing lists > Public > whatwg@whatwg.org > June 2008

[whatwg] Change request: rules for pixel ratio

From: Ian Hickson <ian@hixie.ch>
Date: Thu, 12 Jun 2008 09:18:46 +0000 (UTC)
Message-ID: <Pine.LNX.4.62.0806120842320.8559@hixie.dreamhostps.com>
On Tue, 10 Jun 2008, Philip J?genstedt wrote:
> 
> http://www.w3.org/html/wg/html5/#pixelratio

Incidentally, you may prefer this version of the spec:

   http://whatwg.org/html5

It has a style sheet optimised for this specification instead of using the 
W3C style sheet. (It's otherwise identical.)


> The pixelratio attribute allows the author to specify the pixel ratio of
> anamorphic media resources that do not self-describe their pixel ratio.
> [...] The default value, if the attribute is omitted or cannot be
> parsed, is 1.0.
> 
> This seems more than strange. Should this be taken to mean that the
> pixelratio attribute is defaulted to 1.0 even for ???media resources that
>DO NOT self-describe their pixel ratio? 

Yes, but that doesn't mean what you think it means. (I've clarified this 
in the spec.)

The only way the default is used is in deciding what number to return for 
pixelRatio in the DOM when the content attribute is missing. If the 
content attribute is omitted, 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.


> It is also worth noting that when the pixel ratio is < 1.0 it will make 
> more sense for the user agent to adjust the height than the width if no 
> width/height attributes have been set. This could be pointed out in the 
> rendering section eventually.

I've allowed this explicitly now.


On Tue, 10 Jun 2008, Ralph Giles wrote:
> 
> Does this mean the implementation must retrieve the self-described pixel 
> aspect ratio from the stream and supply it as part of the DOM?

On Tue, 10 Jun 2008, Charles wrote:
> 
> Offhand, I can't think of any use cases where it'd be useful to expose 
> pixel aspect ratio.

On Wed, 11 Jun 2008, Philip J?genstedt wrote:
> 
> Exposing pixel ratio as readonly float videoPixelRatio in 
> HTMLVideoElement might be a good idea. If the media resource doesn't 
> self-describe its pixel ratio (many formats don't) it should be assumed 
> to be 1.0. I'm not convinced it is necessary as content authors who want 
> to be very explicit will probably set the pixelratio manually. Still, it 
> is trivial to expose and might make life easier for those who want this 
> information for low-level control of the video element size via the DOM.

I don't see a good reason to expose it, so I haven't added a way to do 
that.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Thursday, 12 June 2008 02:18:46 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:03 UTC