Closed Bug 432685 Opened 16 years ago Closed 13 years ago

Image loading is missing some transfer status notifications

Categories

(Core :: Graphics: ImageLib, defect)

defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: mayhemer, Unassigned)

References

Details

Image request proxies and Image requests don't forward STATUS_RECEIVING_FROM status from the transfer. This makes some other code like security UI more complicated and makes it handle images differently from other requests, see bug 135007).

There is also missing OnStartRequest notification from image request while loading image from cache w/o validation needed (e.g. when an image is present more then ones on a page).

We should fix or at least discuss this issue.

This bug probably blocks bug 59637 and bug 62178.
Adding dependency to bug 135007, this is where we would benefit from the notifications.

(Bug 62178 will probably have to be fixed in a way that allows us to ignore web progress notifications altogether, but I'm not sure yet)
Blocks: 135007
When this bug is fixed following changes introduced in bug 135007 have to be fixed:

From hunk https://bugzilla.mozilla.org/attachment.cgi?id=322109&action=diff#security/manager/boot/src/nsSecureBrowserUIImpl.cpp_sec4 remove code related to isImageRequest variable; it is used to emulate transfer notification in the following hunk, see next note.

Revert hunk https://bugzilla.mozilla.org/attachment.cgi?id=322109&action=diff#security/manager/boot/src/nsSecureBrowserUIImpl.cpp_sec5 that emulates the transfer notification for image requests.
Honza, can this be marked fixed, or is there remaining work to be done?
(In reply to comment #3)
> Honza, can this be marked fixed, or is there remaining work to be done?
> 

I believe there is still a work to do. And also I believe it is going to be a longer discussion if there should be larger changes to the image lib code. Let's leave this open, until it has been fixed in another bug.

CC'ing Michal because he will work on probably related bugs around sharing of cache entries by multiple http channels that could potentially replace some of imgProxy code of the image lib.
(In reply to comment #4)
> I believe there is still a work to do. And also I believe it is going to be a
> longer discussion if there should be larger changes to the image lib code.
> Let's leave this open, until it has been fixed in another bug.

Can you summarize what work is left to do?
I don't remember exactly, it is a long time ago I was working on this. But what is missing:

nsHTTPChannel sends notification about the progress, like 'resolving host', 'connecting', 'transferring'. These progress notifications are not propagated to upper levels through img proxies.

When an image is more then ones on a same page for all subsequent img proxies don't send OnStartRequest notifications. It is violation of that interface definition. Not sure if an image on two separate pages behaves the same way.
Hey, what should we do about this?
(In reply to Honza Bambas (:mayhemer) from comment #6)
> nsHTTPChannel sends notification about the progress, like 'resolving host',
> 'connecting', 'transferring'. These progress notifications are not
> propagated to upper levels through img proxies.

I don't think we're going to fix this, since we're probably going to make imgIRequest not be an nsIRequest in the long term.

> When an image is more then ones on a same page for all subsequent img
> proxies don't send OnStartRequest notifications. It is violation of that
> interface definition. Not sure if an image on two separate pages behaves the
> same way.

This should not be the case any more, at least as of bug 572520.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → WONTFIX
(In reply to Joe Drew (:JOEDREW!) from comment #8)
> [W]e're probably going to make
> imgIRequest not be an nsIRequest in the long term.

Is there some place that this is being discussed? I would like to learn more about it.
You need to log in before you can comment on or make changes to this bug.