Fix panic when html element has display: table.

This commit is contained in:
Glenn Watson 2015-07-31 16:40:06 +10:00
parent e458dca65b
commit 7dbffeed20
5 changed files with 24 additions and 1 deletions

View file

@ -295,7 +295,10 @@ pub trait Flow: fmt::Debug + Sync {
}
/// Marks this flow as the root flow. The default implementation is a no-op.
fn mark_as_root(&mut self) {}
fn mark_as_root(&mut self) {
debug!("called mark_as_root() on a flow of type {:?}", self.class());
panic!("called mark_as_root() on an unhandled flow");
}
// Note that the following functions are mostly called using static method
// dispatch, so it's ok to have them in this trait. Plus, they have