aboutsummaryrefslogtreecommitdiffstats
path: root/components/devtools_traits/lib.rs
diff options
context:
space:
mode:
authorbenshu <benshu@benshu.de>2015-08-18 15:11:09 +0200
committerJosh Matthews <josh@joshmatthews.net>2016-02-24 13:51:47 -0500
commit0785d91ae460dc0702dc1cd8f5e00d0c0446269c (patch)
treef62a9d56e106c751eb0dc4b6eb2c54de0b6b2ffa /components/devtools_traits/lib.rs
parent9ab2da3cd111eb619d5ed779b6bb42c750a99f00 (diff)
downloadservo-0785d91ae460dc0702dc1cd8f5e00d0c0446269c.tar.gz
servo-0785d91ae460dc0702dc1cd8f5e00d0c0446269c.zip
Completed implementation of devtools' `getLayout`.
Diffstat (limited to 'components/devtools_traits/lib.rs')
-rw-r--r--components/devtools_traits/lib.rs29
1 files changed, 29 insertions, 0 deletions
diff --git a/components/devtools_traits/lib.rs b/components/devtools_traits/lib.rs
index 38d9f65d9c5..44a55001a0e 100644
--- a/components/devtools_traits/lib.rs
+++ b/components/devtools_traits/lib.rs
@@ -157,10 +157,39 @@ pub enum TimelineMarkerType {
/// The properties of a DOM node as computed by layout.
#[derive(Deserialize, Serialize)]
pub struct ComputedNodeLayout {
+ pub display: String,
+ pub position: String,
+ pub zIndex: String,
+ pub boxSizing: String,
+
+ pub autoMargins: AutoMargins,
+ pub marginTop: String,
+ pub marginRight: String,
+ pub marginBottom: String,
+ pub marginLeft: String,
+
+ pub borderTopWidth: String,
+ pub borderRightWidth: String,
+ pub borderBottomWidth: String,
+ pub borderLeftWidth: String,
+
+ pub paddingTop: String,
+ pub paddingRight: String,
+ pub paddingBottom: String,
+ pub paddingLeft: String,
+
pub width: f32,
pub height: f32,
}
+#[derive(Deserialize, Serialize)]
+pub struct AutoMargins {
+ pub top: bool,
+ pub right: bool,
+ pub bottom: bool,
+ pub left: bool,
+}
+
/// Messages to process in a particular script thread, as instructed by a devtools client.
#[derive(Deserialize, Serialize)]
pub enum DevtoolScriptControlMsg {