Open
Bug 827342
Opened 12 years ago
Updated 2 years ago
Jpeg images as css background do not render until loading is completed
Categories
(Core :: Layout: Images, Video, and HTML Frames, enhancement)
Core
Layout: Images, Video, and HTML Frames
Tracking
()
NEW
People
(Reporter: striptm, Unassigned)
References
()
Details
Attachments
(3 files, 1 obsolete file)
As indicated in the article: http , the images included as css background are not displayed until the download is completely finished. The attended result, specially with jpeg progressive, is to be displayed at the same time as it is being downloaded, as with the <img/> tag.
Reporter | ||
Updated•12 years ago
|
That's ... odd. It looks like the notification stuff in ImageLoader is correct.
Reporter | ||
Comment 2•12 years ago
|
||
Reporter | ||
Comment 3•12 years ago
|
||
Reporter | ||
Comment 4•12 years ago
|
||
Comment 5•12 years ago
|
||
I may need a slower net connection to reproduce this. :(
Attachment #698753 -
Attachment is obsolete: true
Reporter | ||
Comment 6•12 years ago
|
||
I'm adding a small test case. I've tested in linux with: iprelay -b2500 8000:localhost:80 In Firefox you can see that the <img/> are displayed at the same time as the are being downloaded, and the backgrounds appear only when finished. In webkit, the result is the same.
Comment 7•12 years ago
|
||
nsImageRenderer::PrepareImage returns false if !IsComplete(). I would assume that's what causes the behavior. If so, that dates back to a STATUS_FRAME_COMPLETE that was added in cvs rev 3.172 of nsCSSRendering.cpp: 3.172 <kmcclusk@netscape.com> 2002-03-22 20:33 suppress the painting of partially decoded background images bug 129908; r=pavlov sr=attinasi a=asa Brings back memories... ;) In any case, it's not clear to me what would break, if anything, if this check were now removed.
From bug 129908 comment 0: "Since we do not incrementally display background images as image data arrives we should not display partially decoded background images when painting damaged areas, We should wait until they are fully loaded before painting them." But we should be incrementally displaying them now given the notifications we have wired up.
(So it seems like there is no reason to keep that bug's behavior).
Well, it might still be preferable to have background images appear all at once rather than in horizontal slices; especially for tiled images, that might be a poor user experience (though we're probably not the best people to answer that). Progressive JPEGs might be different from other incremental loading of images (since we're dealing with the full frame but at lower quality).
Updated•6 years ago
|
Product: Core → Core Graveyard
Updated•6 years ago
|
Product: Core Graveyard → Core
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•