Skip to content

Commit

Permalink
Bug 1584035 - Don't apply scroll anchoring adjustments if we have an …
Browse files Browse the repository at this point in the history
…ongoing APZ smooth scroll. r=dholbert

Same case as the other smooth-scrolling thingies, scroll anchoring is less
prioritary (and is disturbing) in that case.

Also fix the logging code (`WritingMode::DebugString` is no longer a thing).

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

--HG--
extra : moz-landing-system : lando
  • Loading branch information
emilio committed Feb 12, 2020
1 parent 74210dc commit d13e046
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions layout/generic/ScrollAnchorContainer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -381,16 +381,18 @@ void ScrollAnchorContainer::ApplyAdjustments() {
if (!mAnchorNode || mAnchorNodeIsDirty || mDisabled ||
mScrollFrame->HasPendingScrollRestoration() ||
mScrollFrame->IsProcessingScrollEvent() ||
mScrollFrame->IsProcessingAsyncScroll()) {
mScrollFrame->IsProcessingAsyncScroll() ||
mScrollFrame->mApzSmoothScrollDestination.isSome()) {
ANCHOR_LOG(
"Ignoring post-reflow (anchor=%p, dirty=%d, disabled=%d, "
"pendingRestoration=%d, scrollevent=%d, asyncScroll=%d, "
"pendingSuppression=%d, container=%p).\n",
"apzSmoothDestination=%d, pendingSuppression=%d, container=%p).\n",
mAnchorNode, mAnchorNodeIsDirty, mDisabled,
mScrollFrame->HasPendingScrollRestoration(),
mScrollFrame->IsProcessingScrollEvent(),
mScrollFrame->IsProcessingAsyncScroll(), mSuppressAnchorAdjustment,
this);
mScrollFrame->IsProcessingAsyncScroll(),
mScrollFrame->mApzSmoothScrollDestination.isSome(),
mSuppressAnchorAdjustment, this);
if (mSuppressAnchorAdjustment) {
mSuppressAnchorAdjustment = false;
InvalidateAnchor();
Expand Down Expand Up @@ -419,7 +421,7 @@ void ScrollAnchorContainer::ApplyAdjustments() {
}

ANCHOR_LOG("Applying anchor adjustment of %d in %s with anchor %p.\n",
logicalAdjustment, writingMode.DebugString(), mAnchorNode);
logicalAdjustment, ToString(writingMode).c_str(), mAnchorNode);

AdjustmentMade(logicalAdjustment);

Expand Down

0 comments on commit d13e046

Please sign in to comment.