Bug 946502. Part 4: Remove mStickyPosFrame. r=mattwoodrow

--HG--
extra : rebase_source : 71bcbd246cf6806196a3e64d32fdde169bddfa07
This commit is contained in:
Robert O'Callahan 2014-01-04 18:14:27 +13:00
Родитель 2a1134e322
Коммит 7a45ea7b6c
3 изменённых файлов: 5 добавлений и 10 удалений

Просмотреть файл

@ -3417,10 +3417,9 @@ nsDisplayResolution::BuildLayer(nsDisplayListBuilder* aBuilder,
nsDisplayStickyPosition::nsDisplayStickyPosition(nsDisplayListBuilder* aBuilder,
nsIFrame* aFrame,
nsIFrame* aStickyPosFrame,
nsDisplayList* aList)
: nsDisplayOwnLayer(aBuilder, aFrame, aList)
, mStickyPosFrame(aStickyPosFrame) {
{
MOZ_COUNT_CTOR(nsDisplayStickyPosition);
}
@ -3457,7 +3456,7 @@ nsDisplayStickyPosition::BuildLayer(nsDisplayListBuilder* aBuilder,
nsLayoutUtils::SetFixedPositionLayerData(layer, scrollFrame,
nsRect(scrollFrame->GetOffsetToCrossDoc(ReferenceFrame()), scrollFrameSize),
mStickyPosFrame, presContext, aContainerParameters);
mFrame, presContext, aContainerParameters);
ViewID scrollId = nsLayoutUtils::FindOrCreateIDFor(
stickyScrollContainer->ScrollFrame()->GetScrolledFrame()->GetContent());
@ -3492,7 +3491,7 @@ bool nsDisplayStickyPosition::TryMerge(nsDisplayListBuilder* aBuilder, nsDisplay
return false;
// Items with the same fixed position frame can be merged.
nsDisplayStickyPosition* other = static_cast<nsDisplayStickyPosition*>(aItem);
if (other->mStickyPosFrame != mStickyPosFrame)
if (other->mFrame != mFrame)
return false;
if (aItem->GetClip() != GetClip())
return false;

Просмотреть файл

@ -2720,7 +2720,7 @@ public:
class nsDisplayStickyPosition : public nsDisplayOwnLayer {
public:
nsDisplayStickyPosition(nsDisplayListBuilder* aBuilder, nsIFrame* aFrame,
nsIFrame* aStickyPosFrame, nsDisplayList* aList);
nsDisplayList* aList);
#ifdef NS_BUILD_REFCNT_LOGGING
virtual ~nsDisplayStickyPosition();
#endif
@ -2736,9 +2736,6 @@ public:
return mozilla::LAYER_ACTIVE;
}
virtual bool TryMerge(nsDisplayListBuilder* aBuilder, nsDisplayItem* aItem) MOZ_OVERRIDE;
protected:
nsIFrame* mStickyPosFrame;
};
/**

Просмотреть файл

@ -1996,8 +1996,7 @@ nsIFrame::BuildDisplayListForStackingContext(nsDisplayListBuilder* aBuilder,
*/
if (useStickyPosition) {
resultList.AppendNewToTop(
new (aBuilder) nsDisplayStickyPosition(aBuilder, this, this,
&resultList));
new (aBuilder) nsDisplayStickyPosition(aBuilder, this, &resultList));
}
/* If we're going to apply a transformation and don't have preserve-3d set, wrap