Re: HTML5 object@width %-unit

On Thu, 15 Oct 2009 13:31:52 +0200, Alexandre Alapetite  
<> wrote:

> Hello,
> In the current HTML5 draft, the object element has a @width attribute
> that accepts a value expressed in CSS pixels ("the attributes, if
> specified, must have values that are valid non-negative integers"):
> However, I have noticed that on almost all browsers I could test, the
> object @width attribute also accepts a value given in a %-unit. For
> instance.
>  <object type="text/html" data="" width="50%"  
> height="150">
>  </object>
> Test:
> I have tested the above code successfully in the following browsers:
> - Windows Vista: Opera 10.0; Firefox 3.5.3; Chrome 4.0; Internet
> Explorer 8 (32-bit and 64-bit);
> - Windows XP: Opera 9.02; Firefox; Chrome 3.0; Internet
> Explorer 5.5, 6, 7; Safari 3.2.3;
> However, it does not seem to be understood by Netscape 6.2.
> I think it is noticeable that nearly all current browsers accept a
> %-value in the @width attribute of an object, while this is not
> accepted by HTML5:
> I do not say that this is a bug in the HTML5 draft, or in browsers
> implementation; it was just to catch your attention on this possible
> contradiction.

The relevant bit for implementors is:

"The width and height attributes on applet, embed, iframe, img, object or  
video elements, and input elements with a type attribute in the Image  
Button state, map to the dimension properties 'width' and 'height' on the  
element respectively."

The relevant authoring requirement for this case is:

"The two attributes must be omitted if the resource in question does not  
have both an intrinsic width and an intrinsic height."

Simon Pieters
Opera Software

Received on Thursday, 15 October 2009 12:14:08 UTC