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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -899,7 +899,7 @@ impl<'a> NodeHelpers<'a> for JSRef<'a, Node> {
uniqueId: unique_id.clone(),
baseURI: self.GetBaseURI().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
nodeName: self.NodeName(),
numChildren: self.ChildNodes().root().r().Length() as usize,