mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Fixes the problem with canvas not being rendered when displayed as block level elements
This commit is contained in:
parent
389338c28f
commit
cd84ab2ddc
4 changed files with 57 additions and 3 deletions
|
@ -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,
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue