Currently nsFrame::DestroyFrom calls nsSVGEffects::InvalidateDirectRenderingObservers. This seems wrong since we won't invalidate observers of ancestor frames. It seems to me that DestroyFrom should actually be calling nsSVGEffects::InvalidateRenderingObservers. It should be easy to make a test for this.
nsImageLoadingContent::OnStopDecode seems to have the same problem.
Summary: nsFrame::DestroyFrom should call nsSVGEffects::InvalidateRenderingObservers → Audit nsSVGEffects::InvalidateRenderingObservers callers
Under what circumstances should InvalidateDirectRenderingObservers be called?
When we don't need to notify observers of ancestor frames. For example, for changes to an nsSVGMarkerFrame, since observers of the nsSVGMarkerFrame's ancestors aren't affected by changes to the marker. Or if ancestors are affected by the change, but we know that they will be notified in some other way (for example nsFrame::InvalidateInternal doing the notification on each ancestor as it walks up the tree). Come to think of it, that probably covers the nsFrame::DestroyFrom call (would be good to have a comment there explaining that though). And maybe the nsImageLoadingContent::OnStopDecode call is redundant then, since presumably we'll be calling nsFrame::InvalidateInternal for each frame along the parent chain at some point for the image load?
You need to log in before you can comment on or make changes to this bug.