Commit 6ef01a0d authored by Emilio Cobos Álvarez's avatar Emilio Cobos Álvarez
Browse files

Bug 1554572 - Don't apply scroll anchor adjustments if we're processing an...

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
parent 1a121e2e
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -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;
  }