aboutsummaryrefslogtreecommitdiffstats
path: root/components
diff options
context:
space:
mode:
authorbors-servo <metajack+bors@gmail.com>2015-07-07 06:27:13 -0600
committerbors-servo <metajack+bors@gmail.com>2015-07-07 06:27:13 -0600
commit0688488a7fd3caee423968b33d6c19d79f94d29a (patch)
tree42c5c07416f733e85acb63b5876e8b0312d6dc30 /components
parentae01e97efa31a180374dc0fd623ff03a650f7878 (diff)
parentb665c7b9dfafd21cd914d88a2efb3b4a0a324c7b (diff)
downloadservo-0688488a7fd3caee423968b33d6c19d79f94d29a.tar.gz
servo-0688488a7fd3caee423968b33d6c19d79f94d29a.zip
Auto merge of #6565 - dwins:issue_6452_image_padding, r=pcwalton
Fix for #6542 - <img> top-padding adds margin 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? <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6565) <!-- Reviewable:end -->
Diffstat (limited to 'components')
-rw-r--r--components/layout/construct.rs2
-rw-r--r--components/layout/fragment.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/components/layout/construct.rs b/components/layout/construct.rs
index d3e568b1076..12eb258f8f5 100644
--- a/components/layout/construct.rs
+++ b/components/layout/construct.rs
@@ -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) {
diff --git a/components/layout/fragment.rs b/components/layout/fragment.rs
index 6f33dd5be17..91cc9ddfb26 100644
--- a/components/layout/fragment.rs
+++ b/components/layout/fragment.rs
@@ -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) => {