summaryrefslogtreecommitdiffstats
path: root/layout/svg/nsSVGUtils.cpp
diff options
context:
space:
mode:
authoryami <34216515+kn-yami@users.noreply.github.com>2018-12-16 16:17:20 +0100
committeryami <34216515+kn-yami@users.noreply.github.com>2019-02-02 18:06:10 +0100
commitb241a84d884293e1ce49a79c75e362c02c0899f9 (patch)
tree4d1df04790cc8c785141e8dd8ffea9e6da5a0c02 /layout/svg/nsSVGUtils.cpp
parentfa311a4cae5ea526e848adc4f49c6aa0b700702c (diff)
downloadUXP-b241a84d884293e1ce49a79c75e362c02c0899f9.tar
UXP-b241a84d884293e1ce49a79c75e362c02c0899f9.tar.gz
UXP-b241a84d884293e1ce49a79c75e362c02c0899f9.tar.lz
UXP-b241a84d884293e1ce49a79c75e362c02c0899f9.tar.xz
UXP-b241a84d884293e1ce49a79c75e362c02c0899f9.zip
issue #908 - implement missing parts of CSS mask
Diffstat (limited to 'layout/svg/nsSVGUtils.cpp')
-rw-r--r--layout/svg/nsSVGUtils.cpp21
1 files changed, 1 insertions, 20 deletions
diff --git a/layout/svg/nsSVGUtils.cpp b/layout/svg/nsSVGUtils.cpp
index 344ebf645..0bded21ff 100644
--- a/layout/svg/nsSVGUtils.cpp
+++ b/layout/svg/nsSVGUtils.cpp
@@ -514,26 +514,7 @@ nsSVGUtils::DetermineMaskUsage(nsIFrame* aFrame, bool aHandleOpacity,
nsTArray<nsSVGMaskFrame*> maskFrames = effectProperties.GetMaskFrames();
-#ifdef MOZ_ENABLE_MASK_AS_SHORTHAND
- // For a HTML doc:
- // According to css-masking spec, always create a mask surface when we
- // have any item in maskFrame even if all of those items are
- // non-resolvable <mask-sources> or <images>, we still need to create a
- // transparent black mask layer under this condition.
- // For a SVG doc:
- // SVG 1.1 say that if we fail to resolve a mask, we should draw the
- // object unmasked.
- aUsage.shouldGenerateMaskLayer =
- (aFrame->GetStateBits() & NS_FRAME_SVG_LAYOUT)
- ? maskFrames.Length() == 1 && maskFrames[0]
- : maskFrames.Length() > 0;
-#else
- // Since we do not support image mask so far, we should treat any
- // unresolvable mask as no mask. Otherwise, any object with a valid image
- // mask, e.g. url("xxx.png"), will become invisible just because we can not
- // handle image mask correctly. (See bug 1294171)
- aUsage.shouldGenerateMaskLayer = maskFrames.Length() == 1 && maskFrames[0];
-#endif
+ aUsage.shouldGenerateMaskLayer = (maskFrames.Length() > 0);
bool isOK = effectProperties.HasNoFilterOrHasValidFilter();
nsSVGClipPathFrame *clipPathFrame = effectProperties.GetClipPathFrame(&isOK);