Closed Bug 40388 Opened 25 years ago Closed 22 years ago

Hitting the Stop button on a page with animated images deletes the images

Categories

(Core :: Layout, defect, P3)

defect

Tracking

()

RESOLVED WORKSFORME
Future

People

(Reporter: sfraser_bugs, Assigned: dcone)

References

()

Details

(Keywords: polish, relnote, Whiteboard: [nsbeta3-] relnote-user)

Load the URL above, and hit the Stop button (even though the button looks disabled, it works). Note that the animation stops. Now refresh the window. Note that the animated images have all disappeared. When you hit the Stop button, nsDocShell::Stop is called, and this end up calling nsFrameImageLoader::StopImageLoad(), which removes all the images. We need to be able to stop animations, but keep the images around.
should the images be left in their current state, or should each one be reset to its first frame?
I'm able to reproduce the problem on WINNT. Setting platform to All.
OS: Mac System 8.5 → All
I found the problem. The nsPresContext StartLoadImage looks at the mStopped and returns without an image. The StartLoadImage is used in nsCSSRendering::PaintBackground to get the image to tile when painting background images. If I comment out the code to return when mStopped is set the page starts animating again after you resize the window. This is compatible with how Nav 4.x behaves. I.E 5 Does not restart the animation when resized which seems more reasonable. NS_IMETHODIMP nsPresContext::StartLoadImage(const nsString& aURL, const nscolor* aBackgroundColor, const nsSize* aDesiredSize, nsIFrame* aTargetFrame, nsIFrameImageLoaderCB aCallBack, void* aClosure, nsIFrameImageLoader** aResult) { /* if (mStopped) { if (aResult) { *aResult = nsnull; } return NS_OK; } */ I think the calling code in nsCSSRendering should use some other mechanism for getting the image to background tile or pass a flag to nsPresContext::StartLoadImage to indicate that it wants the image returned even if it stopped. Re-assigning to dcone to determine what the best solution is.
Assignee: kmcclusk → dcone
Status: NEW → ASSIGNED
Target Milestone: --- → M17
*** Bug 38406 has been marked as a duplicate of this bug. ***
Whiteboard: Have fix in tree
This bug has been marked future because we have determined that it is not critical for netscape 6.0. If you feel this is an error, or if it blocks your work in some way -- please attach your concern to the bug for reconsideration.
Target Milestone: M17 → Future
Whoah. This is a serious issue, and I really think we should fix this. Users don't expect all their animated GIFs to disappear when they hit the Stop button. Nominating for beta3.
The only reason this made the future list was because I was told to get my list down to 5-7 bugs.. this one is about 10 on my list. If I fix those bugs this will be back on beta3. I do know how to correct this on.. but there could be some API changes if after testing some other loading problems crop up.
Whiteboard: Have fix in tree
Marking nsbeta3-
Whiteboard: [nsbeta3-]
Added relnote keyword
Keywords: relnote
Whiteboard: [nsbeta3-] → [nsbeta3-] relnote-user
Well, currently (build 2001043022) the Stop button doesn't do anything to animated gifs anymore (neither does Esc). Very annoying. Is a bug filed for that yet?
reinout@cs.vu.nl: yes, see bug 70030, "Cannot stop animation with webNavigation.stop".
Depends on: 70030
Dupe of Bug 64522? window.stop() makes backround/animated images not paint
Blocks: 119597
In ns4, the stop button on a page with anim-gifs remained active as long as one of the images was still animating. If you hit stop, they all stopped animating, and stayed on whatever frame they were at (they didn't disappear, they just stopped moving.) This was a very nice feature. It meant I had the ability to stop thing from blinking at me when I found them distracting, without having to turn off anim-gifs globally (which can render some pages unreadable, e.g. when there's a blank first frame.) Maybe bug 70030 is relevant to this, I can't tell.
The url is not valid anylonger. But on pages with my animated GIFS.. I dont get this problem. Marking WFM.
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.