[whatwg] Change request: rules for pixel ratio

Philip Jägenstedt philipj at opera.com
Thu Jun 12 02:52:00 PDT 2008


I see that I made a rather serious typo in my original message. I meant
to ask

Should this be taken to mean that the pixelratio attribute is defaulted
to 1.0 even for media resources that *DO* self-describe their pixel
ratio?

Still, my meaning seems to have gotten across and the new phrasing is
much better.

Philip

On Thu, 2008-06-12 at 09:18 +0000, Ian Hickson wrote:
> On Tue, 10 Jun 2008, Philip Jgenstedt 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 Jgenstedt 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.   `._.-(,_..'--(,_..'`-.;.'
-- 
Philip Jägenstedt
Opera Software




More information about the whatwg mailing list