Closed Bug 1121108 Opened 8 years ago Closed 8 years ago

Tiling computes the wrong displayport with containerless scrolling

Categories

(Core :: Graphics: Layers, defect)

All
Android
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla38

People

(Reporter: dvander, Assigned: dvander)

References

Details

Attachments

(1 file)

When containerless scrolling for root frames is enabled, tiling factors in the pres shell resolution incorrectly and we end up with a displayport that is too small.
Attached patch hackSplinter Review
This is a big hack but container scrolling will go away once it's deemed working anyway. Alternate solution is to move transforms around in layers but it's not clear how easy that is.
Attachment #8549121 - Flags: review?(botond)
Comment on attachment 8549121 [details] [diff] [review]
hack

Review of attachment 8549121 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks!

::: gfx/layers/client/ClientTiledPaintedLayer.cpp
@@ +70,5 @@
>    const LayerMetricsWrapper& ancestorParent = aAncestor.GetParent();
>    for (LayerMetricsWrapper iter(aStart, LayerMetricsWrapper::StartAt::BOTTOM);
>         ancestorParent ? iter != ancestorParent : iter.IsValid();
> +       iter = iter.GetParent())
> +  {

nit: keep the existing brace style for the for-loop

@@ +78,5 @@
> +      // When scrolling containers, the pres shell resolution and transform are
> +      // both on the layer with the displayport, so we must factor the pres
> +      // shell resolution here. With containerless scrolling, the displayport
> +      // is on the tiled layer - the resolution is already factored in from its
> +      // container layer.

I'd suggest a clarification to this comment:

  // When scrolling containers, layout adds a post-scale into the transform
  // of the displayport-ancestor (which we pick up in GetTransform() above)  
  // to cancel out the pres shell resolution (for historical reasons). 
  // The compositor in turn cancels out this post-scale (i.e., scales by
  // the pres shell resolution), and to get correct calculations,  we need 
  // to do so here, too.
  // With containerless scrolling, the offending post-scale is on the 
  // parent layer of the displayport-ancestor, which we don't reach in this
  // loop, so we don't need to worry about it.
Attachment #8549121 - Flags: review?(botond) → review+
https://hg.mozilla.org/mozilla-central/rev/e4dd444e5c88
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla38
You need to log in before you can comment on or make changes to this bug.