Bug 1516702 - Skip building nsDisplaySVGGeometry display items when they have opacity:0. r=jwatt
authorMatt Woodrow <mwoodrow@mozilla.com>
Wed, 09 Jan 2019 23:06:28 +0000
changeset 510265 0871597bc67b53a65ad1b2ca71f9503594b280cd
parent 510264 5e388e19a12668f3e066317a63c439932fab4242
child 510266 64255d8e90fe6b761a12f2406aaddb4080ff8e22
push id10547
push userffxbld-merge
push dateMon, 21 Jan 2019 13:03:58 +0000
treeherdermozilla-beta@24ec1916bffe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjwatt
bugs1516702
milestone66.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1516702 - Skip building nsDisplaySVGGeometry display items when they have opacity:0. r=jwatt Differential Revision: https://phabricator.services.mozilla.com/D15891
layout/svg/SVGGeometryFrame.cpp
--- a/layout/svg/SVGGeometryFrame.cpp
+++ b/layout/svg/SVGGeometryFrame.cpp
@@ -225,17 +225,18 @@ bool SVGGeometryFrame::IsSVGTransformed(
     foundTransform = true;
   }
   return foundTransform;
 }
 
 void SVGGeometryFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
                                         const nsDisplayListSet& aLists) {
   if (!static_cast<const SVGElement*>(GetContent())->HasValidDimensions() ||
-      (!IsVisibleForPainting() && aBuilder->IsForPainting())) {
+      ((!IsVisibleForPainting() || StyleEffects()->mOpacity == 0.0f) &&
+       aBuilder->IsForPainting())) {
     return;
   }
   DisplayOutline(aBuilder, aLists);
   aLists.Content()->AppendToTop(
       MakeDisplayItem<nsDisplaySVGGeometry>(aBuilder, this));
 }
 
 //----------------------------------------------------------------------