mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
This batch of changes upgrades Servo to work with the Rust upgrade as of
April 10, 2014. The main changes are to privacy, to work around the issues with incorrect bounds on the libstd `Arc<Mutex<T>>`, and the various API changes strewn throughout the libraries.
This commit is contained in:
parent
4942cc76bd
commit
948daf2422
226 changed files with 1478 additions and 1407 deletions
|
@ -32,13 +32,13 @@ use std::cast;
|
|||
|
||||
#[deriving(Encodable)]
|
||||
pub struct Element {
|
||||
node: Node,
|
||||
local_name: DOMString, // TODO: This should be an atom, not a DOMString.
|
||||
namespace: Namespace,
|
||||
prefix: Option<DOMString>,
|
||||
attrs: ~[JS<Attr>],
|
||||
style_attribute: Option<style::PropertyDeclarationBlock>,
|
||||
attr_list: Option<JS<AttrList>>
|
||||
pub node: Node,
|
||||
pub local_name: DOMString, // TODO: This should be an atom, not a DOMString.
|
||||
pub namespace: Namespace,
|
||||
pub prefix: Option<DOMString>,
|
||||
pub attrs: ~[JS<Attr>],
|
||||
pub style_attribute: Option<style::PropertyDeclarationBlock>,
|
||||
pub attr_list: Option<JS<AttrList>>
|
||||
}
|
||||
|
||||
impl ElementDerived for EventTarget {
|
||||
|
@ -605,14 +605,14 @@ impl Element {
|
|||
let win = &doc.get().window;
|
||||
let node: JS<Node> = NodeCast::from(abstract_self);
|
||||
let rects = node.get_content_boxes();
|
||||
let rects = rects.map(|r| {
|
||||
let rects = rects.iter().map(|r| {
|
||||
ClientRect::new(
|
||||
win,
|
||||
r.origin.y,
|
||||
r.origin.y + r.size.height,
|
||||
r.origin.x,
|
||||
r.origin.x + r.size.width)
|
||||
});
|
||||
}).collect();
|
||||
|
||||
ClientRectList::new(win, rects)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue