mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-22 17:55:50 +00:00
servo: Merge #6565 - Fix for #6542 - <img> top-padding adds margin (from dwins:issue_6452_image_padding); r=pcwalton
I wrote this patch that makes the test from #6542 render as expected but I am not confident it is actually the right fix. Should the padding be included in the 'ascent' metric for images, or am I just introducing a bug that happens to offset the one I'm trying to fix? Source-Repo: https://github.com/servo/servo Source-Revision: 0688488a7fd3caee423968b33d6c19d79f94d29a
This commit is contained in:
parent
0141dfbe06
commit
e1fe3acd66
@ -1352,7 +1352,7 @@ impl<'a> PostorderNodeMutTraversal for FlowConstructor<'a> {
|
||||
}
|
||||
};
|
||||
|
||||
debug!("building flow for node: {:?} {:?} {:?}", display, float, node.type_id());
|
||||
debug!("building flow for node: {:?} {:?} {:?} {:?}", display, float, positioning, node.type_id());
|
||||
|
||||
// Switch on display and floatedness.
|
||||
match (display, float, positioning) {
|
||||
|
@ -1802,7 +1802,7 @@ impl Fragment {
|
||||
block_size_above_baseline: computed_block_size +
|
||||
self.border_padding.block_start_end(),
|
||||
depth_below_baseline: Au(0),
|
||||
ascent: computed_block_size + self.border_padding.block_end,
|
||||
ascent: computed_block_size + self.border_padding.block_start_end(),
|
||||
}
|
||||
}
|
||||
SpecificFragmentInfo::ScannedText(ref text_fragment) => {
|
||||
|
Loading…
Reference in New Issue
Block a user