[webkit-changes] [WebKit/WebKit] 1c46d8: [Grid] Refactor RenderGrid::computeContentPosition...

Sammy Gill noreply at github.com
Wed Aug 21 23:34:01 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 1c46d8bf1ef66c0f0018b5addb12ca506c7c48e5
      https://github.com/WebKit/WebKit/commit/1c46d8bf1ef66c0f0018b5addb12ca506c7c48e5
  Author: Sammy Gill <sammy.gill at apple.com>
  Date:   2024-08-21 (Wed, 21 Aug 2024)

  Changed paths:
    M Source/WebCore/rendering/RenderGrid.cpp
    M Source/WebCore/rendering/RenderGrid.h

  Log Message:
  -----------
  [Grid] Refactor RenderGrid::computeContentPositionAndDistributionOffset to return ContentAlignmentData.
https://bugs.webkit.org/show_bug.cgi?id=278137
rdar://133895005

Reviewed by Alan Baradlay.

We need this method to be const in order to access it from a const
member function in GridTrackSizingAlgorithm. So instead of mutating the
member variables we will just have it return a ContentAlignmentData and
let the caller be responsible for updating the state. To accomplish this
we will need to change the definition of this helper struct by removing
WTF_MAKE_NONCOPYABLE and WTF_MAKE_FAST_ALLOCATED. From a cursory scan it
is not super clear why these are absolutely needed.

This will ultimately be used to fix grid-content-distribution-must-account-for-track-sizing-002
in a follow up patch.

* Source/WebCore/rendering/RenderGrid.cpp:
(WebCore::RenderGrid::repeatTracksSizingIfNeeded):
(WebCore::RenderGrid::layoutGrid):
(WebCore::RenderGrid::layoutMasonry):
(WebCore::RenderGrid::computeContentPositionAndDistributionOffset const):
(WebCore::RenderGrid::computeContentPositionAndDistributionOffset): Deleted.
* Source/WebCore/rendering/RenderGrid.h:

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



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list