tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit f2dc3d6423d33cc4162c326e1dd424a312a06372
parent 47d67ca923c5881cb8dd6e58a8202e93b5381804
Author: David Shin <dshin@mozilla.com>
Date:   Fri, 28 Nov 2025 19:46:06 +0000

Bug 1999954: Explicitly schedule a paint for scroll-compensated anchor-positioned frames. r=jwatt

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

Diffstat:
Mlayout/base/PresShell.cpp | 7+++++++
1 file changed, 7 insertions(+), 0 deletions(-)

diff --git a/layout/base/PresShell.cpp b/layout/base/PresShell.cpp @@ -11733,6 +11733,13 @@ void PresShell::UpdateAnchorPosForScroll( // block's. positioned->UpdateOverflow(); positioned->GetParent()->UpdateOverflow(); + // APZ-handled scrolling may skip scheduling of paint for the relevant + // scroll container - We need to ensure that we schedule a paint for this + // positioned frame. Could theoretically do this when deciding to skip + // painting in `ScrollContainerFrame::ScrollToImpl`, that'd be conditional + // on finding a dependent anchor anyway, we should be as specific as + // possible as to what gets scheduled to paint. + positioned->SchedulePaint(); referenceData->mDefaultScrollShift = offset; return true; }();