mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-22 09:45:41 +00:00
Bug 1578933 - Run scroll anchoring adjustments when blocking script. r=dholbert
I wanted to fix the more general problem and script-block more of FlushPendingNotifications, but simple attempts to do that have resulted in terribly orange try runs with very bizarre failures, so in the "perfect is the enemy of good" spirit, fix the issue at hand (scroll anchoring adjustments not dealing with layout reentering beneath them) by running them while script-blocked, which is the right thing to do anyway. Differential Revision: https://phabricator.services.mozilla.com/D47256 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
cfe1667ccf
commit
e0740e7784
@ -4157,10 +4157,6 @@ void PresShell::DoFlushPendingNotifications(mozilla::ChangesToFlush aFlush) {
|
||||
mFrameConstructor->RecalcQuotesAndCounters();
|
||||
viewManager->FlushDelayedResize(true);
|
||||
if (ProcessReflowCommands(flushType < FlushType::Layout)) {
|
||||
// We didn't get interrupted. Go ahead and perform scroll anchor
|
||||
// adjustments and scroll content into view
|
||||
FlushPendingScrollAnchorAdjustments();
|
||||
|
||||
if (mContentToScrollTo) {
|
||||
DoScrollContentIntoView();
|
||||
if (mContentToScrollTo) {
|
||||
@ -9401,6 +9397,12 @@ bool PresShell::ProcessReflowCommands(bool aInterruptible) {
|
||||
interrupted = !mDirtyRoots.IsEmpty();
|
||||
|
||||
overflowTracker.Flush();
|
||||
|
||||
if (!interrupted) {
|
||||
// We didn't get interrupted. Go ahead and perform scroll anchor
|
||||
// adjustments.
|
||||
FlushPendingScrollAnchorAdjustments();
|
||||
}
|
||||
}
|
||||
|
||||
// Exiting the scriptblocker might have killed us
|
||||
|
@ -1,3 +0,0 @@
|
||||
[anchoring-with-bounds-clamping-div.html]
|
||||
[Anchoring combined with scroll bounds clamping in a <div>.]
|
||||
expected: FAIL
|
Loading…
Reference in New Issue
Block a user