summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb
diff options
context:
space:
mode:
authorTobias Christiansen <tobyase@serenityos.org>2021-09-13 21:10:32 +0200
committerAndreas Kling <kling@serenityos.org>2021-09-13 21:37:16 +0200
commit1d47ec380f2b9384773b3bbe2be82474ad5e0e49 (patch)
treeae2167f1fd57b152c43ca1de3c9ed10610bc6787 /Userland/Libraries/LibWeb
parent4c1da4d43a9b350355985653d5a0350013fb479c (diff)
downloadserenity-1d47ec380f2b9384773b3bbe2be82474ad5e0e49.zip
LibWeb: FlexBox: Use correct source when querying for the main size
This was an error in understanding what calculated_values are and that those are not what is wanted when getting the main available size of the box in the FlexFormattingContext. The calculation around the size calculation is still a bit wonky, but this is definietly better.
Diffstat (limited to 'Userland/Libraries/LibWeb')
-rw-r--r--Userland/Libraries/LibWeb/Layout/FlexFormattingContext.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/Userland/Libraries/LibWeb/Layout/FlexFormattingContext.cpp b/Userland/Libraries/LibWeb/Layout/FlexFormattingContext.cpp
index df79a89dd3..7be6093553 100644
--- a/Userland/Libraries/LibWeb/Layout/FlexFormattingContext.cpp
+++ b/Userland/Libraries/LibWeb/Layout/FlexFormattingContext.cpp
@@ -85,15 +85,15 @@ void FlexFormattingContext::run(Box& box, LayoutMode)
auto has_definite_cross_size = [&is_row](Box& box) {
return is_row ? box.has_definite_height() : box.has_definite_width();
};
- auto specified_main_size = [&is_row, &get_pixel_size](Box& box) {
+ auto specified_main_size = [&is_row](Box& box) {
return is_row
- ? get_pixel_size(box, box.computed_values().width())
- : get_pixel_size(box, box.computed_values().height());
+ ? box.width()
+ : box.height();
};
- auto specified_cross_size = [&is_row, &get_pixel_size](Box& box) {
+ auto specified_cross_size = [&is_row](Box& box) {
return is_row
- ? get_pixel_size(box, box.computed_values().height())
- : get_pixel_size(box, box.computed_values().width());
+ ? box.height()
+ : box.width();
};
auto has_main_min_size = [&is_row](Box& box) {
return is_row