Auto merge of #9968 - izgzhen:scroll, r=asajeffrey

Implement scroll, scrollLeft, scrollTop and friends, addressing issue #9650

This is a work in progress to solve https://github.com/servo/servo/issues/9650. Thanks a lot for helping the review.

- [x] scroll
- [x] scrollTo
- [x] scrollBy
- [x] scrollTop (setter and getter)
- [x] scrollLeft (setter and getter)

The setters will be implemented in another PR after this is merged.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9968)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2016-04-20 18:40:26 +05:30
commit 8d988f20c1
15 changed files with 569 additions and 12 deletions

View file

@ -376,6 +376,8 @@ pub enum ScriptToCompositorMsg {
ResizeTo(Size2D<u32>),
/// Script has handled a touch event, and either prevented or allowed default actions.
TouchEventProcessed(EventResult),
/// Get Scroll Offset
GetScrollOffset(PipelineId, LayerId, IpcSender<Point2D<f32>>),
/// Requests that the compositor shut down.
Exit,
/// Allow the compositor to free script-specific resources.