diff options
author | Tobias Christiansen <tobyase@serenityos.org> | 2021-09-23 16:58:57 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-09-23 17:48:11 +0200 |
commit | 0ccde5417b3bd786755b22e30a39b25575ea7bd6 (patch) | |
tree | 7b56d585830aeed524c2bd094b086d7c479470f3 /Userland/Libraries | |
parent | 4560a8b83fc9e8a87a1e6875613f176d5eebc227 (diff) | |
download | serenity-0ccde5417b3bd786755b22e30a39b25575ea7bd6.zip |
LibWeb: Don't assume the parent is BFC in the IFC
Diffstat (limited to 'Userland/Libraries')
-rw-r--r-- | Userland/Libraries/LibWeb/Layout/InlineFormattingContext.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Userland/Libraries/LibWeb/Layout/InlineFormattingContext.cpp b/Userland/Libraries/LibWeb/Layout/InlineFormattingContext.cpp index 99669b26aa..850e18c347 100644 --- a/Userland/Libraries/LibWeb/Layout/InlineFormattingContext.cpp +++ b/Userland/Libraries/LibWeb/Layout/InlineFormattingContext.cpp @@ -31,6 +31,9 @@ struct AvailableSpaceForLineInfo { static AvailableSpaceForLineInfo available_space_for_line(const InlineFormattingContext& context, size_t line_index) { + if (!context.parent()->is_block_formatting_context()) + return { 0, context.context_box().width() }; + AvailableSpaceForLineInfo info; // FIXME: This is a total hack guess since we don't actually know the final y position of lines here! |