Bug 1735511. Remove IsScrollingActive check in nsDisplayListBuilder::IsAnimatedGeometryRoot. r=mattwoodrow

This only changes the return value in the case that IsScrollingActive is false but IsMaybeAsynchronouslyScrolled is true. This can only happen if HasDisplayPort is false and HasScrollGrab is false but mZoomableByAPZ is true. mZoomableByAPZ is only true for root content documents. So that means IsAlwaysActive will usually make IsScrollingActive true, except if it overflow hidden and hasn't been scrolled. So the only case this patch will change is the root content document if it hasn't been scrolled and is overflow hidden. In this case I think we do want to treat it as an AGR because it is zoomable, so it is async scrollable (after zooming).

In general we want to move away from IsScrollingActive for async scrolling things. There are only a few callers left, probably only one of them actually wants the concept that IsScrollingActive uses. Once we've removed the other users we can rename it to something like "HasBeenScrolledRecently" or something like that to avoid confusing with active scrolled roots and the use of the word active to mean async scrolling type things.

Differential Revision: https://phabricator.services.mozilla.com/D128362
This commit is contained in:
Timothy Nikkel 2021-10-17 09:23:08 +00:00
parent 5c35d0f53f
commit 344e6d7dba

View File

@ -1577,7 +1577,7 @@ bool nsDisplayListBuilder::IsAnimatedGeometryRoot(nsIFrame* aFrame,
if (parentType == LayoutFrameType::Scroll ||
parentType == LayoutFrameType::ListControl) {
nsIScrollableFrame* sf = do_QueryFrame(parent);
if (sf->GetScrolledFrame() == aFrame && sf->IsScrollingActive()) {
if (sf->GetScrolledFrame() == aFrame) {
MOZ_ASSERT(!aFrame->IsTransformed());
return sf->IsMaybeAsynchronouslyScrolled();
}