зеркало из https://github.com/mozilla/gecko-dev.git
Remove unneeded nsDisplayClip::mClippingFrame. (Bug 459144, patch 11) r=roc a2.0=blocking2.0:beta6
This commit is contained in:
Родитель
f54df514f7
Коммит
476ac2cf34
|
@ -1287,18 +1287,18 @@ nsDisplayOwnLayer::BuildLayer(nsDisplayListBuilder* aBuilder,
|
|||
}
|
||||
|
||||
nsDisplayClip::nsDisplayClip(nsDisplayListBuilder* aBuilder,
|
||||
nsIFrame* aFrame, nsIFrame* aClippingFrame,
|
||||
nsDisplayItem* aItem, const nsRect& aRect)
|
||||
nsIFrame* aFrame, nsDisplayItem* aItem,
|
||||
const nsRect& aRect)
|
||||
: nsDisplayWrapList(aBuilder, aFrame, aItem),
|
||||
mClippingFrame(aClippingFrame), mClip(aRect) {
|
||||
mClip(aRect) {
|
||||
MOZ_COUNT_CTOR(nsDisplayClip);
|
||||
}
|
||||
|
||||
nsDisplayClip::nsDisplayClip(nsDisplayListBuilder* aBuilder,
|
||||
nsIFrame* aFrame, nsIFrame* aClippingFrame,
|
||||
nsDisplayList* aList, const nsRect& aRect)
|
||||
nsIFrame* aFrame, nsDisplayList* aList,
|
||||
const nsRect& aRect)
|
||||
: nsDisplayWrapList(aBuilder, aFrame, aList),
|
||||
mClippingFrame(aClippingFrame), mClip(aRect) {
|
||||
mClip(aRect) {
|
||||
MOZ_COUNT_CTOR(nsDisplayClip);
|
||||
}
|
||||
|
||||
|
@ -1340,7 +1340,7 @@ PRBool nsDisplayClip::TryMerge(nsDisplayListBuilder* aBuilder,
|
|||
if (aItem->GetType() != TYPE_CLIP)
|
||||
return PR_FALSE;
|
||||
nsDisplayClip* other = static_cast<nsDisplayClip*>(aItem);
|
||||
if (other->mClip != mClip || other->mClippingFrame != mClippingFrame)
|
||||
if (other->mClip != mClip)
|
||||
return PR_FALSE;
|
||||
mList.AppendToBottom(&other->mList);
|
||||
return PR_TRUE;
|
||||
|
@ -1349,7 +1349,7 @@ PRBool nsDisplayClip::TryMerge(nsDisplayListBuilder* aBuilder,
|
|||
nsDisplayWrapList* nsDisplayClip::WrapWithClone(nsDisplayListBuilder* aBuilder,
|
||||
nsDisplayItem* aItem) {
|
||||
return new (aBuilder)
|
||||
nsDisplayClip(aBuilder, aItem->GetUnderlyingFrame(), mClippingFrame, aItem, mClip);
|
||||
nsDisplayClip(aBuilder, aItem->GetUnderlyingFrame(), aItem, mClip);
|
||||
}
|
||||
|
||||
nsDisplayZoom::nsDisplayZoom(nsDisplayListBuilder* aBuilder,
|
||||
|
|
|
@ -1577,14 +1577,12 @@ class nsDisplayClip : public nsDisplayWrapList {
|
|||
public:
|
||||
/**
|
||||
* @param aFrame the frame that should be considered the underlying
|
||||
* frame for this content, e.g. the frame whose z-index we have.
|
||||
* @param aClippingFrame the frame that is inducing the clipping.
|
||||
* frame for this content, e.g. the frame whose z-index we have. This
|
||||
* is *not* the frame that is inducing the clipping.
|
||||
*/
|
||||
nsDisplayClip(nsDisplayListBuilder* aBuilder, nsIFrame* aFrame,
|
||||
nsIFrame* aClippingFrame,
|
||||
nsDisplayItem* aItem, const nsRect& aRect);
|
||||
nsDisplayClip(nsDisplayListBuilder* aBuilder, nsIFrame* aFrame,
|
||||
nsIFrame* aClippingFrame,
|
||||
nsDisplayList* aList, const nsRect& aRect);
|
||||
#ifdef NS_BUILD_REFCNT_LOGGING
|
||||
virtual ~nsDisplayClip();
|
||||
|
@ -1600,17 +1598,11 @@ public:
|
|||
|
||||
const nsRect& GetClipRect() { return mClip; }
|
||||
void SetClipRect(const nsRect& aRect) { mClip = aRect; }
|
||||
nsIFrame* GetClippingFrame() { return mClippingFrame; }
|
||||
|
||||
virtual nsDisplayWrapList* WrapWithClone(nsDisplayListBuilder* aBuilder,
|
||||
nsDisplayItem* aItem);
|
||||
|
||||
private:
|
||||
// The frame that is responsible for the clipping. This may be different
|
||||
// from mFrame because mFrame represents the content that is being
|
||||
// clipped, and for example may be used to obtain the z-index of the
|
||||
// content.
|
||||
nsIFrame* mClippingFrame;
|
||||
nsRect mClip;
|
||||
};
|
||||
|
||||
|
|
|
@ -5377,7 +5377,7 @@ PresShell::ClipListToRange(nsDisplayListBuilder *aBuilder,
|
|||
// the selection. If the allocation fails, fall through and delete
|
||||
// the item below.
|
||||
itemToInsert = new (aBuilder)
|
||||
nsDisplayClip(aBuilder, frame, frame, i, textRect);
|
||||
nsDisplayClip(aBuilder, frame, i, textRect);
|
||||
}
|
||||
}
|
||||
// Don't try to descend into subdocuments.
|
||||
|
|
|
@ -1259,13 +1259,13 @@ public:
|
|||
// We are not a stacking context root. There is no valid underlying
|
||||
// frame for the whole list. These items are all in-flow descendants so
|
||||
// we can safely just clip them.
|
||||
return new (aBuilder) nsDisplayClip(aBuilder, nsnull, mContainer, aList, mRect);
|
||||
return new (aBuilder) nsDisplayClip(aBuilder, nsnull, aList, mRect);
|
||||
}
|
||||
virtual nsDisplayItem* WrapItem(nsDisplayListBuilder* aBuilder,
|
||||
nsDisplayItem* aItem) {
|
||||
nsIFrame* f = aItem->GetUnderlyingFrame();
|
||||
if (mClipAll || nsLayoutUtils::IsProperAncestorFrame(mContainer, f, nsnull))
|
||||
return new (aBuilder) nsDisplayClip(aBuilder, f, mContainer, aItem, mRect);
|
||||
return new (aBuilder) nsDisplayClip(aBuilder, f, aItem, mRect);
|
||||
return aItem;
|
||||
}
|
||||
protected:
|
||||
|
@ -1284,12 +1284,12 @@ public:
|
|||
nsIFrame* aFrame, nsDisplayList* aList) {
|
||||
// We are not a stacking context root. There is no valid underlying
|
||||
// frame for the whole list.
|
||||
return new (aBuilder) nsDisplayClip(aBuilder, nsnull, mContainer, aList, mRect);
|
||||
return new (aBuilder) nsDisplayClip(aBuilder, nsnull, aList, mRect);
|
||||
}
|
||||
virtual nsDisplayItem* WrapItem(nsDisplayListBuilder* aBuilder,
|
||||
nsDisplayItem* aItem) {
|
||||
return new (aBuilder) nsDisplayClip(aBuilder, aItem->GetUnderlyingFrame(),
|
||||
mContainer, aItem, mRect);
|
||||
aItem, mRect);
|
||||
}
|
||||
protected:
|
||||
nsIFrame* mContainer;
|
||||
|
|
|
@ -376,7 +376,7 @@ nsSubDocumentFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
|
||||
// Clip children to the child root frame's rectangle
|
||||
rv = aLists.Content()->AppendNewToTop(
|
||||
new (aBuilder) nsDisplayClip(aBuilder, this, this, &childItems,
|
||||
new (aBuilder) nsDisplayClip(aBuilder, this, &childItems,
|
||||
subdocBoundsInParentUnits));
|
||||
}
|
||||
// delete childItems in case of OOM
|
||||
|
|
Загрузка…
Ссылка в новой задаче