[whatwg] Dimension attributes and video

Boris Zbarsky bzbarsky at MIT.EDU
Wed Feb 25 18:10:37 PST 2009


Ian Hickson wrote:
> On Wed, 25 Feb 2009, Boris Zbarsky wrote:
>> I was just trying to figure out what the width and height attributes are
>> supposed to do on <video>.  Section 4.8.7 of the spec lists these attributes
>> as being possible content attributes, but that list doesn't link to
>> definitions of the attributes.
> 
> With the links functioning, does it make sense?

Better, yes.  It's not obvious what's going on, still, because when I 
click the "width" link my browser shows the relevant part of the 
multipage spec, with the window top positioned at about the heading for 
section 4.8.16 (because the window is taller than all of section 
4.8.17).  Using some styling to highlight the target would be awfully 
nice.  ;)

>> This would all be more readable if there were a section for each 
>> attribute involved (or a single section for width+height if that makes 
>> more sense) that somehow set off the attribute name and then what it 
>> does.
> 
> Yeah, I've considered doing that. The problem is that it doesn't always 
> really fit with the conforming criteria. Sometimes I have to define an 
> attribute two or three times with different requirements based on the 
> value of another attribute, for example.

Hmm.  I'd say do it for easy cases, then think about the hard ones, 
honestly....  But ok.

>> Past that, the "dimension attributes" section (4.8.17) doesn't tell me, as a
>> UA implementor, much about what they do.  It's not even clear whether the
>> inequalities given are authoring requirements or implementation ones (though I
>> assume the former).
> 
> Yes, these are authoring constraints. It's not clear to me what the 
> constraints would mean for implementations.

Nor to me.  ;)

> I've tried to make it clearer. Is that better?

I'm not sure what you've changed, honestly.  It looks about the same to 
me...  It might make sense to say something like "for the document to be 
conforming" or something for most of this section?  Or otherwise 
separate the author and UA requirements here.

>> It's not clear why those requirements are there at all: why shouldn't 
>> one stretch "the image" [sic] using these attributes?  That's commonly 
>> done for <img>!
> 
> The idea is to reduce the use of presentational images in HTML.

OK, fair enough.

>> But worst of all, the only mention of what a UA is to do with these 
>> attributes is "give the dimensions of the visual content of the element 
>> (the width and height respectively, relative to the nominal direction of 
>> the output medium), in CSS pixels."  That doesn't tell me much.
> 
> I've added a link from that section to the rendering section which 
> actually defines what the user agent is expected to do with the 
> attributes. I hope that helps.

Yep.  That's the part I'd really wanted when I started looking at this 
stuff.  Much better!

-Boris



More information about the whatwg mailing list