mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 07:38:10 +00:00
LibWeb: Hit test floats using the top of lines, not middle
I don't know why basing the available space between floats on the y coordinate in the middle of each line seemed like a good idea. It just creates situations with a few pixels of floats overlapping text!
This commit is contained in:
parent
a70aacd7c3
commit
31a3ed70f0
1 changed files with 1 additions and 1 deletions
|
@ -56,7 +56,7 @@ static AvailableSpaceForLineInfo available_space_for_line(const InlineFormatting
|
|||
|
||||
// FIXME: This is a total hack guess since we don't actually know the final y position of lines here!
|
||||
float line_height = context.context_box().specified_style().line_height(context.context_box());
|
||||
float y = (line_index * line_height) + line_height / 2;
|
||||
float y = (line_index * line_height);
|
||||
|
||||
auto& bfc = static_cast<const BlockFormattingContext&>(*context.parent());
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue