1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 10:28:10 +00:00

LibWeb: Copy some properties from specified style into layout node

Another step towards not having to carry the full specified style with
us everywhere. This isn't the ideal final layout, since we're mixing
computed and used values a bit randomly here, but one step at a time.
This commit is contained in:
Andreas Kling 2021-01-06 11:31:19 +01:00
parent e5490ae1d1
commit 2cc39cfb0e
4 changed files with 30 additions and 18 deletions

View file

@ -55,7 +55,7 @@ static AvailableSpaceForLineInfo available_space_for_line(const InlineFormatting
AvailableSpaceForLineInfo info;
// FIXME: This is a total hack guess since we don't actually know the final y position of lines here!
float line_height = context.containing_block().specified_style().line_height(context.containing_block());
float line_height = context.containing_block().line_height();
float y = (line_index * line_height);
auto& bfc = static_cast<const BlockFormattingContext&>(*context.parent());
@ -110,7 +110,7 @@ void InlineFormattingContext::run(Box&, LayoutMode layout_mode)
containing_block().line_boxes().take_last();
auto text_align = containing_block().computed_values().text_align();
float min_line_height = containing_block().specified_style().line_height(containing_block());
float min_line_height = containing_block().line_height();
float content_height = 0;
float max_linebox_width = 0;