Address review comments.

This commit is contained in:
Ms2ger 2014-04-04 21:30:33 +02:00
parent 31eee791dd
commit fb09979502
9 changed files with 19 additions and 12 deletions

View file

@ -8,7 +8,8 @@
#[feature(globs, managed_boxes, macro_rules, phase)]; #[feature(globs, managed_boxes, macro_rules, phase)];
#[feature(phase)]; #[feature(phase)];
#[phase(syntax, link)] extern crate log; #[phase(syntax, link)]
extern crate log;
extern crate azure; extern crate azure;
extern crate collections; extern crate collections;

View file

@ -755,8 +755,7 @@ impl BlockFlow {
// Consume all the static y-offsets bubbled up by kid. // Consume all the static y-offsets bubbled up by kid.
for y_offset in kid_base.abs_descendants.static_y_offsets.move_iter() { 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. // 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 + kid_base.position.origin.y);
abs_descendant_y_offsets.push(y_offset);
} }
} }
} }

View file

@ -853,10 +853,11 @@ impl Flow for InlineFlow {
cur_box.border_box.borrow_mut().origin.y = cur_box.border_box.get().origin.y + cur_box.border_box.borrow_mut().origin.y = cur_box.border_box.get().origin.y +
adjust_offset; adjust_offset;
if { cur_box.inline_info.borrow().is_none() } { let mut info = cur_box.inline_info.borrow_mut();
cur_box.inline_info.set(Some(InlineInfo::new())); if info.is_none() {
*info = Some(InlineInfo::new());
} }
match &mut *cur_box.inline_info.borrow_mut() { match &mut *info {
&Some(ref mut info) => { &Some(ref mut info) => {
// TODO (ksh8281) compute vertical-align, line-height // TODO (ksh8281) compute vertical-align, line-height
info.baseline = line.bounds.origin.y + baseline_offset; info.baseline = line.bounds.origin.y + baseline_offset;

View file

@ -9,7 +9,8 @@
#[feature(globs, macro_rules, managed_boxes, phase, thread_local)]; #[feature(globs, macro_rules, managed_boxes, phase, thread_local)];
#[feature(phase)]; #[feature(phase)];
#[phase(syntax, link)] extern crate log; #[phase(syntax, link)]
extern crate log;
extern crate alert; extern crate alert;
extern crate azure; extern crate azure;

View file

@ -8,7 +8,8 @@
#[feature(globs, managed_boxes)]; #[feature(globs, managed_boxes)];
#[feature(phase)]; #[feature(phase)];
#[phase(syntax, link)] extern crate log; #[phase(syntax, link)]
extern crate log;
extern crate collections; extern crate collections;
extern crate geom; extern crate geom;

View file

@ -610,7 +610,8 @@ impl Document {
// TODO: support the case if multiple elements // TODO: support the case if multiple elements
// which haves same id are in the same document. // 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) { match self.idmap.find_mut(&id) {
Some(v) => { Some(v) => {
*v = element.clone(); *v = element.clone();

View file

@ -11,7 +11,8 @@
#[feature(globs, macro_rules, struct_variant, managed_boxes, phase)]; #[feature(globs, macro_rules, struct_variant, managed_boxes, phase)];
#[feature(phase)]; #[feature(phase)];
#[phase(syntax, link)] extern crate log; #[phase(syntax, link)]
extern crate log;
extern crate collections; extern crate collections;
extern crate geom; extern crate geom;

View file

@ -3,7 +3,8 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#[feature(phase)]; #[feature(phase)];
#[phase(syntax, link)] extern crate log; #[phase(syntax, link)]
extern crate log;
use std::io; use std::io;
use std::io::Writer; use std::io::Writer;

View file

@ -8,7 +8,8 @@
#[feature(macro_rules, managed_boxes)]; #[feature(macro_rules, managed_boxes)];
#[feature(phase)]; #[feature(phase)];
#[phase(syntax, link)] extern crate log; #[phase(syntax, link)]
extern crate log;
extern crate azure; extern crate azure;
extern crate collections; extern crate collections;