-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[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
- Loading branch information
1 parent
d44032f
commit 6330fd9
Showing
9 changed files
with
95 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.