mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-02 10:00:54 +00:00
Bug 946502. Part 4: Remove mStickyPosFrame. r=mattwoodrow
--HG-- extra : rebase_source : 71bcbd246cf6806196a3e64d32fdde169bddfa07
This commit is contained in:
parent
2a1134e322
commit
7a45ea7b6c
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user