Bug 1408607. mWillBuildScrollable only keeps updated during display list building. So change Is(Maybe)ScrollingActive to not use it so they are always accurate. r=mstange
This seems like a good idea, not sure if it fixes any bugs though.
--- a/layout/generic/nsGfxScrollFrame.cpp
+++ b/layout/generic/nsGfxScrollFrame.cpp
@@ -5052,33 +5052,37 @@ ScrollFrameHelper::IsScrollbarOnRight()
bool
ScrollFrameHelper::IsMaybeScrollingActive() const
{
const nsStyleDisplay* disp = mOuter->StyleDisplay();
if (disp && (disp->mWillChangeBitField & NS_STYLE_WILL_CHANGE_SCROLL)) {
return true;
}
+ nsIContent* content = mOuter->GetContent();
return mHasBeenScrolledRecently ||
IsAlwaysActive() ||
- mWillBuildScrollableLayer;
+ nsLayoutUtils::HasDisplayPort(content) ||
+ nsContentUtils::HasScrollgrab(content);
}
bool
ScrollFrameHelper::IsScrollingActive(nsDisplayListBuilder* aBuilder) const
{
const nsStyleDisplay* disp = mOuter->StyleDisplay();
if (disp && (disp->mWillChangeBitField & NS_STYLE_WILL_CHANGE_SCROLL) &&
aBuilder->IsInWillChangeBudget(mOuter, GetScrollPositionClampingScrollPortSize())) {
return true;
}
+ nsIContent* content = mOuter->GetContent();
return mHasBeenScrolledRecently ||
IsAlwaysActive() ||
- mWillBuildScrollableLayer;
+ nsLayoutUtils::HasDisplayPort(content) ||
+ nsContentUtils::HasScrollgrab(content);
}
/**
* Reflow the scroll area if it needs it and return its size. Also determine if the reflow will
* cause any of the scrollbars to need to be reflowed.
*/
nsresult
nsXULScrollFrame::XULLayout(nsBoxLayoutState& aState)