From 53cf12d6d808c80c4ce240cbbf8d29344c8ce644 Mon Sep 17 00:00:00 2001 From: janekptacijarabaci Date: Thu, 12 Jul 2018 18:56:16 +0200 Subject: Bug 1346501. Don't mark every image as visible when a frame is created for it --- layout/svg/nsSVGImageFrame.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'layout/svg/nsSVGImageFrame.cpp') diff --git a/layout/svg/nsSVGImageFrame.cpp b/layout/svg/nsSVGImageFrame.cpp index c0a7f9419..2d6f75d26 100644 --- a/layout/svg/nsSVGImageFrame.cpp +++ b/layout/svg/nsSVGImageFrame.cpp @@ -159,6 +159,12 @@ nsSVGImageFrame::Init(nsIContent* aContent, if (GetStateBits() & NS_FRAME_IS_NONDISPLAY) { // Non-display frames are likely to be patterns, masks or the like. // Treat them as always visible. + // This call must happen before the FrameCreated. This is because the + // primary frame pointer on our content node isn't set until after this + // function ends, so there is no way for the resulting OnVisibilityChange + // notification to get a frame. FrameCreated has a workaround for this in + // that it passes our frame around so it can be accessed. OnVisibilityChange + // doesn't have that workaround. IncApproximateVisibleCount(); } -- cgit v1.2.3