mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 05:41:12 +00:00
Bug 1295094 - Part 10. nsDisplayMask creation flow. r=mstange
MozReview-Commit-ID: Jk9B54WtThK --HG-- extra : rebase_source : 199b71fef0cce209b048dc362f89ecd700fda3e9
This commit is contained in:
parent
40235c5c47
commit
78ca020a31
@ -6795,9 +6795,9 @@ nsDisplayMask::BuildLayer(nsDisplayListBuilder* aBuilder,
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if (mFrame->StyleEffects()->mOpacity == 0.0f &&
|
||||
!mOpacityItemCreated)
|
||||
if (mFrame->StyleEffects()->mOpacity == 0.0f && !mOpacityItemCreated) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
nsIFrame* firstFrame =
|
||||
nsLayoutUtils::FirstContinuationOrIBSplitSibling(mFrame);
|
||||
|
@ -2446,9 +2446,13 @@ nsIFrame::BuildDisplayListForStackingContext(nsDisplayListBuilder* aBuilder,
|
||||
}
|
||||
// Revert to the post-filter dirty rect.
|
||||
buildingDisplayList.SetDirtyRect(dirtyRectOutsideSVGEffects);
|
||||
/* List now emptied, so add the new list to the top. */
|
||||
resultList.AppendNewToTop(
|
||||
new (aBuilder) nsDisplayMask(aBuilder, this, &resultList, useOpacity));
|
||||
|
||||
if (nsSVGIntegrationUtils::UsingMaskOrClipPathForFrame(this)) {
|
||||
/* List now emptied, so add the new list to the top. */
|
||||
resultList.AppendNewToTop(
|
||||
new (aBuilder) nsDisplayMask(aBuilder, this, &resultList, useOpacity));
|
||||
}
|
||||
|
||||
// Also add the hoisted scroll info items. We need those for APZ scrolling
|
||||
// because nsDisplayMask items can't build active layers.
|
||||
aBuilder->ExitSVGEffectsContents();
|
||||
|
@ -160,6 +160,15 @@ nsSVGIntegrationUtils::UsingEffectsForFrame(const nsIFrame* aFrame)
|
||||
style->mMask.HasLayerWithImage();
|
||||
}
|
||||
|
||||
bool
|
||||
nsSVGIntegrationUtils::UsingMaskOrClipPathForFrame(const nsIFrame* aFrame)
|
||||
{
|
||||
const nsStyleSVGReset *style = aFrame->StyleSVGReset();
|
||||
return style->HasClipPath() ||
|
||||
style->mMask.HasLayerWithImage() ||
|
||||
(aFrame->StyleEffects()->mOpacity != 1.0f);
|
||||
}
|
||||
|
||||
// For non-SVG frames, this gives the offset to the frame's "user space".
|
||||
// For SVG frames, this returns a zero offset.
|
||||
static nsPoint
|
||||
|
@ -46,6 +46,12 @@ public:
|
||||
static bool
|
||||
UsingEffectsForFrame(const nsIFrame* aFrame);
|
||||
|
||||
/**
|
||||
* Returns true if mask or clippath are currently applied to this frame.
|
||||
*/
|
||||
static bool
|
||||
UsingMaskOrClipPathForFrame(const nsIFrame* aFrame);
|
||||
|
||||
/**
|
||||
* Returns the size of the union of the border-box rects of all of
|
||||
* aNonSVGFrame's continuations.
|
||||
|
Loading…
Reference in New Issue
Block a user