Bug 1516702 - Skip building nsDisplaySVGGeometry display items when they have opacity:0. r=jwatt
☠☠ backed out by c118f7527dc6 ☠ ☠
authorMatt Woodrow <mwoodrow@mozilla.com>
Wed, 09 Jan 2019 19:51:20 +0000
changeset 510249 b66f64e5709d1d7195c7b524b258d811e64250b4
parent 510248 ce7f9998683947e56d308894aa8e17ee7ce57674
child 510250 aa289d489496689509b460e8d27b3da6bb4d9d44
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() && aBuilder->IsForPainting()) ||
+      (StyleEffects()->mOpacity == 0.0f)) {
     return;
   }
   DisplayOutline(aBuilder, aLists);
   aLists.Content()->AppendToTop(
       MakeDisplayItem<nsDisplaySVGGeometry>(aBuilder, this));
 }
 
 //----------------------------------------------------------------------