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

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

  Log Message:
  -----------
  [GFC] Introduce GridFormattingContext and GridLayout
https://bugs.webkit.org/show_bug.cgi?id=298545
rdar://160127227

Reviewed by Alan Baradlay.

This patch provides the initial bootstrapping required to start
implementing "Grid Formatting Context," by adding the skeleton code for
the GridFormattingContext and GridLayout classes. Both of these will be
expanded upon to implement the logic described in the css-grid
specification: https://drafts.csswg.org/css-grid-1/

The integration portion that will complement this patch will be added in
a follow up to give a starting point to work on that alongside the
actual grid implementation.

* Source/WebCore/layout/formattingContexts/grid/GridFormattingContext.cpp: 
Added.
(WebCore::Layout::GridFormattingContext::GridFormattingContext):
(WebCore::Layout::GridFormattingContext::layout):
Initial function that will likely be called from integration code in
order to start performing grid layout. This will not actullay be
performing grid layout, which is the responsibility of GridLayout, but
it may perform some other tasks that are not strictly related to grid
layout (e.g. sorting grid items into logical order) in order to keep
that code well focused. The formatting context will also get its
constraints passed in and learn about its constraints, which should
come as a result of the formatting context it participated in, since
grid layout will need to know that information.

* Source/WebCore/layout/formattingContexts/grid/GridLayout.cpp: Added.
(WebCore::Layout::GridLayout::GridLayout):
(WebCore::Layout::GridLayout::layout):
This will perform the the logic needed to implement grid layout as
described in: https://drafts.csswg.org/css-grid-1/#layout-algorithm. We
will pass in the constraints the formattting context is under since we
will likely need that at different points.

Canonical link: https://commits.webkit.org/299760@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