Include the overflow of the inline block itself.

Closes #7372.
This commit is contained in:
Michael Howell 2015-09-07 19:45:39 -07:00
parent 0bc7ad9b08
commit 6228edfb4c
4 changed files with 60 additions and 0 deletions

View file

@ -2175,6 +2175,19 @@ impl Fragment {
overflow = overflow.union(&border_box.inflate(outline_width, outline_width))
}
// Include the overflow of the block flow, if any.
match self.specific {
SpecificFragmentInfo::InlineBlock(ref info) => {
let block_flow = info.flow_ref.as_block();
overflow = overflow.union(&block_flow.compute_overflow());
}
SpecificFragmentInfo::InlineAbsolute(ref info) => {
let block_flow = info.flow_ref.as_block();
overflow = overflow.union(&block_flow.compute_overflow());
}
_ => (),
}
// FIXME(pcwalton): Sometimes excessively fancy glyphs can make us draw outside our border
// box too.
overflow