mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-22 10:27:03 +00:00
Bug 786672 - Use the scrolled frame for nsDisplayScrollLayer when finding the active scrolled root. r=roc
The underlying frame of an nsDisplayScrollLayer can change and end up returning different values when finding the active scrolled root. Instead of relying on display-item ordering/merging, get the scrolled frame from the item (which was already storing it).
This commit is contained in:
parent
0d77648cc1
commit
6f2be640b7
@ -1807,6 +1807,12 @@ ContainerState::ProcessDisplayItems(const nsDisplayList& aList,
|
||||
nsLayoutUtils::GetActiveScrolledRootFor(mContainerFrame,
|
||||
mBuilder->ReferenceFrame());
|
||||
forceInactive = true;
|
||||
} else if (item->GetType() == nsDisplayItem::TYPE_SCROLL_LAYER) {
|
||||
nsDisplayScrollLayer* scrollLayerItem =
|
||||
static_cast<nsDisplayScrollLayer*>(item);
|
||||
activeScrolledRoot =
|
||||
nsLayoutUtils::GetActiveScrolledRootFor(scrollLayerItem->GetScrolledFrame(),
|
||||
mBuilder->ReferenceFrame());
|
||||
} else {
|
||||
activeScrolledRoot = nsLayoutUtils::GetActiveScrolledRootFor(item, mBuilder);
|
||||
}
|
||||
|
@ -2038,6 +2038,8 @@ public:
|
||||
intptr_t GetScrollLayerCount();
|
||||
intptr_t RemoveScrollLayerCount();
|
||||
|
||||
virtual nsIFrame* GetScrolledFrame() { return mScrolledFrame; }
|
||||
|
||||
private:
|
||||
nsIFrame* mScrollFrame;
|
||||
nsIFrame* mScrolledFrame;
|
||||
|
Loading…
x
Reference in New Issue
Block a user