mirror of
https://github.com/servo/servo.git
synced 2025-08-05 05:30:08 +01:00
Merge with TextRenderBox refactor
This commit is contained in:
parent
ad9fad097c
commit
1fd9a8f162
1 changed files with 2 additions and 2 deletions
|
@ -841,7 +841,7 @@ impl InlineFlowData {
|
|||
let halfleading = match cur_box {
|
||||
TextRenderBoxClass(text_box) => {
|
||||
//ad is the AD height as defined by CSS 2.1 § 10.8.1
|
||||
let ad = text_box.text_data.run.font.metrics.ascent + text_box.text_data.run.font.metrics.descent;
|
||||
let ad = text_box.run.font.metrics.ascent + text_box.run.font.metrics.descent;
|
||||
(line_height - ad).scale_by(0.5)
|
||||
},
|
||||
_ => Au(0),
|
||||
|
@ -852,7 +852,7 @@ impl InlineFlowData {
|
|||
let halfleading = Au::max(halfleading, Au(0));
|
||||
|
||||
let height = match cur_box {
|
||||
TextRenderBoxClass(text_box) => text_box.text_data.run.font.metrics.ascent,
|
||||
TextRenderBoxClass(text_box) => text_box.run.font.metrics.ascent,
|
||||
_ => cur_box.position().size.height
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue