mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 02:17:35 +00:00
LibWeb: Bring CSS line-height implementation closer to spec
We now distribute the line-height evenly between the space above and below inline-level boxes. This noticeably improves our baseline alignment in many cases. Note that the "vertical-align: <length>" case is quite awkward, as the extra height added by the offset baseline must count towards the line box height. There's a lot of room for improvement here, but this makes the buckets container on Acid3 show up in the right place, with the right size.
This commit is contained in:
parent
430559ea51
commit
195ef5e26f
6 changed files with 79 additions and 9 deletions
|
@ -63,6 +63,10 @@ public:
|
|||
|
||||
Gfx::FloatRect selection_rect(const Gfx::Font&) const;
|
||||
|
||||
float height_of_inline_level_box(FormattingState const&) const;
|
||||
float top_of_inline_level_box(FormattingState const&) const;
|
||||
float bottom_of_inline_level_box(FormattingState const&) const;
|
||||
|
||||
private:
|
||||
Node const& m_layout_node;
|
||||
int m_start { 0 };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue