aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/layout_interface.rs
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2015-12-30 11:01:23 +0530
committerbors-servo <lbergstrom+bors@mozilla.com>2015-12-30 11:01:23 +0530
commit3f407ea3d620e381b3adf6352cc09f9912db26b3 (patch)
treedd0a2b4015221a4293c05cd8123956b449c4262f /components/script/layout_interface.rs
parent0f5c614609fd8867a9e7c27b8a398ea7d877c714 (diff)
parenta05d7f1dfd8500d299007af99861cc86fada9386 (diff)
downloadservo-3f407ea3d620e381b3adf6352cc09f9912db26b3.tar.gz
servo-3f407ea3d620e381b3adf6352cc09f9912db26b3.zip
Auto merge of #9077 - bholley:split_layout_context_etc, r=SimonSapin
Split the style-related bits out of LayoutContext and hoist more stuff into style/ <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9077) <!-- Reviewable:end -->
Diffstat (limited to 'components/script/layout_interface.rs')
-rw-r--r--components/script/layout_interface.rs37
1 files changed, 2 insertions, 35 deletions
diff --git a/components/script/layout_interface.rs b/components/script/layout_interface.rs
index 81f43953d17..5f6fd653a7e 100644
--- a/components/script/layout_interface.rs
+++ b/components/script/layout_interface.rs
@@ -12,7 +12,6 @@ use euclid::point::Point2D;
use euclid::rect::Rect;
use gfx_traits::LayerId;
use ipc_channel::ipc::{IpcReceiver, IpcSender};
-use libc::uintptr_t;
use msg::compositor_msg::Epoch;
use msg::constellation_msg::{ConstellationChan, Failure, PipelineId};
use msg::constellation_msg::{WindowSizeData};
@@ -25,11 +24,12 @@ use std::any::Any;
use std::sync::Arc;
use std::sync::mpsc::{Receiver, Sender, channel};
use string_cache::Atom;
-use style::animation::PropertyAnimation;
use style::stylesheets::Stylesheet;
use url::Url;
use util::ipc::OptionalOpaqueIpcSender;
+pub use style::animation::Animation;
+pub use style::context::ReflowGoal;
pub use dom::node::TrustedNodeAddress;
/// Asynchronous messages that script can send to layout.
@@ -138,15 +138,6 @@ impl OffsetParentResponse {
}
}
-/// Why we're doing reflow.
-#[derive(PartialEq, Copy, Clone, Debug)]
-pub enum ReflowGoal {
- /// We're reflowing in order to send a display list to the screen.
- ForDisplay,
- /// We're reflowing in order to satisfy a script query. No display list will be created.
- ForScriptQuery,
-}
-
/// Any query to perform with this reflow.
#[derive(PartialEq)]
pub enum ReflowQueryType {
@@ -226,30 +217,6 @@ impl ScriptLayoutChan for OpaqueScriptLayoutChannel {
}
}
-/// Type of an opaque node.
-pub type OpaqueNode = uintptr_t;
-
-/// State relating to an animation.
-#[derive(Clone)]
-pub struct Animation {
- /// An opaque reference to the DOM node participating in the animation.
- pub node: OpaqueNode,
- /// A description of the property animation that is occurring.
- pub property_animation: PropertyAnimation,
- /// The start time of the animation, as returned by `time::precise_time_s()`.
- pub start_time: f64,
- /// The end time of the animation, as returned by `time::precise_time_s()`.
- pub end_time: f64,
-}
-
-impl Animation {
- /// Returns the duration of this animation in seconds.
- #[inline]
- pub fn duration(&self) -> f64 {
- self.end_time - self.start_time
- }
-}
-
pub struct NewLayoutTaskInfo {
pub id: PipelineId,
pub url: Url,