mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-21 09:15:35 +00:00
Bug 1242256 - ensure images in patterns and masks animate properly. r=jwatt,seth
This commit is contained in:
parent
e11d308ed2
commit
968a509251
@ -157,6 +157,12 @@ nsSVGImageFrame::Init(nsIContent* aContent,
|
||||
|
||||
nsSVGImageFrameBase::Init(aContent, aParent, aPrevInFlow);
|
||||
|
||||
if (GetStateBits() & NS_FRAME_IS_NONDISPLAY) {
|
||||
// Non-display frames are likely to be patterns, masks or the like.
|
||||
// Treat them as always visible.
|
||||
IncApproximateVisibleCount();
|
||||
}
|
||||
|
||||
mListener = new nsSVGImageListener(this);
|
||||
nsCOMPtr<nsIImageLoadingContent> imageLoader = do_QueryInterface(mContent);
|
||||
if (!imageLoader) {
|
||||
@ -173,6 +179,10 @@ nsSVGImageFrame::Init(nsIContent* aContent,
|
||||
/* virtual */ void
|
||||
nsSVGImageFrame::DestroyFrom(nsIFrame* aDestructRoot)
|
||||
{
|
||||
if (GetStateBits() & NS_FRAME_IS_NONDISPLAY) {
|
||||
DecApproximateVisibleCount();
|
||||
}
|
||||
|
||||
if (mReflowCallbackPosted) {
|
||||
PresContext()->PresShell()->CancelReflowCallback(this);
|
||||
mReflowCallbackPosted = false;
|
||||
|
Loading…
Reference in New Issue
Block a user