Commit Graph

21 Commits

Author SHA1 Message Date
Kartikaya Gupta
879c371239 Bug 1373349 - Correct the origin of the content rect when creating scroll layers in WR. r=botond,jrmuizel
Also tweaks the documentation in FrameMetrics.h to be more detailed and
less misleading.

MozReview-Commit-ID: 183V2Q9kY6C
2017-06-15 15:35:04 -04:00
Kartikaya Gupta
4319fc489e Bug 1372912 - Place the layer local clip in the right spot for fixed-pos layers. r=mrobinson
This patch makes the bg-fixed-child-mask.html reftest pass by ensuring
the clips for the test case are all in the correct spots. See the
comments in the patch for a more detailed explanation.

MozReview-Commit-ID: 21MAHr0PJ9B
2017-06-15 17:02:22 -04:00
Kartikaya Gupta
1d226771e5 Bug 1372912 - Make the clip id more strongly typed. r=jrmuizel,mrobinson
This patch is not really needed, but it avoids accidental conversion
between FrameMetrics::ViewID (which represents a scrolling clip) and a
uint64_t id for a non-scrolling clip.

MozReview-Commit-ID: JriIfpECHe7
2017-06-15 17:02:20 -04:00
Kartikaya Gupta
c654106c64 Bug 1372912 - Push clips for all the scroll metadata scrollclips. r=jrmuizel
Each layer has a stack of scroll metadata objects, which represent the
set of scrollframes that got flattened into the layer. Effectively the
metadata objects provide the scroll information for the chain of
scrollframes containing that layer's content. Each of these scrollframes
may have a clip, and so we need to push those clips to WR. We need to
take care to insert these clips at the right point in the stack, so that
they are interleaved correctly with the PushScrollLayer calls that we
use to inform WR of the scrolling clips for the scrollframes. This patch
implements this behaviour.

MozReview-Commit-ID: HD3OO5TZHSr
2017-06-15 17:02:18 -04:00
Kartikaya Gupta
a0184958e6 Bug 1372912 - Extract a PushLayerClip helper method. r=jrmuizel
No functional changes. We'll want to reuse this code in a future patch.

MozReview-Commit-ID: LEuP38yXBHI
2017-06-15 17:02:12 -04:00
Sebastian Hengst
e4b363e388 Backed out changeset 2b883786cf01 (bug 1372912) for bustage at ScrollingLayersHelper.h:19: class 'LayerClip' was previously declared as a struct. r=backout 2017-06-15 22:59:51 +02:00
Sebastian Hengst
e6d2ddc350 Backed out changeset 6f148794682a (bug 1372912) 2017-06-15 22:59:01 +02:00
Sebastian Hengst
1585a84193 Backed out changeset 8176859f8b70 (bug 1372912) 2017-06-15 22:58:57 +02:00
Sebastian Hengst
b13b4f7be3 Backed out changeset 18c0e82c745f (bug 1372912) 2017-06-15 22:58:52 +02:00
Kartikaya Gupta
8b6a6d8dc2 Bug 1372912 - Place the layer local clip in the right spot for fixed-pos layers. r=mrobinson
This patch makes the bg-fixed-child-mask.html reftest pass by ensuring
the clips for the test case are all in the correct spots. See the
comments in the patch for a more detailed explanation.

MozReview-Commit-ID: 5HHtsSkcsji
2017-06-15 09:41:47 -04:00
Kartikaya Gupta
d8fb074f27 Bug 1372912 - Make the clip id more strongly typed. r=jrmuizel,mrobinson
This patch is not really needed, but it avoids accidental conversion
between FrameMetrics::ViewID (which represents a scrolling clip) and a
uint64_t id for a non-scrolling clip.

MozReview-Commit-ID: BU7p4WNocXa
2017-06-15 09:41:46 -04:00
Kartikaya Gupta
86861f993c Bug 1372912 - Push clips for all the scroll metadata scrollclips. r=jrmuizel
Each layer has a stack of scroll metadata objects, which represent the
set of scrollframes that got flattened into the layer. Effectively the
metadata objects provide the scroll information for the chain of
scrollframes containing that layer's content. Each of these scrollframes
may have a clip, and so we need to push those clips to WR. We need to
take care to insert these clips at the right point in the stack, so that
they are interleaved correctly with the PushScrollLayer calls that we
use to inform WR of the scrolling clips for the scrollframes. This patch
implements this behaviour.

