Bug 1610731 Comment 1 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 an outline of what I believe needs to be done here:

  * Add `nsDisplayStickyPosition::UpdateScrollData()` (similar to [`nsDisplayFixedPosition::UpdateScrollData()`](https://searchfox.org/mozilla-central/rev/ad6234148892bc29bf08d736604ac71925138040/layout/painting/nsDisplayList.cpp#7368) to populate the [missing sticky-position related fields of `WebRenderScrollDataWrapper`](https://searchfox.org/mozilla-central/rev/ad6234148892bc29bf08d736604ac71925138040/gfx/layers/wr/WebRenderScrollDataWrapper.h#380).

  * Update `APZCTreeManager::SampleForWebRender()` to provide transforms for sticky layers to offset them for dynamic toolbar movement, similar to [how it does so for fixed layers](https://searchfox.org/mozilla-central/rev/ad6234148892bc29bf08d736604ac71925138040/gfx/layers/apz/src/APZCTreeManager.cpp#784). (The calculation of the transform for sticky layers is similar to the existing calculation done in [`ComputeTransformForNode()`](https://searchfox.org/mozilla-central/rev/ad6234148892bc29bf08d736604ac71925138040/gfx/layers/apz/src/APZCTreeManager.cpp#3438).)
Here's an outline of what I believe needs to be done here:

  * Add `nsDisplayStickyPosition::UpdateScrollData()` (similar to [`nsDisplayFixedPosition::UpdateScrollData()`](https://searchfox.org/mozilla-central/rev/ad6234148892bc29bf08d736604ac71925138040/layout/painting/nsDisplayList.cpp#7368)) to populate the [missing sticky-position related fields of `WebRenderScrollDataWrapper`](https://searchfox.org/mozilla-central/rev/ad6234148892bc29bf08d736604ac71925138040/gfx/layers/wr/WebRenderScrollDataWrapper.h#380).

  * Update `APZCTreeManager::SampleForWebRender()` to provide transforms for sticky layers to offset them for dynamic toolbar movement, similar to [how it does so for fixed layers](https://searchfox.org/mozilla-central/rev/ad6234148892bc29bf08d736604ac71925138040/gfx/layers/apz/src/APZCTreeManager.cpp#784). (The calculation of the transform for sticky layers is similar to the existing calculation done in [`ComputeTransformForNode()`](https://searchfox.org/mozilla-central/rev/ad6234148892bc29bf08d736604ac71925138040/gfx/layers/apz/src/APZCTreeManager.cpp#3438).)

Back to Bug 1610731 Comment 1