Bug 1547435 Comment 2 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

Here's what seems to be happening:

 * `PresShell::Paint()` first [attempts an empty transaction](https://searchfox.org/mozilla-central/rev/b756e6d00728dda4121f8278a744381d8643317a/layout/base/PresShell.cpp#6017).
 * That [calls into](https://searchfox.org/mozilla-central/rev/b756e6d00728dda4121f8278a744381d8643317a/gfx/layers/client/ClientLayerManager.cpp#304) the code to pick up the pending updates. As a result, the call to `NotifyPaintSkipTransaction` that I added in bug 1531796 runs, and records the new scroll offset as the last one we've sent to APZ.
 * However, code called [later in the empty transaction](https://searchfox.org/mozilla-central/rev/b756e6d00728dda4121f8278a744381d8643317a/gfx/layers/client/ClientLayerManager.cpp#318) causes the empty transaction to fail (specifically, we get [here](https://searchfox.org/mozilla-central/rev/b756e6d00728dda4121f8278a744381d8643317a/gfx/layers/client/ClientTiledPaintedLayer.cpp#538) which then causes us to [return false here](https://searchfox.org/mozilla-central/rev/b756e6d00728dda4121f8278a744381d8643317a/gfx/layers/client/ClientLayerManager.cpp#352).
 * As a result, we [proceed to a full paint](https://searchfox.org/mozilla-central/rev/b756e6d00728dda4121f8278a744381d8643317a/layout/base/PresShell.cpp#6078) and call `ComputeScrollMetadata()`, which then sees that we've already sent a previous scroll update (even though we didn't), and sends a relative update of zero.
Here's what seems to be happening:

 * `PresShell::Paint()` first [attempts an empty transaction](https://searchfox.org/mozilla-central/rev/b756e6d00728dda4121f8278a744381d8643317a/layout/base/PresShell.cpp#6017).
 * That [calls into](https://searchfox.org/mozilla-central/rev/b756e6d00728dda4121f8278a744381d8643317a/gfx/layers/client/ClientLayerManager.cpp#304) the code to pick up the pending updates. As a result, the call to `NotifyPaintSkipTransaction` that I added in bug 1531796 runs, and records the new scroll offset as the last one we've sent to APZ.
 * However, code called [later in the empty transaction](https://searchfox.org/mozilla-central/rev/b756e6d00728dda4121f8278a744381d8643317a/gfx/layers/client/ClientLayerManager.cpp#318) causes the empty transaction to fail (specifically, we get [here](https://searchfox.org/mozilla-central/rev/b756e6d00728dda4121f8278a744381d8643317a/gfx/layers/client/ClientTiledPaintedLayer.cpp#538) which then causes us to [return false here](https://searchfox.org/mozilla-central/rev/b756e6d00728dda4121f8278a744381d8643317a/gfx/layers/client/ClientLayerManager.cpp#352)).
 * As a result, we [proceed to a full paint](https://searchfox.org/mozilla-central/rev/b756e6d00728dda4121f8278a744381d8643317a/layout/base/PresShell.cpp#6078) and call `ComputeScrollMetadata()`, which then sees that we've already sent a previous scroll update (even though we didn't), and sends a relative update of zero.

Back to Bug 1547435 Comment 2