Fixes the problem with canvas not being rendered when displayed as block level elements

This commit is contained in:
Diego Marcos 2015-03-15 03:02:33 -07:00
parent 389338c28f
commit cd84ab2ddc
4 changed files with 57 additions and 3 deletions

View file

@ -732,11 +732,15 @@ impl BlockFlow {
/// Return true if this has a replaced fragment.
///
/// The only two types of replaced fragments currently are text fragments
/// and image fragments.
/// Text, Images, Inline Block and
// Canvas (https://html.spec.whatwg.org/multipage/rendering.html#replaced-elements)
// fragments are considered as replaced fragments
fn is_replaced_content(&self) -> bool {
match self.fragment.specific {
SpecificFragmentInfo::ScannedText(_) | SpecificFragmentInfo::Image(_) | SpecificFragmentInfo::InlineBlock(_) => true,
SpecificFragmentInfo::ScannedText(_) |
SpecificFragmentInfo::Image(_) |
SpecificFragmentInfo::Canvas(_) |
SpecificFragmentInfo::InlineBlock(_) => true,
_ => false,
}
}