diff --git a/layout/generic/nsGfxScrollFrame.cpp b/layout/generic/nsGfxScrollFrame.cpp index 9df7925a0a5e..bd0fbb889b2f 100644 --- a/layout/generic/nsGfxScrollFrame.cpp +++ b/layout/generic/nsGfxScrollFrame.cpp @@ -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: