Re: [css3-flexbox] Fixing the "replaced elements may or may not be inline" issue

On Tue, 26 Jun 2012 16:50:56 +0200, Boris Zbarsky <bzbarsky@mit.edu> wrote:

> On 6/26/12 10:38 AM, Kang-Hao (Kenny) Lu wrote:
>> I had this as a separate proposal because I noticed that in Gecko's
>> quirks mode, when both 'width' and 'height' are specified, an<img>
>> rendered as replaced element even when the image fails to load. Is that
>> something required to render legacy content
>
> Yes.  It's very common in legacy content to have spacer gifs in tables  
> like so:
>
>    <img src="spacer" width="5" height="300">
>
> or whatever.  A large fraction of the time, the src is 404 (and might  
> have been 404 all along, in fact).
>
> This is very rare in standards-mode pages, which is why the "force  
> replaced element if sized" behavior is limited to quirks mode.
>
>> The Quirks Mode document doesn't seem to have this.
>
> It probably should.  ;)

If you're talking about the Living Specification [0] edited by Simon
Pieters, he tells me that this is covered in the HTML spec [1]:

| When an img element ... does not represent an image, but the element
| already has intrinsic dimensions (e.g. from the dimension attributes or
| CSS rules), and either the user agent has reason to believe that the
| image will become available and be rendered in due course or the
| Document is in quirks mode, the element is expected to be treated as a
| replaced element whose content is the text that the element represents,
| if any, optionally alongside an icon indicating that the image is being
| obtained.

0. http://dvcs.w3.org/hg/quirks-mode/raw-file/tip/Overview.html
1. http://www.w3.org/TR/html5/rendering.html#images
http://www.whatwg.org/specs/web-apps/current-work/multipage/rendering.html#images

-- 
Leif Arne Storset
Layout Developer, Opera Software
Oslo, Norway

Received on Friday, 13 July 2012 12:44:29 UTC