MozReview-Commit-ID: BayxnZuqh4s
2017-06-15 09:41:46 -04:00
Kartikaya Gupta
de50adf4fb Bug 1372912 - Extract a PushLayerClip helper method. r=jrmuizel
No functional changes. We'll want to reuse this code in a future patch.

MozReview-Commit-ID: 1nrMuS9n8A5
2017-06-15 09:41:46 -04:00
Kartikaya Gupta
fd56df36d9 Bug 1372603 - Remove unused functions and parameters. r=jrmuizel
MozReview-Commit-ID: 1DUBPEcCe2u
2017-06-14 15:43:16 -04:00
Kartikaya Gupta
0f55c95b56 Bug 1372603 - Make sure the mask rect is relative to the enclosing stacking context. r=jrmuizel
This ensures that for layers with both transforms and mask layers, the
mask layer is properly positioned outside of the transform and relative
to the proper stacking context.

MozReview-Commit-ID: 79yvhxQCykW
2017-06-14 15:43:16 -04:00
Kartikaya Gupta
9ad40e6fb9 Bug 1372603 - Push the layer's local clip rect outside the stacking context. r=jrmuizel
For various reasons, we want to be pushing the layer's local clip rect
outside of the stacking context rather than inside it. Not only is this
more correct with respect to the semantics of the layer tree, we also
need it in order to properly handle fixed-positioning of layers with
async scrolling.

This patch does the bulk of the work to make this happen. Most of the code
in the individual layer classes to process the layer's local clip rect
is removed, and instead a function in ScrollingLayersHelper is added to
deal with it. There are a couple of places that individual layer classes
still handle this but those will be removed in future patches. Note that
the individual layer classes still need to provide a clip rect of some
sort in order to push their display items, and now they simply use their
visible region bounds for this purpose.

MozReview-Commit-ID: IBmfUdJwYx1
2017-06-14 15:43:16 -04:00
Kartikaya Gupta
e28e57cbe5 Bug 1368496 - Add support for fixed-positioning with APZ. r=jrmuizel
This implements at least enough fixed-positioning support to make the
reftest in layout/reftests/async-scrolling/bg-fixed-child.html pass.
That test implements a simple background-attachment:fixed which is
implemented in the layer tree with a combination of a scrolled clip and
a fixed-position layer. Previous patches in this patchset implemented
support for the scrolled clip, and this patch implements the
fixed-position layer support.

MozReview-Commit-ID: 1Al1YshhUL7
2017-06-08 11:34:01 -04:00
Kartikaya Gupta
72099efd64 Bug 1368496 - Propagate the layer's "scrolled clip" to WebRender. r=jrmuizel
If the layer has a "scrolled clip", that clip scrolls with the content
of the layers (it moves if any of the scrollable frames defined by that
layer are scrolled).

MozReview-Commit-ID: 37hvXWO930f
2017-06-08 11:34:00 -04:00
Kartikaya Gupta
e67d0fff1a Bug 1368496 - Skip over scrollinfo layers instead of aborting entirely. r=jrmuizel
MozReview-Commit-ID: 5pYcurXfAf
2017-06-08 11:34:00 -04:00
Kartikaya Gupta
6ec8cc4d06 Bug 1368487 - Fix content rect passed to scroll layers to be relative to the right thing. r=jrmuizel
MozReview-Commit-ID: 1mbVLqp9o2R
2017-05-29 11:40:58 -04:00
Kartikaya Gupta
cc1457011b Bug 1361497 - Push scrolling clips for scrollable layers in the layer tree. r=jrmuizel
This adds an RAII helper and uses it in RenderLayer functions. When APZ
is enabled, the RAII helper pushes a scrolling clip for each scrollable
metrics on the layer. It also pops off the scrolling clips on
destruction. Note that this should happen before any other things are
pushed into the WR display list for the rendering of a layer, since
those things should be subjected to the enclosing scrolling clips.
If APZ is disabled, this skips pushing the scrolling clips.

MozReview-Commit-ID: 1qv9egKbbok
2017-05-12 13:58:15 -04:00