aboutsummaryrefslogtreecommitdiffstats
path: root/components/script_traits/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script_traits/lib.rs')
-rw-r--r--components/script_traits/lib.rs15
1 files changed, 5 insertions, 10 deletions
diff --git a/components/script_traits/lib.rs b/components/script_traits/lib.rs
index c036eee28d9..752d4e48b0a 100644
--- a/components/script_traits/lib.rs
+++ b/components/script_traits/lib.rs
@@ -44,12 +44,7 @@ pub mod webdriver_msg;
use app_units::Au;
use bluetooth_traits::BluetoothRequest;
use devtools_traits::{DevtoolScriptControlMsg, ScriptToDevtoolsControlMsg, WorkerId};
-use euclid::Size2D;
-use euclid::length::Length;
-use euclid::point::Point2D;
-use euclid::rect::Rect;
-use euclid::scale_factor::ScaleFactor;
-use euclid::size::TypedSize2D;
+use euclid::{Size2D, Length, Point2D, Vector2D, Rect, ScaleFactor, TypedSize2D};
use gfx_traits::Epoch;
use heapsize::HeapSizeOf;
use hyper::header::Headers;
@@ -254,7 +249,7 @@ pub enum ConstellationControlMsg {
/// Notifies script of the viewport.
Viewport(PipelineId, Rect<f32>),
/// Notifies script of a new set of scroll offsets.
- SetScrollState(PipelineId, Vec<(UntrustedNodeAddress, Point2D<f32>)>),
+ SetScrollState(PipelineId, Vec<(UntrustedNodeAddress, Vector2D<f32>)>),
/// Requests that the script thread immediately send the constellation the title of a pipeline.
GetTitle(PipelineId),
/// Notifies script thread of a change to one of its document's activity
@@ -451,11 +446,11 @@ pub enum TimerSchedulerMsg {
/// Notifies the script thread to fire due timers.
/// `TimerSource` must be `FromWindow` when dispatched to `ScriptThread` and
/// must be `FromWorker` when dispatched to a `DedicatedGlobalWorkerScope`
-#[derive(Deserialize, Serialize)]
+#[derive(Debug, Deserialize, Serialize)]
pub struct TimerEvent(pub TimerSource, pub TimerEventId);
/// Describes the thread that requested the TimerEvent.
-#[derive(Copy, Clone, HeapSizeOf, Deserialize, Serialize)]
+#[derive(Copy, Clone, Debug, HeapSizeOf, Deserialize, Serialize)]
pub enum TimerSource {
/// The event was requested from a window (ScriptThread).
FromWindow(PipelineId),
@@ -690,7 +685,7 @@ pub struct ScrollState {
/// The ID of the scroll root.
pub scroll_root_id: ClipId,
/// The scrolling offset of this stacking context.
- pub scroll_offset: Point2D<f32>,
+ pub scroll_offset: Vector2D<f32>,
}
/// One hardware pixel.