mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-09 01:08:39 +09:00
issue #908 - implement missing parts of CSS mask
This commit is contained in:
parent
7b5e5f85de
commit
b5376e63c5
28 changed files with 574 additions and 449 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue