Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 78fafefd106fe8a3a0849ec800a0d20fec799de0
      
https://github.com/WebKit/WebKit/commit/78fafefd106fe8a3a0849ec800a0d20fec799de0
  Author: Sammy Gill <[email protected]>
  Date:   2025-09-16 (Tue, 16 Sep 2025)

  Changed paths:
    M Source/WebCore/Sources.txt
    M Source/WebCore/WebCore.xcodeproj/project.pbxproj
    M Source/WebCore/layout/formattingContexts/grid/GridFormattingContext.cpp
    M Source/WebCore/layout/formattingContexts/grid/GridFormattingContext.h
    M Source/WebCore/layout/formattingContexts/grid/GridLayout.cpp
    M Source/WebCore/layout/formattingContexts/grid/GridLayout.h
    A Source/WebCore/layout/formattingContexts/grid/UnplacedGridItem.cpp
    A Source/WebCore/layout/formattingContexts/grid/UnplacedGridItem.h

  Log Message:
  -----------
  [GFC] GridLayout should take in UnplacedItems as input
https://bugs.webkit.org/show_bug.cgi?id=298729
rdar://160319995

Reviewed by Alan Baradlay.

GridLayout will need some sort of input from GridFormattingContext in
in order to represent the set of items that it will need to run grid
layout on. Since the first step of the grid layout algorithm will be to
perform item placement (https://drafts.csswg.org/css-grid-1/#layout-algorithm),
we can pass in a set of "unplaced items," which will get transformed
into a set of "placed items," as a result of item placement.

In this patch, we introduce the concept of an UnplacedItem, which gets
passed in as part of a list to grid layout. As of right now, this class
is just a simple wrapper around the layout box but in theory will get
populated with enough information about it that allows grid layout to
perform placement. I defer populating the class with that information
until the initial implementation of placement, which is when we will need
it.

Finally, the list which gets sent to grid layout is also logical from
the perspective of the order property. GridFormattingContext sorts this
list based upon the order value so that GridLayout does not have to
worry about it and can just simply iterate over the list without having
to worry about making sure that the order is correct.

Canonical link: https://commits.webkit.org/300052@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to