[webkit-changes] [WebKit/WebKit] cdde28: [Cleanup] Remove RenderBox::hasOverridingContainin...

Alan Baradlay noreply at github.com
Fri May 10 10:27:49 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: cdde28928324cae9a8ec659974dbe5d9d1129cf3
      https://github.com/WebKit/WebKit/commit/cdde28928324cae9a8ec659974dbe5d9d1129cf3
  Author: Alan Baradlay <zalan at apple.com>
  Date:   2024-05-10 (Fri, 10 May 2024)

  Changed paths:
    M Source/WebCore/rendering/GridLayoutFunctions.cpp
    M Source/WebCore/rendering/GridLayoutFunctions.h
    M Source/WebCore/rendering/GridTrackSizingAlgorithm.cpp
    M Source/WebCore/rendering/RenderBox.cpp
    M Source/WebCore/rendering/RenderBox.h
    M Source/WebCore/rendering/RenderBoxModelObject.cpp
    M Source/WebCore/rendering/RenderGrid.cpp

  Log Message:
  -----------
  [Cleanup] Remove RenderBox::hasOverridingContainingBlock*
https://bugs.webkit.org/show_bug.cgi?id=273967

Reviewed by Simon Fraser.

This patch removes redundant hash lookups on override size (see webkit.org/b/273880 273885 273887).
(This one is a slightly more verbose as HashMap contains an std:optional<LayoutUnit>. It is supposed to differentiate no-override/indefinite-override/definite-override states.
We should instead have an indicator for such override types e.g. struct vs. single LayoutUnit)

* Source/WebCore/rendering/GridLayoutFunctions.cpp:
(WebCore::GridLayoutFunctions::overridingContainingBlockContentSizeForChild):
(WebCore::GridLayoutFunctions::hasOverridingContainingBlockContentSizeForChild): Deleted.
* Source/WebCore/rendering/GridLayoutFunctions.h:
* Source/WebCore/rendering/GridTrackSizingAlgorithm.cpp:
(WebCore::GridTrackSizingAlgorithmStrategy::logicalHeightForChild const):
(WebCore::GridTrackSizingAlgorithmStrategy::updateOverridingContainingBlockContentSizeForChild const):
* Source/WebCore/rendering/RenderBox.cpp:
(WebCore::RenderBox::overridingContainingBlockContentWidth const):
(WebCore::RenderBox::overridingContainingBlockContentHeight const):
(WebCore::RenderBox::overridingContainingBlockContentLogicalWidth const):
(WebCore::RenderBox::overridingContainingBlockContentLogicalHeight const):
(WebCore::RenderBox::setOverridingContainingBlockContentLogicalWidth):
(WebCore::RenderBox::setOverridingContainingBlockContentLogicalHeight):
(WebCore::RenderBox::containingBlockLogicalWidthForContent const):
(WebCore::RenderBox::containingBlockLogicalHeightForContent const):
(WebCore::RenderBox::perpendicularContainingBlockLogicalHeight const):
(WebCore::RenderBox::computePercentageLogicalHeight const):
(WebCore::RenderBox::replacedMinMaxLogicalHeightComputesAsNone const):
(WebCore::RenderBox::containingBlockLogicalWidthForPositioned const):
(WebCore::RenderBox::containingBlockLogicalHeightForPositioned const):
(WebCore::RenderBox::overridingLogicalHeight const): Deleted.
(WebCore::RenderBox::hasOverridingContainingBlockContentWidth const): Deleted.
(WebCore::RenderBox::hasOverridingContainingBlockContentHeight const): Deleted.
(WebCore::RenderBox::hasOverridingContainingBlockContentLogicalWidth const): Deleted.
(WebCore::RenderBox::hasOverridingContainingBlockContentLogicalHeight const): Deleted.
* Source/WebCore/rendering/RenderBox.h:
* Source/WebCore/rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::hasAutoHeightOrContainingBlockWithAutoHeight const):
(WebCore::RenderBoxModelObject::relativePositionOffset const):
* Source/WebCore/rendering/RenderGrid.cpp:
(WebCore::RenderGrid::placeItemsOnGrid):
(WebCore::overrideSizeChanged):
(WebCore::RenderGrid::applyStretchAlignmentToChildIfNeeded):
(WebCore::RenderGrid::applySubgridStretchAlignmentToChildIfNeeded):
(WebCore::RenderGrid::updateAutoMarginsInRowAxisIfNeeded):
(WebCore::RenderGrid::updateAutoMarginsInColumnAxisIfNeeded):
(WebCore::RenderGrid::gridAreaPositionForOutOfFlowChild const):

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