[whatwg] question on @width and @height attributes on <video>

Hi all,

I am staring at the @width and @height attributes of the <video>
element, because I have just noticed that the implementation of IE9
doesn't respect percentage values in there. I remembered Hixie saying
that if you gave them a value that included "px", that's strictly
speaking not valid, since the value is a unsigned long but a browser
will just drop the "px" and interpret it correctly.

I am now wondering if a percentage value is correct, since the percent
sign isn't part of unsigned long either[1]. I have followed the links
through to the parsing part for dimension values, which I think
includes http://www.whatwg.org/specs/web-apps/current-work/multipage/common-microsyntaxes.html#rules-for-parsing-dimension-values
. So, IIUC, percentage values are correct. But that doesn't seem to
agree with "unsigned long".

Why do we have this requirement of @width and @height being unsigned
long and not DOMString as for iframe, embed and object? <img> seems to
share the same fate, such that I am confused whether a percentage
value on @width and @height attributes on <img> are not allowed any
more either.

Essentially, I am wondering if IE has implemented this correctly or
whether this is still a bug they will have to fix, and whether
percentages are indeed correct withing the given specification.

Thanks,
Silvia.

[1]http://www.w3.org/TR/2008/WD-WebIDL-20080829/#idl-unsigned-long
Cheers,
Silvia.

Received on Sunday, 7 November 2010 23:27:30 UTC