1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 14:57:35 +00:00

LibWeb: Use fixed-size tracks for grid gap

Previously were incorrectly initializing the grid gap tracks as were
using the GridSize float constructor, which creates a flexible length.
What is actually wanted is a fixed-size track of a certain size,
indicated in pixels.
This commit is contained in:
martinfalisse 2022-11-15 22:23:40 +01:00 committed by Andreas Kling
parent b2a6066042
commit 4b6534a26d

View file

@ -6,6 +6,7 @@
#pragma once
#include <LibWeb/CSS/Length.h>
#include <LibWeb/Layout/BlockFormattingContext.h>
#include <LibWeb/Layout/Box.h>
#include <LibWeb/Layout/FormattingContext.h>
@ -47,10 +48,10 @@ private:
{
}
TemporaryTrack(float size, bool is_gap)
: min_track_sizing_function(CSS::GridSize(size))
, max_track_sizing_function(CSS::GridSize(size))
, base_size(size)
TemporaryTrack(float size_in_px, bool is_gap)
: min_track_sizing_function(CSS::GridSize(CSS::Length(size_in_px, CSS::Length::Type::Px)))
, max_track_sizing_function(CSS::GridSize(CSS::Length(size_in_px, CSS::Length::Type::Px)))
, base_size(size_in_px)
, is_gap(is_gap)
{
}