mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Replace uint/int by usize/isize in various places.
This commit is contained in:
parent
9c863a6bd4
commit
6d30ec77c8
14 changed files with 36 additions and 34 deletions
|
@ -109,17 +109,18 @@ impl<'a> CSSStyleDeclarationMethods for JSRef<'a, CSSStyleDeclaration> {
|
|||
}
|
||||
|
||||
fn Item(self, index: u32) -> DOMString {
|
||||
let index = index as usize;
|
||||
let owner = self.owner.root();
|
||||
let elem: JSRef<Element> = ElementCast::from_ref(owner.r());
|
||||
let style_attribute = elem.style_attribute().borrow();
|
||||
let result = style_attribute.as_ref().and_then(|declarations| {
|
||||
if index as uint > declarations.normal.len() {
|
||||
if index > declarations.normal.len() {
|
||||
declarations.important
|
||||
.get(index as uint - declarations.normal.len())
|
||||
.get(index - declarations.normal.len())
|
||||
.map(|decl| format!("{:?} !important", decl))
|
||||
} else {
|
||||
declarations.normal
|
||||
.get(index as uint)
|
||||
.get(index)
|
||||
.map(|decl| format!("{:?}", decl))
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue