mozilla/servo — pull request #675 by eschweic (2013-08-05 20:28:21+00:00)
Title: Multi-layer Compositing

This refactors the compositor and adds initial support for multiple compositor layers being displayed at once. A new module, `compositor_layer.rs`, does most of the heavy lifting that was once in `mod.rs`. New features include:
* Better scrolling. Scrolling is now applied on a per-layer basis. The layer under the cursor is scrolled first; if it cannot be scrolled (i.e. it is at a page boundary), the scroll is propagated to the layer's parents.
* Better zooming. Most of the time, layers are not aware of the current zoom factor; this is handled by the compositor. Everything else is computed in page coordinates.
* Better clicking. Clicks are propagated from child layers upwards, and take scroll offsets into account. This also fixes an issue where hit testing was off for retina displays.

Still to do:
* Connect with tikue's chances.
* Figure out snap-to-pixel scrolling. This is a lot trickier than it was before.
* iframes don't have backgrounds yet; they appear transparent until their tiles are rendered.

Depends on:
* https://github.com/mozilla-servo/rust-opengles/pull/47
* https://github.com/mozilla-servo/rust-layers/pull/23
* https://github.com/mozilla-servo/rust-geom/pull/11

Here's a preview:
![iframe-test](https://f.cloud.github.com/assets/4186321/912968/1c305e02-fe0c-11e2-876d-2333afd27af9.png)
What looks like a compositor bug is actually a separate layer that I hard-coded in. So far it seems to be fully functional.