diff --git a/layout/painting/nsDisplayList.cpp b/layout/painting/nsDisplayList.cpp index 6d6432d33889..6cd1ccb84719 100644 --- a/layout/painting/nsDisplayList.cpp +++ b/layout/painting/nsDisplayList.cpp @@ -1579,26 +1579,6 @@ const DisplayItemClipChain* nsDisplayListBuilder::CopyWholeChain( return CreateClipChainIntersection(nullptr, aClipChain, nullptr); } -const DisplayItemClipChain* nsDisplayListBuilder::FuseClipChainUpTo( - const DisplayItemClipChain* aClipChain, const ActiveScrolledRoot* aASR) { - if (!aClipChain) { - return nullptr; - } - - const DisplayItemClipChain* sc = aClipChain; - DisplayItemClip mergedClip; - while (sc && ActiveScrolledRoot::PickDescendant(aASR, sc->mASR) == sc->mASR) { - mergedClip.IntersectWith(sc->mClip); - sc = sc->mParent; - } - - if (!mergedClip.HasClip()) { - return nullptr; - } - - return AllocateDisplayItemClipChain(mergedClip, aASR, sc); -} - const nsIFrame* nsDisplayListBuilder::FindReferenceFrameFor( const nsIFrame* aFrame, nsPoint* aOffset) const { auto MaybeApplyAdditionalOffset = [&]() { @@ -2844,17 +2824,6 @@ Maybe nsDisplayItem::GetClipWithRespectToASR( return Nothing(); } -void nsDisplayItem::FuseClipChainUpTo(nsDisplayListBuilder* aBuilder, - const ActiveScrolledRoot* aASR) { - mClipChain = aBuilder->FuseClipChainUpTo(mClipChain, aASR); - - if (mClipChain) { - mClip = &mClipChain->mClip; - } else { - mClip = nullptr; - } -} - void nsDisplayItem::IntersectClip(nsDisplayListBuilder* aBuilder, const DisplayItemClipChain* aOther, bool aStore) { diff --git a/layout/painting/nsDisplayList.h b/layout/painting/nsDisplayList.h index f595cc17bc12..23d98839cfc4 100644 --- a/layout/painting/nsDisplayList.h +++ b/layout/painting/nsDisplayList.h @@ -1045,14 +1045,6 @@ class nsDisplayListBuilder { const DisplayItemClipChain* CopyWholeChain( const DisplayItemClipChain* aClipChain); - /** - * Returns a new clip chain containing an intersection of all clips of - * |aClipChain| up to and including |aASR|. - * If there is no clip, returns nullptr. - */ - const DisplayItemClipChain* FuseClipChainUpTo( - const DisplayItemClipChain* aClipChain, const ActiveScrolledRoot* aASR); - const ActiveScrolledRoot* GetFilterASR() const { return mFilterASR; } /** @@ -2867,13 +2859,6 @@ class nsDisplayItem : public nsDisplayItemLink { bool aStore); const DisplayItemClipChain* GetClipChain() const { return mClipChain; } - /** - * Intersect all clips in our clip chain up to (and including) aASR and set - * set the intersection as this item's clip. - */ - void FuseClipChainUpTo(nsDisplayListBuilder* aBuilder, - const ActiveScrolledRoot* aASR); - bool BackfaceIsHidden() const { return mItemFlags.contains(ItemFlag::BackfaceHidden); }