mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
layout: Take the width
attribute of <img>
into account when
computing the intrinsic widths of the associated fragment. Fixes sites that use spacer gifs for table layout, such as the comments page on Hacker News.
This commit is contained in:
parent
a052c53d2e
commit
7b92b99c6d
4 changed files with 35 additions and 2 deletions
|
@ -1248,11 +1248,15 @@ impl Fragment {
|
|||
result.union_block(&block_flow.base.intrinsic_inline_sizes)
|
||||
}
|
||||
SpecificFragmentInfo::Image(ref mut image_fragment_info) => {
|
||||
let image_inline_size = image_fragment_info.image_inline_size();
|
||||
let image_inline_size = match image_fragment_info.replaced_image_fragment_info
|
||||
.dom_inline_size {
|
||||
None => image_fragment_info.image_inline_size(),
|
||||
Some(dom_inline_size) => dom_inline_size,
|
||||
};
|
||||
result.union_block(&IntrinsicISizes {
|
||||
minimum_inline_size: image_inline_size,
|
||||
preferred_inline_size: image_inline_size,
|
||||
})
|
||||
});
|
||||
}
|
||||
SpecificFragmentInfo::Canvas(ref mut canvas_fragment_info) => {
|
||||
let canvas_inline_size = canvas_fragment_info.canvas_inline_size();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue