Bug 1313276 - Part 2. Add comment for
bug 1323912.
MozReview-Commit-ID: CetQxWIr1sq
--- a/layout/painting/nsDisplayList.cpp
+++ b/layout/painting/nsDisplayList.cpp
@@ -7348,16 +7348,18 @@ bool nsDisplayMask::ShouldPaintOnMaskLay
{
if (!aManager->IsCompositingCheap()) {
return false;
}
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;
}
if (!nsSVGIntegrationUtils::IsMaskResourceReady(mFrame)) {
return false;
}
--- a/layout/svg/nsSVGIntegrationUtils.cpp
+++ b/layout/svg/nsSVGIntegrationUtils.cpp
@@ -799,19 +799,20 @@ nsSVGIntegrationUtils::PaintMask(const P
// Paint mask onto ctx.
if (maskUsage.shouldGenerateMaskLayer) {
matSR.Restore();
matSR.SetContext(&ctx);
SetupContextMatrix(frame, aParams, offsetToBoundingBox,
offsetToUserSpace);
nsTArray<nsSVGMaskFrame *> 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) {
if (maskUsage.shouldApplyBasicShape) {
ctx.PopClip();
}
return result;