Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 6330fd99ca4494b5b9f6e9c11919646532071b81 https://github.com/WebKit/WebKit/commit/6330fd99ca4494b5b9f6e9c11919646532071b81 Author: Alan Baradlay <za...@apple.com> Date: 2024-05-09 (Thu, 09 May 2024)
Changed paths: M Source/WebCore/rendering/RenderBlock.cpp M Source/WebCore/rendering/RenderBox.cpp M Source/WebCore/rendering/RenderBox.h M Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp M Source/WebCore/rendering/RenderFlexibleBox.cpp M Source/WebCore/rendering/RenderGrid.cpp M Source/WebCore/rendering/RenderReplaced.cpp M Source/WebCore/rendering/RenderTable.cpp M Source/WebCore/rendering/RenderTableSection.cpp Log Message: ----------- [Cleanup] Remove RenderBox::hasOverridingLogicalHeight https://bugs.webkit.org/show_bug.cgi?id=273885 Reviewed by Simon Fraser. This patch eliminates a redundant hash lookup by 1. removing RenderBox::hasOverridingLogicalHeight and 2. changing the return type of RenderBox::overridingLogicalHeight from LayoutUnit to std::optional<LayoutUnit> so that the following (highly common) pattern if (hasOverridingLogicalHeight()) ... + overridingLogicalHeight() + ... can be turned into if (auto overridingLogicalHeight = this->overridingLogicalHeight()) ... + *overridingLogicalHeight + ... * Source/WebCore/rendering/RenderBlock.cpp: (WebCore::RenderBlock::availableLogicalHeightForPercentageComputation const): * Source/WebCore/rendering/RenderBox.cpp: (WebCore::RenderBox::overridingLogicalHeight const): (WebCore::RenderBox::perpendicularContainingBlockLogicalHeight const): (WebCore::RenderBox::cacheIntrinsicContentLogicalHeightForFlexItem const): (WebCore::RenderBox::computeLogicalHeight const): (WebCore::RenderBox::computePercentageLogicalHeight const): (WebCore::RenderBox::computeReplacedLogicalHeightUsing const): (WebCore::RenderBox::availableLogicalHeightUsing const): (WebCore::RenderBox::shouldComputeLogicalWidthFromAspectRatio const): (WebCore::RenderBox::hasOverridingLogicalHeight const): Deleted. * Source/WebCore/rendering/RenderBox.h: * Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp: (WebCore::heightForChild): * Source/WebCore/rendering/RenderFlexibleBox.cpp: (WebCore::OverridingSizesScope::OverridingSizesScope): (WebCore::RenderFlexibleBox::usedChildOverridingCrossSizeForPercentageResolution): (WebCore::RenderFlexibleBox::usedChildOverridingMainSizeForPercentageResolution): (WebCore::RenderFlexibleBox::applyStretchAlignmentToChild): * Source/WebCore/rendering/RenderGrid.cpp: (WebCore::RenderGrid::layoutGrid): (WebCore::RenderGrid::layoutMasonry): * Source/WebCore/rendering/RenderReplaced.cpp: (WebCore::RenderReplaced::paint): * Source/WebCore/rendering/RenderTable.cpp: (WebCore::RenderTable::layout): * Source/WebCore/rendering/RenderTableSection.cpp: (WebCore::RenderTableSection::calcRowLogicalHeight): Canonical link: https://commits.webkit.org/278557@main To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes