Bug 1234485 - Part 11. Paint SVG mask on PaintedLayer before
bug 1313877 fixed.
MozReview-Commit-ID: C8XIZ4ttp1P
--- a/layout/base/nsDisplayList.cpp
+++ b/layout/base/nsDisplayList.cpp
@@ -7099,16 +7099,30 @@ bool nsDisplayMask::ShouldPaintOnMaskLay
maskUsage.shouldGenerateClipMaskLayer) {
return false;
}
if (!nsSVGIntegrationUtils::IsMaskResourceReady(mFrame)) {
return false;
}
+ // XXX temporary disable drawing SVG mask onto mask layer before bug 1313877
+ // been fixed.
+ nsIFrame* firstFrame =
+ nsLayoutUtils::FirstContinuationOrIBSplitSibling(mFrame);
+ nsSVGEffects::EffectProperties effectProperties =
+ nsSVGEffects::GetEffectProperties(firstFrame);
+ nsTArray<nsSVGMaskFrame *> maskFrames = effectProperties.GetMaskFrames();
+ for (size_t i = 0; i < maskFrames.Length() ; i++) {
+ nsSVGMaskFrame *maskFrame = maskFrames[i];
+ if (maskFrame) {
+ return false; // Found SVG mask.
+ }
+ }
+
return true;
}
bool nsDisplayMask::ComputeVisibility(nsDisplayListBuilder* aBuilder,
nsRegion* aVisibleRegion)
{
// Our children may be made translucent or arbitrarily deformed so we should
// not allow them to subtract area from aVisibleRegion.