mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Fix image_dynamic_remove reftest with incremental layout turned out
This also adds some extra debugging infrastructure which I found useful tracking this bug down. A regression in the br reftests is also uncovered by this patch, which I'll work on fixing next. r? @pcwalton
This commit is contained in:
parent
a1efb79cf4
commit
2faf5b270f
16 changed files with 96 additions and 41 deletions
|
@ -299,6 +299,10 @@ pub trait Flow: fmt::Show + ToString + Sync {
|
|||
LayerId(pointer, fragment_id)
|
||||
}
|
||||
}
|
||||
|
||||
fn debug_print(&self) -> String {
|
||||
format!("{} - {:x}", self.class(), base(self).debug_id())
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a, E, S: Encoder<E>> Encodable<S, E> for &'a Flow + 'a {
|
||||
|
@ -854,8 +858,9 @@ impl BaseFlow {
|
|||
&self.ref_count
|
||||
}
|
||||
|
||||
pub fn debug_id(&self) -> String {
|
||||
format!("{:p}", self as *const _)
|
||||
pub fn debug_id(&self) -> uint {
|
||||
let p = self as *const _;
|
||||
p as uint
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1020,7 +1025,7 @@ impl<'a> ImmutableFlowUtils for &'a Flow + 'a {
|
|||
for _ in range(0, level) {
|
||||
indent.push_str("| ")
|
||||
}
|
||||
debug!("{}+ {}", indent, self.to_string());
|
||||
debug!("{}+ {}", indent, self.debug_print());
|
||||
for kid in imm_child_iter(self) {
|
||||
kid.dump_with_level(level + 1)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue