Closed Bug 1525181 Opened 1 year ago Closed 1 year ago

Simplify the transforms used for containerless scrolling in the compositor

Categories

(Core :: Panning and Zooming, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla68
Tracking Status
firefox67 --- wontfix
firefox68 --- fixed

People

(Reporter: botond, Assigned: botond)

References

(Blocks 1 open bug, Regressed 1 open bug)

Details

Attachments

(2 files)

In bug 1459312, I set things up so that transforms derived from the RCD-RSF APZC are applied in AsyncCompositionManager in a particular way.

As a reminder, this is the layer structure with containerless scrolling:

  • root container layer
    • async zoom container layer
      • scrollable content layers, with scroll metadata
      • fixed content layers (no scroll metadata, annotated isFixedPosition)
    • scrollbar layers

We can think of the RCD-RSF's transform as consisting of three components:

  1. The zoom component
  2. The scroll component reflecting the offset of the visual viewport relative to the layout viewport
  3. The scroll component reflecting the offset of the layout viewport relative to the document

Currently, we apply these components to the layers as follows:

  • the async zoom container layer gets (1)
  • the scrollable content layers get (2) + (3)
  • the fixed content layers get (2)

In bug 1459312 comment 16, Markus suggested that we instead do:

  • the async zoom container layer gets (1) + (2)
  • the scrollable content layers get (3)
  • the fixed content layers get nothing

This should result in equivalent effective transforms, and would be a bit conceptually simpler. I resisted making this change initially, because I was worried that there's stuff relying on the scrollable content layers having all the components directly on them (which was the case before bug 1459312), and moving more components away from them seemed risky. However, there have been no problems so far with lifting (1) to the async zoom container, so as a follow-up I'd like to entertain doing as Markus suggested and lifting (2) as well.

This avoids having to place this transform separately onto scrollable and fixed layers.

With containerless scrolling, layout code lifts the composition bounds clip
from the root content layers to the async zoom container. We want to respect
that decision when setting clip rects on hit testing tree nodes.

Depends on D24594

Pushed by bballo@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/1d3e04d06651
Lift the async transform representing visual viewport scrolling to the async zoom container. r=kats
https://hg.mozilla.org/integration/autoland/rev/1477ba2341ba
Don't insist on a setting a composition bounds clip on root content layers. r=kats
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
You need to log in before you can comment on or make changes to this bug.