Bug 1400035 - Drop InvalidateFrame() call in SVGGeometryFrame::DidSetStyleContext(). r=jwatt
authorHiroyuki Ikezoe <hikezoe@mozilla.com>
Sun, 17 Sep 2017 08:21:05 +0900
changeset 431633 26228016eeae1527811bd2ad8e4a57149f57a29d
parent 431632 2db87d9e38c1f4ad9eb9b42d5998c65662992899
child 431634 96dab44be3bab04b2b56f29b6a2749630735d382
push id7785
push userryanvm@gmail.com
push dateThu, 21 Sep 2017 13:39:55 +0000
treeherdermozilla-beta@06d4034a8a03 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjwatt
bugs1400035
milestone57.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 1400035 - Drop InvalidateFrame() call in SVGGeometryFrame::DidSetStyleContext(). r=jwatt Now we no longer post InvalidateRenderingObservers change hint during post traversal. MozReview-Commit-ID: H3jJ1LKgJyV
layout/style/crashtests/1400035.html
layout/style/crashtests/crashtests.list
layout/svg/SVGGeometryFrame.cpp
new file mode 100644
--- /dev/null
+++ b/layout/style/crashtests/1400035.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html id="landing-page-home">
+<style>
+@keyframes opacity {
+  from { opacity: 0; }
+  to { opacity: 1; }
+}
+#circle {
+  animation: opacity 1s infinite;
+}
+</style>
+<svg width="100" height="100">
+  <mask id="mask">
+    <circle id="circle" cx="50" cy="50" r="50" fill="red"/>
+  </mask>
+  <rect class="rect" x="0" y="0" width="100" height="100" fill="blue" mask="url(#mask)"/>
+</svg>
+</html>
--- a/layout/style/crashtests/crashtests.list
+++ b/layout/style/crashtests/crashtests.list
@@ -213,11 +213,12 @@ load 1384232.html
 load 1395725.html
 load 1396041.html
 load 1397363-1.html
 load 1397439-1.html
 load 1395719.html
 load 1397091.html
 load 1398479.html
 load 1398581.html
+load 1400035.html
 load 1399546.html
 load 1400325.html
 load 1400926.html
--- a/layout/svg/SVGGeometryFrame.cpp
+++ b/layout/svg/SVGGeometryFrame.cpp
@@ -186,25 +186,16 @@ SVGGeometryFrame::AttributeChanged(int32
 }
 
 /* virtual */ void
 SVGGeometryFrame::DidSetStyleContext(nsStyleContext* aOldStyleContext)
 {
   nsFrame::DidSetStyleContext(aOldStyleContext);
 
   if (aOldStyleContext) {
-    auto oldStyleEffects = aOldStyleContext->PeekStyleEffects();
-    if (oldStyleEffects &&
-        StyleEffects()->mOpacity != oldStyleEffects->mOpacity &&
-        nsSVGUtils::CanOptimizeOpacity(this)) {
-      // nsIFrame::BuildDisplayListForStackingContext() is not going to create an
-      // nsDisplayOpacity display list item, so DLBI won't invalidate for us.
-      InvalidateFrame();
-    }
-
     SVGGeometryElement* element =
       static_cast<SVGGeometryElement*>(GetContent());
 
     auto oldStyleSVG = aOldStyleContext->PeekStyleSVG();
     if (oldStyleSVG && !SVGContentUtils::ShapeTypeHasNoCorners(GetContent())) {
       if (StyleSVG()->mStrokeLinecap != oldStyleSVG->mStrokeLinecap &&
           element->IsSVGElement(nsGkAtoms::path)) {
         // If the stroke-linecap changes to or from "butt" then our element