aboutsummaryrefslogtreecommitdiffstats
path: root/components/script_traits/lib.rs
diff options
context:
space:
mode:
authorZhen Zhang <izgzhen@gmail.com>2016-04-03 15:41:37 +0800
committerZhen Zhang <izgzhen@gmail.com>2016-04-19 12:27:35 +0800
commitfefdaf76ded7675c0c67fd33f5abfbb5f74ac30f (patch)
tree90131ccb368cc04b279f82b085052ae4236495e2 /components/script_traits/lib.rs
parentf73c6143d5375db80fd2e0b7de96a99c78b5866b (diff)
downloadservo-fefdaf76ded7675c0c67fd33f5abfbb5f74ac30f.tar.gz
servo-fefdaf76ded7675c0c67fd33f5abfbb5f74ac30f.zip
Implement ScrollTop and ScrollLeft getters:
Add new compositor message to get scroll_offset; Add new layout query for computed value of overflow-x/y; Implement layer_id method for ThreadSafeLayoutNode; Add new layout query for layer_id; Implement script interface for getting scrollTop and scrollLeft, as well as relavant helper functions.
Diffstat (limited to 'components/script_traits/lib.rs')
-rw-r--r--components/script_traits/lib.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/components/script_traits/lib.rs b/components/script_traits/lib.rs
index 7175536f280..4cd24234a0a 100644
--- a/components/script_traits/lib.rs
+++ b/components/script_traits/lib.rs
@@ -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.