Closed Bug 268985 Opened 20 years ago Closed 20 years ago

Pressing stop does not always stop image download

Categories

(Core :: Graphics: ImageLib, defect)

x86
All
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.8beta1

People

(Reporter: csthomas, Assigned: bzbarsky)

References

Details

Attachments

(2 files)

Sometimes after pressing the stop button, images continue to download, even
though the throbber stops.  Clicking the "go offline" button does stop the download.
sounds more like an imagelib bug to me.  probably some loads are not being added
to a loadgroup or something.

-> imagelib
Assignee: darin → pavlov
Component: Networking → ImageLib
QA Contact: benc
Ctho, what are the steps to reproduce?  "It happens sometimes" with no
indication of when is not so helpful....
(In reply to comment #2)
> Ctho, what are the steps to reproduce?  "It happens sometimes" with no
> indication of when is not so helpful....

Visit URL, wait for a few images (but not all) to load, hit stop.  The throbber
stops, the images keep loading.  Note that the "thumbnails" at the top are the
same images as the large versions, with 'width=80'.

The thumbnails may stop painting until you scroll (this behavior doesn't seem
consistent), but if you scroll down (or look at the scrollbar widget) you'll
note that images continue to load.  The thumbnails for the images that are
downloaded after you hit stop get replaced with the upper left corner of the
image, as each one downloads (this is strange behavior - I would expect nothing,
or the whole image)
Whiteboard: URL includes nudity (NOT work-safe)
Whiteboard: URL includes nudity (NOT work-safe)
Yeah I see continues loading and replacing of the images after pressing stop.
So the basic problem is the code at
http://lxr.mozilla.org/seamonkey/source/modules/libpr0n/src/imgLoader.cpp#528

This doesn't add the imgRequestProxy to the loadgroup if we already have a
cached imgRequest for it.  The problem is that the cached imgRequest may not be
done loading yet.  We should only skip adding to the loadgroup when
OnStopRequest has already fired on that request.

Note that fixing this part will fix the visual manifestation of the bug.  It may
not fix the underlying load continuing (though if the loadgroup cancels with
NS_BINDING_ABORTED or some other error code, it should).
Attached patch Proposed patchSplinter Review
Comment on attachment 165650 [details] [diff] [review]
Proposed patch

The comment explains why this change is the right thing...
Attachment #165650 - Flags: superreview?(darin)
Attachment #165650 - Flags: review?(pavlov)
Comment on attachment 165650 [details] [diff] [review]
Proposed patch

sr=darin

i'm a little concerned about the additional webprogresslistener traffic, but
that should hopefully not be too much of a problem.  we could set the
LOAD_BACKGROUND load flag on the subsequent proxy requests if it is.
Attachment #165650 - Flags: superreview?(darin) → superreview+
Stuart says this will rebreak the bug that this code was checked in for, but I
don't see how, and the code as written is clearly wrong... jst, you've poked at
this stuff too.  Do you have any idea what's going on here?
*** Bug 271987 has been marked as a duplicate of this bug. ***
(In reply to comment #11)
> *** Bug 271987 has been marked as a duplicate of this bug. ***

a extra testcase ;-)

*** Bug 245210 has been marked as a duplicate of this bug. ***
Flags: blocking1.8b?
Flags: blocking1.8b? → blocking1.8b-
Attachment #165650 - Flags: review?(pavlov) → review+
Assignee: pavlov → bzbarsky
Target Milestone: --- → mozilla1.8beta
Fixed
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Blocks: 281892
I believe this bug caused bug 281892. At least backing this patch out fixes the
issue there.
No longer blocks: 281892
Depends on: 281892
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: