- From: Simon Pieters <simonp@opera.com>
- Date: Thu, 15 Oct 2009 14:13:26 +0200
- To: "Alexandre Alapetite" <alexandre@alapetite.fr>, public-html@w3.org
On Thu, 15 Oct 2009 13:31:52 +0200, Alexandre Alapetite
<alexandre@alapetite.fr> 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"):
> http://www.whatwg.org/specs/web-apps/current-work/multipage/the-map-element.html#attr-dim-width
>
> 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="http://example.net/" width="50%"
> height="150">
> </object>
>
> Test:
> http://alexandre.alapetite.fr/divers/vrac/20091015-object-width-percent.html
>
> 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 1.5.0.12; 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:
>
> http://validator.nu/?doc=http%3A%2F%2Falexandre.alapetite.fr%2Fdivers%2Fvrac%2F20091015-object-width-percent.html
> http://validator.w3.org/check?uri=http%3A%2F%2Falexandre.alapetite.fr%2Fdivers%2Fvrac%2F20091015-object-width-percent.html
>
> 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."
http://www.whatwg.org/specs/web-apps/current-work/#dimRendering
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."
http://www.whatwg.org/specs/web-apps/current-work/#attr-dim-width
--
Simon Pieters
Opera Software
Received on Thursday, 15 October 2009 12:14:08 UTC