mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 01:37:35 +00:00
LibWeb: Store computed CSS font size as CSSPixels
The value is originally set using a `CSSPixels` value converted to double, then when it is used it is always converted back to a `CSSPixels` again. Let's just store it as that instead.
This commit is contained in:
parent
d792461714
commit
607a398917
5 changed files with 11 additions and 11 deletions
|
@ -1712,7 +1712,7 @@ CSSPixels FormattingContext::box_baseline(Box const& box) const
|
|||
return box_state.content_height() + box_state.margin_box_top();
|
||||
case CSS::VerticalAlign::TextTop:
|
||||
// TextTop: Align the top of the box with the top of the parent's content area (see 10.6.1).
|
||||
return CSSPixels::nearest_value_for(box.computed_values().font_size());
|
||||
return box.computed_values().font_size();
|
||||
case CSS::VerticalAlign::TextBottom:
|
||||
// TextTop: Align the bottom of the box with the bottom of the parent's content area (see 10.6.1).
|
||||
return box_state.content_height() - CSSPixels::nearest_value_for(box.containing_block()->font().pixel_metrics().descent * 2);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue