mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-24 16:54:08 +00:00
Backed out changeset 4f0d8916386e (bug 962791) for causing various regressions.
This commit is contained in:
parent
05466622ef
commit
a52f4d9d32
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user