Commit graph

9 commits

Author SHA1 Message Date
Martin Robinson
fbd0b6f9d0 Allow individual layers to render their own background color
Instead of relying on a scene-wide background color, all layers can now
have their own background color.
2014-10-14 09:59:07 -07:00
Martin Robinson
31a6270d52 No longer consider window size when scrolling
Now that scrolling roots are properly sized, we can simply look at the
scrolling root layer size when deciding the extents of layer scrolling.
This simplifies things a bit and further codifies the current model of
scrolling root + mask_to_bounds.
2014-10-01 10:58:35 -07:00
Martin Robinson
62ef7cd7ff Use LayerPixel for Layer bounds and most arguments
When interacting with Layers it is simpler to use LayerPixels, which
are unscaled pixels in the Layer coordinate system. This removes a lot
of room for error and makes things simpler.
2014-09-30 17:42:00 -07:00
Martin Robinson
f346a215f3 Don't let base layers override root layer size
Base layers (the background layer of each frame) shouldn't override the
size of their root layers. This allows base layers to scroll inside
root layer frames. This does mean that when determining the maximum
scroll position, we need to look at the size of scrolling root children
though.
2014-09-25 07:57:46 -07:00
Martin Robinson
6bbde703c1 Give root layers a scrollable policy
This allows iframe layers to move properly when their parents scroll
and is necessary to properly track their masking rects as their
children move and to draw their backgrounds in the proper position.
2014-09-25 07:57:14 -07:00
Martin Robinson
2724c3c6bb Store scrolling root scroll offset explicitly
Instead of sneakily setting the content offset and not the transform on
scrolling roots, let scrolling roots specify their scroll offset
directly and separately. This will also be important when adding proper
scrolling support for iframes.
2014-09-25 07:57:14 -07:00
Keegan McAllister
dc86e83654 Eliminate warnings 2014-09-20 13:00:55 -07:00
Martin Robinson
ea14fca1dc Store content offset in unscaled pixels
Content offset is now stored in unscaled pixels, so that it can be
applied to tile positions during compositor rendering without unscaling
it. This means that when using it in calculations of layer size (stored
in device pixels), we need to scale it. Scene scale is now stored as a
scale rather than a transformation.

Fixes #3269.
Fixes #3042.
2014-09-16 08:57:08 -07:00
Jack Moffitt
c6ab60dbfc Cargoify servo 2014-09-08 20:21:42 -06:00
Renamed from src/components/compositing/compositor_data.rs (Browse further)