From 515e0000d12a06eee2ff7e61c600b94d16f0b74a Mon Sep 17 00:00:00 2001 From: Hiroyuki Ikezoe Date: Sun, 17 Sep 2017 07:28:12 +0900 Subject: [PATCH] Bug 1400035 - Check the frame has opacity animations in nsSVGUtils::CanOptimizeOpacity(). r=jwatt If the frame has opacity animation, we can't optimize it at all. MozReview-Commit-ID: JQYiPvSaxEs --HG-- extra : rebase_source : b344b56793ba93ac2f763a6cc7f16edcf06e8f7a --- layout/svg/nsSVGUtils.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/layout/svg/nsSVGUtils.cpp b/layout/svg/nsSVGUtils.cpp index 5c9d3adf1188..6696993c25b3 100644 --- a/layout/svg/nsSVGUtils.cpp +++ b/layout/svg/nsSVGUtils.cpp @@ -1309,6 +1309,11 @@ nsSVGUtils::CanOptimizeOpacity(nsIFrame *aFrame) if (style->HasMarker()) { return false; } + + if (nsLayoutUtils::HasAnimationOfProperty(aFrame, eCSSProperty_opacity)) { + return false; + } + if (!style->HasFill() || !HasStroke(aFrame)) { return true; }