Closed Bug 191166 Opened 23 years ago Closed 23 years ago

animated gifs animate in Composer when they shouldn't

Categories

(Core :: DOM: Editor, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: Brade, Assigned: Brade)

References

Details

(Keywords: regression)

Attachments

(1 file, 2 obsolete files)

animated gifs currently can animate in Composer when they shouldn't (except in the image preview dialog?). In editorshell, we made an explicit call so gifs wouldn't animate. That call is missing in nsEditingSession.cpp
smontagu: Remember your "trick" how to did turn-off GIF animation for PrintPreview ? WOuld the same solution work for this bug, too ?
That "trick" was dependent on print and print preview having their own subclasses of nsPresContext in which we could override SetImageAnimationMode() and GetImageAnimationMode(). As far as I know Composer uses the base nsPresContext so that wouldn't work.
... and we can't subclass and/or hack the plain version and add a flag which says "don't animate", right (AFAIK we still have the bug to disable image animations on demand(=prefs) open (=not fixed since four years)) ?
the fix for editor is to make this call: presContext->SetImageAnimationMode(imgIContainer::kDontAnimMode);
Status: NEW → ASSIGNED
Re comment 4: that was the original fix for print preview (in bug 2586), but there were cases where the image animation mode was apparently getting reset (see bug 182259 and bug 133808), so proceed with caution :-) Re comment 3: the pref to stop image animation worksforme.
Blocks: 119597
Comment on attachment 113737 [details] [diff] [review] patch that disables animated gifs as editorshell used to (but with more error checking) btw, the printf cleanup was just to remove warnings
Comment on attachment 113737 [details] [diff] [review] patch that disables animated gifs as editorshell used to (but with more error checking) @@ -893,6 +895,20 @@ >+ // Disable animation of GIFs in this document: if the api is generic and applies to MNG and ICO then your comment shouldn't explicitly reference GIF :)
Attachment #113737 - Flags: review+
Comment on attachment 113737 [details] [diff] [review] patch that disables animated gifs as editorshell used to (but with more error checking) The changes look ok to me, but the fact that it is in EndDocumentLoad() means that content/iframes that are already loaded and have their edit bit flipped will still have animations right? Do we need to put this in SetupEditorOnWindow? Also should this be something that is configureable by the embeddor?
Attachment #113737 - Attachment is obsolete: true
Attachment #113812 - Flags: superreview?(kin)
Attachment #113812 - Flags: review?(timeless)
I think we have to turn off meta-refresh, JS, and maybe animaged GIFs for every subframe in composer, whether it has been made editable or not. The reason is that JS or a meta-refresh running in a non-editable subframe might cause a URL to load in "top", blowing away all the other frames.
Attachment #113812 - Attachment is obsolete: true
Attachment #114235 - Flags: review?(sfraser)
Attachment #113812 - Flags: superreview?(kin)
Attachment #113812 - Flags: review?(timeless)
Comment on attachment 114235 [details] [diff] [review] updated patch which doesn't move refreshuri Please diff with enough context to show the function names, if possible.
Attachment #114235 - Flags: superreview?(kin)
Attachment #114235 - Flags: review?(sfraser)
Attachment #114235 - Flags: review+
Comment on attachment 114235 [details] [diff] [review] updated patch which doesn't move refreshuri sr=kin@netscape.com
Attachment #114235 - Flags: superreview?(kin) → superreview+
this is fixed
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: