Backed out changeset 4f0d8916386e (bug 962791) for causing various regressions.

This commit is contained in:
Ryan VanderMeulen 2014-01-31 20:40:29 -05:00
parent 05466622ef
commit a52f4d9d32

View File

@ -2188,17 +2188,8 @@ public:
virtual nsDisplayItem* WrapItem(nsDisplayListBuilder* aBuilder,
nsDisplayItem* aItem) {
// If the display item is for a frame that is absolutely positioned, it
// should only scroll with the scrolled content if its frame its contained
// within the scrolled content's frame.
bool shouldWrap = !aItem->Frame()->IsAbsolutelyPositioned() ||
nsLayoutUtils::IsProperAncestorFrame(mScrolledFrame, aItem->Frame(), nullptr);
if (shouldWrap) {
SetCount(++mCount);
return new (aBuilder) nsDisplayScrollLayer(aBuilder, aItem, aItem->Frame(), mScrolledFrame, mScrollFrame);
} else {
return aItem;
}
SetCount(++mCount);
return new (aBuilder) nsDisplayScrollLayer(aBuilder, aItem, aItem->Frame(), mScrolledFrame, mScrollFrame);
}
protected: