Bug 1554572 - Don't apply scroll anchor adjustments if we're processing an async scroll animation. r=dholbert

Differential Revision: https://phabricator.services.mozilla.com/D38077

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Emilio Cobos Álvarez 2019-07-15 17:48:16 +00:00
parent 1a121e2e21
commit 6ef01a0d95

View File

@ -308,13 +308,15 @@ void ScrollAnchorContainer::Destroy() {
void ScrollAnchorContainer::ApplyAdjustments() {
if (!mAnchorNode || mAnchorNodeIsDirty ||
mScrollFrame->HasPendingScrollRestoration()) {
mScrollFrame->HasPendingScrollRestoration() ||
mScrollFrame->IsProcessingAsyncScroll()) {
mSuppressAnchorAdjustment = false;
ANCHOR_LOG(
"Ignoring post-reflow (anchor=%p, dirty=%d, pendingRestoration=%d, "
"container=%p).\n",
"asyncScroll=%d container=%p).\n",
mAnchorNode, mAnchorNodeIsDirty,
mScrollFrame->HasPendingScrollRestoration(), this);
mScrollFrame->HasPendingScrollRestoration(),
mScrollFrame->IsProcessingAsyncScroll(), this);
return;
}