mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Auto merge of #12930 - canaltinova:border-bottom, r=emilio
Fix wrong calculation of inline element's block size Border, padding and margin properties' top and bottom values of inline elements were affecting the element's height. It shouldn't affect it normally. Fixed it and added a test. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #11729 (github issue number if applicable). <!-- Either: --> - [X] There are tests for these changes <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12930) <!-- Reviewable:end -->
This commit is contained in:
commit
91cee66fe8
18 changed files with 61 additions and 44 deletions
|
@ -2008,10 +2008,8 @@ impl Fragment {
|
|||
let font_derived_metrics =
|
||||
InlineMetrics::from_font_metrics(&info.run.font_metrics, line_height);
|
||||
InlineMetrics {
|
||||
block_size_above_baseline: font_derived_metrics.block_size_above_baseline +
|
||||
self.border_padding.block_start,
|
||||
depth_below_baseline: font_derived_metrics.depth_below_baseline +
|
||||
self.border_padding.block_end,
|
||||
block_size_above_baseline: font_derived_metrics.block_size_above_baseline,
|
||||
depth_below_baseline: font_derived_metrics.depth_below_baseline,
|
||||
ascent: font_derived_metrics.ascent + self.border_padding.block_start,
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue