Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fork out Masonry into a separate layout function #9410

Conversation

stwrt
Copy link
Member

@stwrt stwrt commented Jan 31, 2023

48fe5d1

Fork out Masonry into a separate layout function
https://bugs.webkit.org/show_bug.cgi?id=251459

Reviewed by Matt Woodrow.

I have been finding a significant amount of special cases are getting added to
the grid code to handle masonry. This has been getting rather messy to maintain,
and splitting these two would allow easier changes to the layout to support masonry without
worrying about breaking grid.

* Source/WebCore/rendering/GridMasonryLayout.cpp:
(WebCore::GridMasonryLayout::collectMasonryItems):
* Source/WebCore/rendering/GridTrackSizingAlgorithm.cpp:
(WebCore::GridTrack::cachedTrackSize const):
* Source/WebCore/rendering/GridTrackSizingAlgorithm.h:
(WebCore::GridTrack::cachedTrackSize const): Deleted.
* Source/WebCore/rendering/RenderGrid.cpp:
(WebCore::RenderGrid::layoutBlock):
(WebCore::RenderGrid::layoutGrid):
(WebCore::RenderGrid::layoutMasonry):
* Source/WebCore/rendering/RenderGrid.h:

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

a08d621

Misc iOS, tvOS & watchOS macOS Linux Windows
βœ… πŸ§ͺ style βœ… πŸ›  ios βœ… πŸ›  mac βœ… πŸ›  wpe βœ… πŸ›  πŸ§ͺ win
βœ… πŸ§ͺ bindings βœ… πŸ›  ios-sim βœ… πŸ›  mac-AS-debug βœ… πŸ›  gtk   πŸ›  wincairo
βœ… πŸ§ͺ webkitperl βœ… πŸ§ͺ ios-wk2 βœ… πŸ§ͺ api-mac   πŸ§ͺ gtk-wk2
βœ… πŸ§ͺ api-ios βœ… πŸ§ͺ mac-wk1   πŸ§ͺ api-gtk
βœ… πŸ›  tv βœ… πŸ§ͺ mac-wk2
βœ… πŸ›  tv-sim   πŸ§ͺ mac-AS-debug-wk2
βœ… πŸ›  watch βœ… πŸ§ͺ mac-wk2-stress
βœ… πŸ›  πŸ§ͺ merge βœ… πŸ›  watch-sim

@stwrt stwrt self-assigned this Jan 31, 2023
@stwrt stwrt added the CSS Cascading Style Sheets implementation label Jan 31, 2023
@stwrt stwrt requested a review from sammygill January 31, 2023 23:43
@stwrt stwrt added the merge-queue Applied to send a pull request to merge-queue label Feb 1, 2023
https://bugs.webkit.org/show_bug.cgi?id=251459

Reviewed by Matt Woodrow.

I have been finding a significant amount of special cases are getting added to
the grid code to handle masonry. This has been getting rather messy to maintain,
and splitting these two would allow easier changes to the layout to support masonry without
worrying about breaking grid.

* Source/WebCore/rendering/GridMasonryLayout.cpp:
(WebCore::GridMasonryLayout::collectMasonryItems):
* Source/WebCore/rendering/GridTrackSizingAlgorithm.cpp:
(WebCore::GridTrack::cachedTrackSize const):
* Source/WebCore/rendering/GridTrackSizingAlgorithm.h:
(WebCore::GridTrack::cachedTrackSize const): Deleted.
* Source/WebCore/rendering/RenderGrid.cpp:
(WebCore::RenderGrid::layoutBlock):
(WebCore::RenderGrid::layoutGrid):
(WebCore::RenderGrid::layoutMasonry):
* Source/WebCore/rendering/RenderGrid.h:

Canonical link: https://commits.webkit.org/259662@main
@webkit-early-warning-system webkit-early-warning-system force-pushed the eng/Fork-out-Masonry-into-a-separate-layout-function branch from a08d621 to 48fe5d1 Compare February 1, 2023 05:55
@webkit-commit-queue
Copy link
Collaborator

Committed 259662@main (48fe5d1): https://commits.webkit.org/259662@main

Reviewed commits have been landed. Closing PR #9410 and removing active labels.

@webkit-early-warning-system webkit-early-warning-system merged commit 48fe5d1 into WebKit:main Feb 1, 2023
@webkit-commit-queue webkit-commit-queue removed the merge-queue Applied to send a pull request to merge-queue label Feb 1, 2023
@stwrt stwrt deleted the eng/Fork-out-Masonry-into-a-separate-layout-function branch February 1, 2023 18:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CSS Cascading Style Sheets implementation
Projects
None yet
4 participants