aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMs2ger <ms2ger@gmail.com>2014-04-04 21:30:33 +0200
committerMs2ger <ms2ger@gmail.com>2014-04-04 21:30:33 +0200
commitfb09979502060cf92c798ceadbfd45917c41ca3f (patch)
treef58d692b20fa7c73d8d2d19254e1269c45058dad
parent31eee791dd343807b6057c549bc74f41c4bf10a2 (diff)
downloadservo-fb09979502060cf92c798ceadbfd45917c41ca3f.tar.gz
servo-fb09979502060cf92c798ceadbfd45917c41ca3f.zip
Address review comments.
-rw-r--r--src/components/gfx/gfx.rs3
-rw-r--r--src/components/main/layout/block.rs3
-rw-r--r--src/components/main/layout/inline.rs7
-rwxr-xr-xsrc/components/main/servo.rs3
-rw-r--r--src/components/net/net.rs3
-rw-r--r--src/components/script/dom/document.rs3
-rw-r--r--src/components/script/script.rs3
-rw-r--r--src/components/util/debug.rs3
-rw-r--r--src/components/util/util.rs3
9 files changed, 19 insertions, 12 deletions
diff --git a/src/components/gfx/gfx.rs b/src/components/gfx/gfx.rs
index d71bdc7eb72..de02ece7fbd 100644
--- a/src/components/gfx/gfx.rs
+++ b/src/components/gfx/gfx.rs
@@ -8,7 +8,8 @@
#[feature(globs, managed_boxes, macro_rules, phase)];
#[feature(phase)];
-#[phase(syntax, link)] extern crate log;
+#[phase(syntax, link)]
+extern crate log;
extern crate azure;
extern crate collections;
diff --git a/src/components/main/layout/block.rs b/src/components/main/layout/block.rs
index ac00144cd17..b9f0e6fee55 100644
--- a/src/components/main/layout/block.rs
+++ b/src/components/main/layout/block.rs
@@ -755,8 +755,7 @@ impl BlockFlow {
// Consume all the static y-offsets bubbled up by kid.
for y_offset in kid_base.abs_descendants.static_y_offsets.move_iter() {
// The offsets are wrt the kid flow box. Translate them to current flow.
- let y_offset = y_offset + kid_base.position.origin.y;
- abs_descendant_y_offsets.push(y_offset);
+ abs_descendant_y_offsets.push(y_offset + kid_base.position.origin.y);
}
}
}
diff --git a/src/components/main/layout/inline.rs b/src/components/main/layout/inline.rs
index 0e646d3a2cf..940d2b50d95 100644
--- a/src/components/main/layout/inline.rs
+++ b/src/components/main/layout/inline.rs
@@ -853,10 +853,11 @@ impl Flow for InlineFlow {
cur_box.border_box.borrow_mut().origin.y = cur_box.border_box.get().origin.y +
adjust_offset;
- if { cur_box.inline_info.borrow().is_none() } {
- cur_box.inline_info.set(Some(InlineInfo::new()));
+ let mut info = cur_box.inline_info.borrow_mut();
+ if info.is_none() {
+ *info = Some(InlineInfo::new());
}
- match &mut *cur_box.inline_info.borrow_mut() {
+ match &mut *info {
&Some(ref mut info) => {
// TODO (ksh8281) compute vertical-align, line-height
info.baseline = line.bounds.origin.y + baseline_offset;
diff --git a/src/components/main/servo.rs b/src/components/main/servo.rs
index 635ead9558b..225922f01d6 100755
--- a/src/components/main/servo.rs
+++ b/src/components/main/servo.rs
@@ -9,7 +9,8 @@
#[feature(globs, macro_rules, managed_boxes, phase, thread_local)];
#[feature(phase)];
-#[phase(syntax, link)] extern crate log;
+#[phase(syntax, link)]
+extern crate log;
extern crate alert;
extern crate azure;
diff --git a/src/components/net/net.rs b/src/components/net/net.rs
index feda9fc58f6..7f4b340cf84 100644
--- a/src/components/net/net.rs
+++ b/src/components/net/net.rs
@@ -8,7 +8,8 @@
#[feature(globs, managed_boxes)];
#[feature(phase)];
-#[phase(syntax, link)] extern crate log;
+#[phase(syntax, link)]
+extern crate log;
extern crate collections;
extern crate geom;
diff --git a/src/components/script/dom/document.rs b/src/components/script/dom/document.rs
index 0de44abd566..b123b169d67 100644
--- a/src/components/script/dom/document.rs
+++ b/src/components/script/dom/document.rs
@@ -610,7 +610,8 @@ impl Document {
// TODO: support the case if multiple elements
// which haves same id are in the same document.
- // This would use mangle(), but some dumbass removed it.
+ // FIXME https://github.com/mozilla/rust/issues/13195
+ // Use mangle() when it exists again.
match self.idmap.find_mut(&id) {
Some(v) => {
*v = element.clone();
diff --git a/src/components/script/script.rs b/src/components/script/script.rs
index 38703e2314a..9ab4c2cc671 100644
--- a/src/components/script/script.rs
+++ b/src/components/script/script.rs
@@ -11,7 +11,8 @@
#[feature(globs, macro_rules, struct_variant, managed_boxes, phase)];
#[feature(phase)];
-#[phase(syntax, link)] extern crate log;
+#[phase(syntax, link)]
+extern crate log;
extern crate collections;
extern crate geom;
diff --git a/src/components/util/debug.rs b/src/components/util/debug.rs
index 044509fbf6b..92b81891916 100644
--- a/src/components/util/debug.rs
+++ b/src/components/util/debug.rs
@@ -3,7 +3,8 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#[feature(phase)];
-#[phase(syntax, link)] extern crate log;
+#[phase(syntax, link)]
+extern crate log;
use std::io;
use std::io::Writer;
diff --git a/src/components/util/util.rs b/src/components/util/util.rs
index da7b4bfac60..78ff97a5e05 100644
--- a/src/components/util/util.rs
+++ b/src/components/util/util.rs
@@ -8,7 +8,8 @@
#[feature(macro_rules, managed_boxes)];
#[feature(phase)];
-#[phase(syntax, link)] extern crate log;
+#[phase(syntax, link)]
+extern crate log;
extern crate azure;
extern crate collections;