Remove int/uint from devtools/devtools_traits.

This commit is contained in:
Josh Matthews 2015-04-06 10:11:29 -04:00
parent a277036dd9
commit 6328946434
7 changed files with 28 additions and 29 deletions

View file

@ -47,10 +47,10 @@ struct PageErrorMessage {
errorMessage: String, errorMessage: String,
sourceName: String, sourceName: String,
lineText: String, lineText: String,
lineNumber: uint, lineNumber: u32,
columnNumber: uint, columnNumber: u32,
category: String, category: String,
timeStamp: uint, timeStamp: u64,
warning: bool, warning: bool,
error: bool, error: bool,
exception: bool, exception: bool,
@ -62,7 +62,7 @@ struct PageErrorMessage {
#[allow(dead_code)] #[allow(dead_code)]
struct LogMessage { struct LogMessage {
_type: String, //FIXME: should this be __type__ instead? _type: String, //FIXME: should this be __type__ instead?
timeStamp: uint, timeStamp: u64,
message: String, message: String,
} }
@ -98,7 +98,7 @@ struct EvaluateJSReply {
from: String, from: String,
input: String, input: String,
result: Json, result: Json,
timestamp: uint, timestamp: u64,
exception: Json, exception: Json,
exceptionMessage: String, exceptionMessage: String,
helperResult: Json, helperResult: Json,

View file

@ -154,10 +154,10 @@ struct NodeActorMsg {
actor: String, actor: String,
baseURI: String, baseURI: String,
parent: String, parent: String,
nodeType: uint, nodeType: u16,
namespaceURI: String, namespaceURI: String,
nodeName: String, nodeName: String,
numChildren: uint, numChildren: usize,
name: String, name: String,
publicId: String, publicId: String,
@ -364,7 +364,7 @@ struct GetAppliedReply {
#[derive(RustcEncodable)] #[derive(RustcEncodable)]
struct GetComputedReply { struct GetComputedReply {
computed: Vec<uint>, //XXX all css props computed: Vec<u32>, //XXX all css props
from: String, from: String,
} }
@ -379,11 +379,11 @@ struct AppliedEntry {
#[derive(RustcEncodable)] #[derive(RustcEncodable)]
struct AppliedRule { struct AppliedRule {
actor: String, actor: String,
__type__: uint, __type__: u32,
href: String, href: String,
cssText: String, cssText: String,
line: uint, line: u32,
column: uint, column: u32,
parentStyleSheet: String, parentStyleSheet: String,
} }
@ -395,14 +395,14 @@ struct AppliedSheet {
disabled: bool, disabled: bool,
title: String, title: String,
system: bool, system: bool,
styleSheetIndex: int, styleSheetIndex: isize,
ruleCount: uint, ruleCount: usize,
} }
#[derive(RustcEncodable)] #[derive(RustcEncodable)]
struct GetLayoutReply { struct GetLayoutReply {
width: int, width: i32,
height: int, height: i32,
autoMargins: Json, autoMargins: Json,
from: String, from: String,
} }
@ -464,8 +464,8 @@ impl Actor for PageStyleActor {
//TODO: the remaining layout properties (margin, border, padding, position) //TODO: the remaining layout properties (margin, border, padding, position)
// as specified in getLayout in http://mxr.mozilla.org/mozilla-central/source/toolkit/devtools/server/actors/styles.js // as specified in getLayout in http://mxr.mozilla.org/mozilla-central/source/toolkit/devtools/server/actors/styles.js
let msg = GetLayoutReply { let msg = GetLayoutReply {
width: width.round() as int, width: width.round() as i32,
height: height.round() as int, height: height.round() as i32,
autoMargins: if auto_margins { autoMargins: if auto_margins {
//TODO: real values like processMargins in http://mxr.mozilla.org/mozilla-central/source/toolkit/devtools/server/actors/styles.js //TODO: real values like processMargins in http://mxr.mozilla.org/mozilla-central/source/toolkit/devtools/server/actors/styles.js
let mut m = BTreeMap::new(); let mut m = BTreeMap::new();

View file

@ -30,7 +30,7 @@ struct ErrorReply {
#[derive(RustcEncodable)] #[derive(RustcEncodable)]
struct ListTabsReply { struct ListTabsReply {
from: String, from: String,
selected: uint, selected: u32,
tabs: Vec<TabActorMsg>, tabs: Vec<TabActorMsg>,
} }

View file

@ -46,10 +46,10 @@ struct ListFramesReply {
#[derive(RustcEncodable)] #[derive(RustcEncodable)]
struct FrameMsg { struct FrameMsg {
id: uint, id: u32,
url: String, url: String,
title: String, title: String,
parentID: uint, parentID: u32,
} }
#[derive(RustcEncodable)] #[derive(RustcEncodable)]
@ -57,7 +57,7 @@ pub struct TabActorMsg {
actor: String, actor: String,
title: String, title: String,
url: String, url: String,
outerWindowID: uint, outerWindowID: u32,
consoleActor: String, consoleActor: String,
inspectorActor: String, inspectorActor: String,
} }

View file

@ -10,7 +10,7 @@
#![crate_name = "devtools"] #![crate_name = "devtools"]
#![crate_type = "rlib"] #![crate_type = "rlib"]
#![feature(int_uint, box_syntax, core, rustc_private)] #![feature(box_syntax, core, rustc_private)]
#![feature(collections, std_misc)] #![feature(collections, std_misc)]
#![feature(io)] #![feature(io)]
#![feature(net)] #![feature(net)]

View file

@ -9,7 +9,6 @@
#![crate_name = "devtools_traits"] #![crate_name = "devtools_traits"]
#![crate_type = "rlib"] #![crate_type = "rlib"]
#![feature(int_uint)]
#![feature(net)] #![feature(net)]
#![allow(non_snake_case)] #![allow(non_snake_case)]
@ -67,10 +66,10 @@ pub struct NodeInfo {
pub uniqueId: String, pub uniqueId: String,
pub baseURI: String, pub baseURI: String,
pub parent: String, pub parent: String,
pub nodeType: uint, pub nodeType: u16,
pub namespaceURI: String, pub namespaceURI: String,
pub nodeName: String, pub nodeName: String,
pub numChildren: uint, pub numChildren: usize,
pub name: String, pub name: String,
pub publicId: String, pub publicId: String,
@ -110,10 +109,10 @@ pub struct Modification{
impl Decodable for Modification { impl Decodable for Modification {
fn decode<D: Decoder>(d: &mut D) -> Result<Modification, D::Error> { fn decode<D: Decoder>(d: &mut D) -> Result<Modification, D::Error> {
d.read_struct("Modification", 2u, |d| d.read_struct("Modification", 2, |d|
Ok(Modification { Ok(Modification {
attributeName: try!(d.read_struct_field("attributeName", 0u, |d| Decodable::decode(d))), attributeName: try!(d.read_struct_field("attributeName", 0, |d| Decodable::decode(d))),
newValue: match d.read_struct_field("newValue", 1u, |d| Decodable::decode(d)) { newValue: match d.read_struct_field("newValue", 1, |d| Decodable::decode(d)) {
Ok(opt) => opt, Ok(opt) => opt,
Err(_) => None Err(_) => None
} }

View file

@ -899,7 +899,7 @@ impl<'a> NodeHelpers<'a> for JSRef<'a, Node> {
uniqueId: unique_id.clone(), uniqueId: unique_id.clone(),
baseURI: self.GetBaseURI().unwrap_or("".to_owned()), baseURI: self.GetBaseURI().unwrap_or("".to_owned()),
parent: self.GetParentNode().root().map(|node| node.r().get_unique_id()).unwrap_or("".to_owned()), parent: self.GetParentNode().root().map(|node| node.r().get_unique_id()).unwrap_or("".to_owned()),
nodeType: self.NodeType() as usize, nodeType: self.NodeType(),
namespaceURI: "".to_owned(), //FIXME namespaceURI: "".to_owned(), //FIXME
nodeName: self.NodeName(), nodeName: self.NodeName(),
numChildren: self.ChildNodes().root().r().Length() as usize, numChildren: self.ChildNodes().root().r().Length() as usize,