diff options
author | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-07-12 18:56:16 +0200 |
---|---|---|
committer | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-07-12 18:56:16 +0200 |
commit | af006875d48e660a3d0968d520cf531d878022a1 (patch) | |
tree | 4d187651b4548fa1a97065a732a20eec0fe5e473 /layout/svg | |
parent | e3d4080b9af8fb7bee43f64c557a57bafaea15ef (diff) | |
download | aura-central-af006875d48e660a3d0968d520cf531d878022a1.tar.gz |
Bug 1346501. Don't mark every image as visible when a frame is created for it
Diffstat (limited to 'layout/svg')
-rw-r--r-- | layout/svg/SVGFEImageFrame.cpp | 6 | ||||
-rw-r--r-- | layout/svg/nsSVGImageFrame.cpp | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/layout/svg/SVGFEImageFrame.cpp b/layout/svg/SVGFEImageFrame.cpp index 185096a93..b1f98c421 100644 --- a/layout/svg/SVGFEImageFrame.cpp +++ b/layout/svg/SVGFEImageFrame.cpp @@ -107,6 +107,12 @@ SVGFEImageFrame::Init(nsIContent* aContent, nsFrame::Init(aContent, aParent, aPrevInFlow); // We assume that feImage's are 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(); nsCOMPtr<nsIImageLoadingContent> imageLoader = 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(); } |