aboutsummaryrefslogtreecommitdiffstats
path: root/components/compositing/events.rs
Commit message (Collapse)AuthorAgeFilesLines
* Combine events and CompositorData methods into CompositorLayerMartin Robinson2014-10-281-186/+0
| | | | | This is a more natural collection of methods, as they all operate directly on layers and accept a layer as their first argument.
* Make compositor event handling a Layer traitMartin Robinson2014-10-281-129/+114
| | | | | This simplifies the way that event handling interacts with the compositor.
* auto merge of #3538 : mrobinson/servo/events-and-layers, r=zwarichbors-servo2014-10-011-19/+46
|\ | | | | | | | | | | | | | | Select the topmost layer at a given point to send mouse events and when sending the event, ensure that they are relative to the layer origin, rather than in absolute page coordinates. Fixes #3504.
| * Fix layer selection and point translation for mouse eventsMartin Robinson2014-10-011-19/+46
| | | | | | | | | | | | | | | | Select the topmost layer at a given point to send mouse events and when sending the event, ensure that they are relative to the layer origin, rather than in absolute page coordinates. Fixes #3504.
* | No longer consider window size when scrollingMartin Robinson2014-10-011-10/+8
|/ | | | | | | 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.
* Use LayerPixel for Layer bounds and most argumentsMartin Robinson2014-09-301-36/+20
| | | | | | 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.
* Compound scrolling offsets when setting content offsetMartin Robinson2014-09-251-1/+2
| | | | | | | When traversing the layer tree to assign content offset, the new offset needs to take into account any additional offset from children that are also scrolling roots. This means that when you scroll a parent frame, it doesn't override the scroll position of its children, but adds to it.
* Don't let base layers override root layer sizeMartin Robinson2014-09-251-1/+10
| | | | | | | | 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.
* Differentiate clearly how child layers handle scroll eventsMartin Robinson2014-09-251-12/+26
| | | | | This allows the scroll handler to know if a child layer didn't handle an event or the scroll position of the child layer was simply unchanged.
* Store scrolling root scroll offset explicitlyMartin Robinson2014-09-251-12/+17
| | | | | | | 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.
* Store content offset in unscaled pixelsMartin Robinson2014-09-161-46/+31
| | | | | | | | | | | 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.
* Cargoify servoJack Moffitt2014-09-081-0/+178