layout of image alt text differs before and after image loading

RESOLVED WONTFIX

Status

()

Core
Layout: Images
RESOLVED WONTFIX
14 years ago
14 years ago

People

(Reporter: Jamie Zawinski, Assigned: Jim Dunn)

Tracking

Trunk
x86
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Reporter)

Description

14 years ago
User-Agent:       
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040116

When a placeholder for an image is shown, its alt text is printed
inside the image box, word-wrapped.

If an image's width is known but not its height, the image is
assumed to be square.

Should that image then fail to load properly, one of two things
happens:

   - if both the width and height of the image were known,
     the display stays the same as before loading: there's an
     image box, with some text in it.

   - if both the width and height are not known, the image box
     is replaced by plain text, and the document is reflowed.

Now, I can see how an argument could be made for either of those
behaviors -- but only one of them. It should do the same thing in
both cases, whichever that is.

Here's a test case:

    Foo bar baz.
    <img src="slow.cgi" border=1 width=200 height=200
         alt="This alt tag is significantly longer than 200 pixels.">
    blat foop zorp.

    <p>
    Foo bar baz.
    <img src="slow.cgi" border=1 width=200 height=200
         alt="This_alt_tag_is_significantly_longer_than_200_pixels.">
    blat foop zorp.

    <p>
    Foo bar baz.
    <img src="slow.cgi" border=1 width=200
         alt="This_alt_tag_is_significantly_longer_than_200_pixels.">
    blat foop zorp.

The referenced "slow.cgi" is simply:

    #!/bin/sh
    sleep 5
    exit 0

During image loading, all three images lay out the same.
After image loading, the third one looks different.


Reproducible: Always
Steps to Reproduce:
(Reporter)

Comment 1

14 years ago
Created attachment 141122 [details]
what the page looks like before images have loaded
(Reporter)

Comment 2

14 years ago
Created attachment 141123 [details]
what the page looks like after images have loaded
> there's an image box, with some text in it.

That only happens in quirks mode.  In standards mode, we always just show the
text inline.  The idea is that we would like to always show the text, but that
breaks pages that expect their spacer gifs with alt text to fit in the space
they have left for the spacer gifs.  So in the one case of quirks mode and fixed
size we do the broken rendering to avoid breaking said pages....

Unfortunately, changing that behavior is not really an option as the web stands
today.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 14 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.