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

LibWeb: Align GridFormattingContext::run_track_sizing() with the spec

1. Stop using -1 to indicate infinity value of growth limit. Just use
   INFINITY for that.
2. More complete implementation of "Expand Flexible Tracks" step.
3. Return AvailableSize from get_free_space: spec says that this
   function can return indefinite size and it is ok.
This commit is contained in:
Aliaksandr Kalenik 2023-05-09 05:03:14 +03:00 committed by Andreas Kling
parent f2323b5b99
commit fb6b52b3fb
12 changed files with 164 additions and 161 deletions

View file

@ -145,7 +145,7 @@ private:
Vector<GridItem> m_grid_items;
Vector<JS::NonnullGCPtr<Box const>> m_boxes_to_place;
CSSPixels get_free_space(AvailableSize const& available_size, Vector<TemporaryTrack> const& tracks) const;
AvailableSize get_free_space(AvailableSize const& available_size, Vector<TemporaryTrack> const& tracks) const;
int get_line_index_by_line_name(String const& line_name, CSS::GridTrackSizeList);
CSSPixels resolve_definite_track_size(CSS::GridSize const&, AvailableSpace const&);