-
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::hasOverridingLogicalWidth
https://bugs.webkit.org/show_bug.cgi?id=273887 Reviewed by Simon Fraser. This patch eliminates a redundant hash lookup by 1. removing RenderBox:: hasOverridingLogicalWidth and 2. changing the return type of RenderBox::overridingLogicalWidth from LayoutUnit to std::optional<LayoutUnit> so that the following (highly common) pattern if (hasOverridingLogicalWidth()) ... + overridingLogicalWidth() + ... can be turned into if (auto overridingLogicalWidth = this->overridingLogicalWidth()) ... + *overridingLogicalWidth + ... * Source/WebCore/rendering/AutoTableLayout.cpp: (WebCore::AutoTableLayout::applyPreferredLogicalWidthQuirks const): * Source/WebCore/rendering/RenderBox.cpp: (WebCore::RenderBox::overridingLogicalWidth const): (WebCore::RenderBox::computeLogicalWidthInFragment const): (WebCore::RenderBox::hasOverridingLogicalWidth const): Deleted. * Source/WebCore/rendering/RenderBox.h: * Source/WebCore/rendering/RenderBoxInlines.h: (WebCore::RenderBox::overridingContentLogicalHeight const): (WebCore::RenderBox::overridingContentLogicalWidth const): Deleted. * Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp: (WebCore::widthForChild): * Source/WebCore/rendering/RenderFlexibleBox.cpp: (WebCore::OverridingSizesScope::OverridingSizesScope): * Source/WebCore/rendering/RenderReplaced.cpp: (WebCore::RenderReplaced::paint): * Source/WebCore/rendering/RenderTable.cpp: (WebCore::RenderTable::updateLogicalWidth): (WebCore::RenderTable::computePreferredLogicalWidths): Canonical link: https://commits.webkit.org/278575@main
- Loading branch information
1 parent
9c59162
commit 9ab1368
Showing
8 changed files
with
22 additions
and
28 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
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