From df51b78be9e6fd9b0b263dfe7c6ce0bfea65517e Mon Sep 17 00:00:00 2001 From: cku Date: Fri, 16 Dec 2016 12:52:21 +0800 Subject: [PATCH] Bug 1313276 - Part 2. Add comment for bug 1323912. r=mstange MozReview-Commit-ID: CetQxWIr1sq --HG-- extra : rebase_source : c5941bdbd076197b13f2474160b67b9923048974 extra : source : d306c622c34e8290dc22212928eed6e817f0c182 --- layout/painting/nsDisplayList.cpp | 2 ++ layout/svg/nsSVGIntegrationUtils.cpp | 7 ++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/layout/painting/nsDisplayList.cpp b/layout/painting/nsDisplayList.cpp index 6e9950b97432..48efc80f72bf 100644 --- a/layout/painting/nsDisplayList.cpp +++ b/layout/painting/nsDisplayList.cpp @@ -7353,6 +7353,8 @@ bool nsDisplayMask::ShouldPaintOnMaskLayer(LayerManager* aManager) nsSVGUtils::MaskUsage maskUsage; nsSVGUtils::DetermineMaskUsage(mFrame, mHandleOpacity, maskUsage); + // XXX Bug 1323912. nsSVGIntegrationUtils::PaintMask can not handle opacity + // correctly. Turn it off before bug fixed. if (maskUsage.opacity != 1.0) { return false; } diff --git a/layout/svg/nsSVGIntegrationUtils.cpp b/layout/svg/nsSVGIntegrationUtils.cpp index 7743e9b9c98d..07d37e3cdcf8 100644 --- a/layout/svg/nsSVGIntegrationUtils.cpp +++ b/layout/svg/nsSVGIntegrationUtils.cpp @@ -804,9 +804,10 @@ nsSVGIntegrationUtils::PaintMask(const PaintFramesParams& aParams) SetupContextMatrix(frame, aParams, offsetToBoundingBox, offsetToUserSpace); nsTArray maskFrames = effectProperties.GetMaskFrames(); - bool opacityApplied = !HasNonSVGMask(maskFrames); - result = PaintMaskSurface(aParams, maskTarget, - opacityApplied ? maskUsage.opacity : 1.0, + // XXX Bug 1323912. + MOZ_ASSERT(maskUsage.opacity == 1.0, + "nsSVGIntegrationUtils::PaintMask can not handle opacity now."); + result = PaintMaskSurface(aParams, maskTarget, 1.0, firstFrame->StyleContext(), maskFrames, ctx.CurrentMatrix(), offsetToUserSpace); if (result != DrawResult::SUCCESS) {