WebKit Bugzilla
Attachment 340309 Details for
Bug 185609
: Renaming of overrides in RenderBox
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-185609-20180514161235.patch (text/plain), 51.84 KB, created by
Manuel Rego Casasnovas
on 2018-05-14 07:12:37 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Manuel Rego Casasnovas
Created:
2018-05-14 07:12:37 PDT
Size:
51.84 KB
patch
obsolete
>Subversion Revision: 231754 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index f6345b04e7fda626bd6061a87403b353a24265ec..d0d870cc98ac295527ed95a7b17f40d823e87608 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,88 @@ >+2018-05-14 Manuel Rego Casasnovas <rego@igalia.com> >+ >+ Renaming of overrides in LayoutBox >+ https://bugs.webkit.org/show_bug.cgi?id=185609 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ The names of the methods for the overrides were not consistent, >+ this patch fixes it by using the same structure in all the cases. >+ >+ No new tests, no change of behavior. >+ >+ * rendering/GridLayoutFunctions.cpp: >+ (WebCore::GridLayoutFunctions::hasOverrideContainingBlockContentSizeForChild): >+ * rendering/GridTrackSizingAlgorithm.cpp: >+ (WebCore::GridTrackSizingAlgorithmStrategy::logicalHeightForChild const): >+ * rendering/RenderBlock.cpp: >+ (WebCore::RenderBlock::computeChildPreferredLogicalWidths const): >+ (WebCore::RenderBlock::availableLogicalHeightForPercentageComputation const): >+ * rendering/RenderBlockFlow.cpp: >+ (WebCore::RenderBlockFlow::fitBorderToLinesIfNeeded): >+ * rendering/RenderBlockLineLayout.cpp: >+ (WebCore::RenderBlockFlow::updateRubyForJustifiedText): >+ * rendering/RenderBox.cpp: >+ (WebCore::RenderBox::willBeDestroyed): >+ (WebCore::RenderBox::hasOverrideContentLogicalHeight const): >+ (WebCore::RenderBox::hasOverrideContentLogicalWidth const): >+ (WebCore::RenderBox::setOverrideContentLogicalHeight): >+ (WebCore::RenderBox::setOverrideContentLogicalWidth): >+ (WebCore::RenderBox::clearOverrideContentLogicalHeight): >+ (WebCore::RenderBox::clearOverrideContentLogicalWidth): >+ (WebCore::RenderBox::clearOverrideContentSize): >+ (WebCore::RenderBox::overrideContentLogicalWidth const): >+ (WebCore::RenderBox::overrideContentLogicalHeight const): >+ (WebCore::RenderBox::overrideContainingBlockContentLogicalWidth const): >+ (WebCore::RenderBox::overrideContainingBlockContentLogicalHeight const): >+ (WebCore::RenderBox::hasOverrideContainingBlockContentLogicalWidth const): >+ (WebCore::RenderBox::hasOverrideContainingBlockContentLogicalHeight const): >+ (WebCore::RenderBox::setOverrideContainingBlockContentLogicalWidth): >+ (WebCore::RenderBox::setOverrideContainingBlockContentLogicalHeight): >+ (WebCore::RenderBox::clearOverrideContainingBlockContentSize): >+ (WebCore::RenderBox::clearOverrideContainingBlockContentLogicalHeight): >+ (WebCore::RenderBox::containingBlockLogicalWidthForContent const): >+ (WebCore::RenderBox::containingBlockLogicalHeightForContent const): >+ (WebCore::RenderBox::perpendicularContainingBlockLogicalHeight const): >+ (WebCore::RenderBox::computeLogicalWidthInFragment const): >+ (WebCore::RenderBox::computeLogicalHeight const): >+ (WebCore::RenderBox::computePercentageLogicalHeight const): >+ (WebCore::RenderBox::computeReplacedLogicalHeightUsing const): >+ (WebCore::RenderBox::availableLogicalHeightUsing const): >+ (WebCore::RenderBox::containingBlockLogicalWidthForPositioned const): >+ (WebCore::RenderBox::containingBlockLogicalHeightForPositioned const): >+ * rendering/RenderBox.h: >+ * rendering/RenderBoxModelObject.cpp: >+ (WebCore::RenderBoxModelObject::hasAutoHeightOrContainingBlockWithAutoHeight const): >+ * rendering/RenderDeprecatedFlexibleBox.cpp: >+ (WebCore::contentWidthForChild): >+ (WebCore::contentHeightForChild): >+ (WebCore::gatherFlexChildrenInfo): >+ (WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox): >+ (WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox): >+ (WebCore::RenderDeprecatedFlexibleBox::applyLineClamp): >+ (WebCore::RenderDeprecatedFlexibleBox::clearLineClamp): >+ * rendering/RenderFlexibleBox.cpp: >+ (WebCore::RenderFlexibleBox::computeInnerFlexBaseSizeForChild): >+ (WebCore::RenderFlexibleBox::crossSizeForPercentageResolution): >+ (WebCore::RenderFlexibleBox::mainSizeForPercentageResolution): >+ (WebCore::RenderFlexibleBox::constructFlexItem): >+ (WebCore::RenderFlexibleBox::setOverrideMainAxisContentSizeForChild): >+ (WebCore::RenderFlexibleBox::applyStretchAlignmentToChild): >+ * rendering/RenderFullScreen.cpp: >+ (WebCore::RenderFullScreen::unwrapRenderer): >+ * rendering/RenderGrid.cpp: >+ (WebCore::RenderGrid::layoutBlock): >+ (WebCore::RenderGrid::layoutGridItems): >+ (WebCore::RenderGrid::applyStretchAlignmentToChildIfNeeded): >+ * rendering/RenderRubyBase.cpp: >+ (WebCore::RenderRubyBase::adjustInlineDirectionLineBounds const): >+ * rendering/RenderTableCell.cpp: >+ (WebCore::RenderTableCell::setOverrideContentLogicalHeightFromRowHeight): >+ * rendering/RenderTableCell.h: >+ * rendering/RenderTableSection.cpp: >+ (WebCore::RenderTableSection::calcRowLogicalHeight): >+ (WebCore::RenderTableSection::relayoutCellIfFlexed): >+ > 2018-05-14 Zan Dobersek <zdobersek@igalia.com> > > Drop the m_compositorTexture member variable in TextureMapperGC3DPlatformLayer. >diff --git a/Source/WebCore/rendering/GridLayoutFunctions.cpp b/Source/WebCore/rendering/GridLayoutFunctions.cpp >index 420501d0938d1e229c5f69ac8ef5319e8410c1ea..507690046cfcc06f422fe6f7106fefb39e64c045 100644 >--- a/Source/WebCore/rendering/GridLayoutFunctions.cpp >+++ b/Source/WebCore/rendering/GridLayoutFunctions.cpp >@@ -86,7 +86,7 @@ GridTrackSizingDirection flowAwareDirectionForChild(const RenderGrid& grid, cons > > bool hasOverrideContainingBlockContentSizeForChild(const RenderBox& child, GridTrackSizingDirection direction) > { >- return direction == ForColumns ? child.hasOverrideContainingBlockLogicalWidth() : child.hasOverrideContainingBlockLogicalHeight(); >+ return direction == ForColumns ? child.hasOverrideContainingBlockContentLogicalWidth() : child.hasOverrideContainingBlockContentLogicalHeight(); > } > > std::optional<LayoutUnit> overrideContainingBlockContentSizeForChild(const RenderBox& child, GridTrackSizingDirection direction) >diff --git a/Source/WebCore/rendering/GridTrackSizingAlgorithm.cpp b/Source/WebCore/rendering/GridTrackSizingAlgorithm.cpp >index 9b94700866450c11647518290e1b9b5159167b10..7d49e04cd754665d2fc7cb45f7f32809159be534 100644 >--- a/Source/WebCore/rendering/GridTrackSizingAlgorithm.cpp >+++ b/Source/WebCore/rendering/GridTrackSizingAlgorithm.cpp >@@ -704,7 +704,7 @@ LayoutUnit GridTrackSizingAlgorithmStrategy::logicalHeightForChild(RenderBox& ch > > // We need to clear the stretched height to properly compute logical height during layout. > if (child.needsLayout()) >- child.clearOverrideLogicalContentHeight(); >+ child.clearOverrideContentLogicalHeight(); > > child.layoutIfNeeded(); > return child.logicalHeight() + GridLayoutFunctions::marginLogicalSizeForChild(*renderGrid(), childBlockDirection, child); >diff --git a/Source/WebCore/rendering/RenderBlock.cpp b/Source/WebCore/rendering/RenderBlock.cpp >index 2329b2c4c7c4527512aec7797962c91b472efe35..a30bb39cb178028eb963ad01b4bb7c287310a7e6 100644 >--- a/Source/WebCore/rendering/RenderBlock.cpp >+++ b/Source/WebCore/rendering/RenderBlock.cpp >@@ -2378,11 +2378,11 @@ void RenderBlock::computeChildPreferredLogicalWidths(RenderObject& child, Layout > if (child.isBox()) { > auto& box = downcast<RenderBox>(child); > if (box.isFlexItem()) { >- if (box.hasOverrideLogicalContentHeight()) >- overrideHeight = std::optional<LayoutUnit>(box.overrideLogicalContentHeight()); >- if (box.hasOverrideLogicalContentWidth()) >- overrideWidth = std::optional<LayoutUnit>(box.overrideLogicalContentWidth()); >- box.clearOverrideSize(); >+ if (box.hasOverrideContentLogicalHeight()) >+ overrideHeight = std::optional<LayoutUnit>(box.overrideContentLogicalHeight()); >+ if (box.hasOverrideContentLogicalWidth()) >+ overrideWidth = std::optional<LayoutUnit>(box.overrideContentLogicalWidth()); >+ box.clearOverrideContentSize(); > } > } > >@@ -2392,9 +2392,9 @@ void RenderBlock::computeChildPreferredLogicalWidths(RenderObject& child, Layout > if (child.isBox()) { > auto& box = downcast<RenderBox>(child); > if (overrideHeight) >- box.setOverrideLogicalContentHeight(overrideHeight.value()); >+ box.setOverrideContentLogicalHeight(overrideHeight.value()); > if (overrideWidth) >- box.setOverrideLogicalContentWidth(overrideWidth.value()); >+ box.setOverrideContentLogicalWidth(overrideWidth.value()); > } > > // For non-replaced blocks if the inline size is min|max-content or a definite >@@ -3178,8 +3178,8 @@ std::optional<LayoutUnit> RenderBlock::availableLogicalHeightForPercentageComput > > if (stretchedFlexHeight) > availableHeight = stretchedFlexHeight; >- else if (isGridItem() && hasOverrideLogicalContentHeight()) >- availableHeight = overrideLogicalContentHeight(); >+ else if (isGridItem() && hasOverrideContentLogicalHeight()) >+ availableHeight = overrideContentLogicalHeight(); > else if (styleToUse.logicalHeight().isFixed()) { > LayoutUnit contentBoxHeight = adjustContentBoxLogicalHeightForBoxSizing((LayoutUnit)styleToUse.logicalHeight().value()); > availableHeight = std::max(LayoutUnit(), constrainContentBoxLogicalHeightByMinMax(contentBoxHeight - scrollbarLogicalHeight(), std::nullopt)); >diff --git a/Source/WebCore/rendering/RenderBlockFlow.cpp b/Source/WebCore/rendering/RenderBlockFlow.cpp >index 4eacb8c2e9fad27a27947de4a831c16a7afa42e0..4fc17d987a6c594a801008752d45427809b4e214 100644 >--- a/Source/WebCore/rendering/RenderBlockFlow.cpp >+++ b/Source/WebCore/rendering/RenderBlockFlow.cpp >@@ -2953,7 +2953,7 @@ void RenderBlockFlow::adjustForBorderFit(LayoutUnit x, LayoutUnit& left, LayoutU > > void RenderBlockFlow::fitBorderToLinesIfNeeded() > { >- if (style().borderFit() == BorderFitBorder || hasOverrideLogicalContentWidth()) >+ if (style().borderFit() == BorderFitBorder || hasOverrideContentLogicalWidth()) > return; > > // Walk any normal flow lines to snugly fit. >@@ -2972,9 +2972,9 @@ void RenderBlockFlow::fitBorderToLinesIfNeeded() > if (newContentWidth == oldWidth) > return; > >- setOverrideLogicalContentWidth(newContentWidth); >+ setOverrideContentLogicalWidth(newContentWidth); > layoutBlock(false); >- clearOverrideLogicalContentWidth(); >+ clearOverrideContentLogicalWidth(); > } > > void RenderBlockFlow::markLinesDirtyInBlockRange(LayoutUnit logicalTop, LayoutUnit logicalBottom, RootInlineBox* highest) >diff --git a/Source/WebCore/rendering/RenderBlockLineLayout.cpp b/Source/WebCore/rendering/RenderBlockLineLayout.cpp >index 2cf76d47f7716d9b81161440c00eec32160f9266..c1980a8a7232ec4e5d91b276df3e60633697fa21 100644 >--- a/Source/WebCore/rendering/RenderBlockLineLayout.cpp >+++ b/Source/WebCore/rendering/RenderBlockLineLayout.cpp >@@ -564,11 +564,11 @@ void RenderBlockFlow::updateRubyForJustifiedText(RenderRubyRun& rubyRun, BidiRun > totalOpportunitiesInRun += opportunitiesInRun; > } > >- ASSERT(!rubyRun.hasOverrideLogicalContentWidth()); >+ ASSERT(!rubyRun.hasOverrideContentLogicalWidth()); > float newBaseWidth = rubyRun.logicalWidth() + totalExpansion + marginStartForChild(rubyRun) + marginEndForChild(rubyRun); > float newRubyRunWidth = rubyRun.logicalWidth() + totalExpansion; > rubyBase.setInitialOffset((newRubyRunWidth - newBaseWidth) / 2); >- rubyRun.setOverrideLogicalContentWidth(newRubyRunWidth); >+ rubyRun.setOverrideContentLogicalWidth(newRubyRunWidth); > rubyRun.setNeedsLayout(MarkOnlyThis); > rootBox.markDirty(); > if (RenderRubyText* rubyText = rubyRun.rubyText()) { >@@ -576,7 +576,7 @@ void RenderBlockFlow::updateRubyForJustifiedText(RenderRubyRun& rubyRun, BidiRun > textRootBox->markDirty(); > } > rubyRun.layoutBlock(true); >- rubyRun.clearOverrideLogicalContentWidth(); >+ rubyRun.clearOverrideContentLogicalWidth(); > r.box()->setExpansion(newRubyRunWidth - r.box()->logicalWidth()); > > totalLogicalWidth += totalExpansion; >diff --git a/Source/WebCore/rendering/RenderBox.cpp b/Source/WebCore/rendering/RenderBox.cpp >index dcb65f780e5b15066eec4b9ccbe60e585a96ba18..832ae32231eb4d24cc0a5341bc31590e26442cda 100644 >--- a/Source/WebCore/rendering/RenderBox.cpp >+++ b/Source/WebCore/rendering/RenderBox.cpp >@@ -98,13 +98,13 @@ using namespace HTMLNames; > > // Used by flexible boxes when flexing this element and by table cells. > typedef WTF::HashMap<const RenderBox*, LayoutUnit> OverrideSizeMap; >-static OverrideSizeMap* gOverrideHeightMap = nullptr; >-static OverrideSizeMap* gOverrideWidthMap = nullptr; >+static OverrideSizeMap* gOverrideContentLogicalHeightMap = nullptr; >+static OverrideSizeMap* gOverrideContentLogicalWidthMap = nullptr; > > // Used by grid elements to properly size their grid items. > typedef WTF::HashMap<const RenderBox*, std::optional<LayoutUnit>> OverrideOptionalSizeMap; >-static OverrideOptionalSizeMap* gOverrideContainingBlockLogicalHeightMap = nullptr; >-static OverrideOptionalSizeMap* gOverrideContainingBlockLogicalWidthMap = nullptr; >+static OverrideOptionalSizeMap* gOverrideContainingBlockContentLogicalHeightMap = nullptr; >+static OverrideOptionalSizeMap* gOverrideContainingBlockContentLogicalWidthMap = nullptr; > > // Size of border belt for autoscroll. When mouse pointer in border belt, > // autoscroll is started. >@@ -154,8 +154,8 @@ void RenderBox::willBeDestroyed() > if (frame().eventHandler().autoscrollRenderer() == this) > frame().eventHandler().stopAutoscrollTimer(true); > >- clearOverrideSize(); >- clearContainingBlockOverrideSize(); >+ clearOverrideContentSize(); >+ clearOverrideContainingBlockContentSize(); > > RenderBlock::removePercentHeightDescendantIfNeeded(*this); > >@@ -1020,107 +1020,107 @@ LayoutUnit RenderBox::maxPreferredLogicalWidth() const > return m_maxPreferredLogicalWidth; > } > >-bool RenderBox::hasOverrideLogicalContentHeight() const >+bool RenderBox::hasOverrideContentLogicalHeight() const > { >- return gOverrideHeightMap && gOverrideHeightMap->contains(this); >+ return gOverrideContentLogicalHeightMap && gOverrideContentLogicalHeightMap->contains(this); > } > >-bool RenderBox::hasOverrideLogicalContentWidth() const >+bool RenderBox::hasOverrideContentLogicalWidth() const > { >- return gOverrideWidthMap && gOverrideWidthMap->contains(this); >+ return gOverrideContentLogicalWidthMap && gOverrideContentLogicalWidthMap->contains(this); > } > >-void RenderBox::setOverrideLogicalContentHeight(LayoutUnit height) >+void RenderBox::setOverrideContentLogicalHeight(LayoutUnit height) > { >- if (!gOverrideHeightMap) >- gOverrideHeightMap = new OverrideSizeMap(); >- gOverrideHeightMap->set(this, height); >+ if (!gOverrideContentLogicalHeightMap) >+ gOverrideContentLogicalHeightMap = new OverrideSizeMap(); >+ gOverrideContentLogicalHeightMap->set(this, height); > } > >-void RenderBox::setOverrideLogicalContentWidth(LayoutUnit width) >+void RenderBox::setOverrideContentLogicalWidth(LayoutUnit width) > { >- if (!gOverrideWidthMap) >- gOverrideWidthMap = new OverrideSizeMap(); >- gOverrideWidthMap->set(this, width); >+ if (!gOverrideContentLogicalWidthMap) >+ gOverrideContentLogicalWidthMap = new OverrideSizeMap(); >+ gOverrideContentLogicalWidthMap->set(this, width); > } > >-void RenderBox::clearOverrideLogicalContentHeight() >+void RenderBox::clearOverrideContentLogicalHeight() > { >- if (gOverrideHeightMap) >- gOverrideHeightMap->remove(this); >+ if (gOverrideContentLogicalHeightMap) >+ gOverrideContentLogicalHeightMap->remove(this); > } > >-void RenderBox::clearOverrideLogicalContentWidth() >+void RenderBox::clearOverrideContentLogicalWidth() > { >- if (gOverrideWidthMap) >- gOverrideWidthMap->remove(this); >+ if (gOverrideContentLogicalWidthMap) >+ gOverrideContentLogicalWidthMap->remove(this); > } > >-void RenderBox::clearOverrideSize() >+void RenderBox::clearOverrideContentSize() > { >- clearOverrideLogicalContentHeight(); >- clearOverrideLogicalContentWidth(); >+ clearOverrideContentLogicalHeight(); >+ clearOverrideContentLogicalWidth(); > } > >-LayoutUnit RenderBox::overrideLogicalContentWidth() const >+LayoutUnit RenderBox::overrideContentLogicalWidth() const > { >- ASSERT(hasOverrideLogicalContentWidth()); >- return gOverrideWidthMap->get(this); >+ ASSERT(hasOverrideContentLogicalWidth()); >+ return gOverrideContentLogicalWidthMap->get(this); > } > >-LayoutUnit RenderBox::overrideLogicalContentHeight() const >+LayoutUnit RenderBox::overrideContentLogicalHeight() const > { >- ASSERT(hasOverrideLogicalContentHeight()); >- return gOverrideHeightMap->get(this); >+ ASSERT(hasOverrideContentLogicalHeight()); >+ return gOverrideContentLogicalHeightMap->get(this); > } > > std::optional<LayoutUnit> RenderBox::overrideContainingBlockContentLogicalWidth() const > { >- ASSERT(hasOverrideContainingBlockLogicalWidth()); >- return gOverrideContainingBlockLogicalWidthMap->get(this); >+ ASSERT(hasOverrideContainingBlockContentLogicalWidth()); >+ return gOverrideContainingBlockContentLogicalWidthMap->get(this); > } > > std::optional<LayoutUnit> RenderBox::overrideContainingBlockContentLogicalHeight() const > { >- ASSERT(hasOverrideContainingBlockLogicalHeight()); >- return gOverrideContainingBlockLogicalHeightMap->get(this); >+ ASSERT(hasOverrideContainingBlockContentLogicalHeight()); >+ return gOverrideContainingBlockContentLogicalHeightMap->get(this); > } > >-bool RenderBox::hasOverrideContainingBlockLogicalWidth() const >+bool RenderBox::hasOverrideContainingBlockContentLogicalWidth() const > { >- return gOverrideContainingBlockLogicalWidthMap && gOverrideContainingBlockLogicalWidthMap->contains(this); >+ return gOverrideContainingBlockContentLogicalWidthMap && gOverrideContainingBlockContentLogicalWidthMap->contains(this); > } > >-bool RenderBox::hasOverrideContainingBlockLogicalHeight() const >+bool RenderBox::hasOverrideContainingBlockContentLogicalHeight() const > { >- return gOverrideContainingBlockLogicalHeightMap && gOverrideContainingBlockLogicalHeightMap->contains(this); >+ return gOverrideContainingBlockContentLogicalHeightMap && gOverrideContainingBlockContentLogicalHeightMap->contains(this); > } > > void RenderBox::setOverrideContainingBlockContentLogicalWidth(std::optional<LayoutUnit> logicalWidth) > { >- if (!gOverrideContainingBlockLogicalWidthMap) >- gOverrideContainingBlockLogicalWidthMap = new OverrideOptionalSizeMap; >- gOverrideContainingBlockLogicalWidthMap->set(this, logicalWidth); >+ if (!gOverrideContainingBlockContentLogicalWidthMap) >+ gOverrideContainingBlockContentLogicalWidthMap = new OverrideOptionalSizeMap; >+ gOverrideContainingBlockContentLogicalWidthMap->set(this, logicalWidth); > } > > void RenderBox::setOverrideContainingBlockContentLogicalHeight(std::optional<LayoutUnit> logicalHeight) > { >- if (!gOverrideContainingBlockLogicalHeightMap) >- gOverrideContainingBlockLogicalHeightMap = new OverrideOptionalSizeMap; >- gOverrideContainingBlockLogicalHeightMap->set(this, logicalHeight); >+ if (!gOverrideContainingBlockContentLogicalHeightMap) >+ gOverrideContainingBlockContentLogicalHeightMap = new OverrideOptionalSizeMap; >+ gOverrideContainingBlockContentLogicalHeightMap->set(this, logicalHeight); > } > >-void RenderBox::clearContainingBlockOverrideSize() >+void RenderBox::clearOverrideContainingBlockContentSize() > { >- if (gOverrideContainingBlockLogicalWidthMap) >- gOverrideContainingBlockLogicalWidthMap->remove(this); >+ if (gOverrideContainingBlockContentLogicalWidthMap) >+ gOverrideContainingBlockContentLogicalWidthMap->remove(this); > clearOverrideContainingBlockContentLogicalHeight(); > } > > void RenderBox::clearOverrideContainingBlockContentLogicalHeight() > { >- if (gOverrideContainingBlockLogicalHeightMap) >- gOverrideContainingBlockLogicalHeightMap->remove(this); >+ if (gOverrideContainingBlockContentLogicalHeightMap) >+ gOverrideContainingBlockContentLogicalHeightMap->remove(this); > } > > LayoutUnit RenderBox::adjustBorderBoxLogicalWidthForBoxSizing(LayoutUnit width) const >@@ -1842,7 +1842,7 @@ LayoutUnit RenderBox::shrinkLogicalWidthToAvoidFloats(LayoutUnit childMarginStar > > LayoutUnit RenderBox::containingBlockLogicalWidthForContent() const > { >- if (hasOverrideContainingBlockLogicalWidth()) { >+ if (hasOverrideContainingBlockContentLogicalWidth()) { > if (auto overrideLogicalWidth = overrideContainingBlockContentLogicalWidth()) > return overrideLogicalWidth.value(); > } >@@ -1854,7 +1854,7 @@ LayoutUnit RenderBox::containingBlockLogicalWidthForContent() const > > LayoutUnit RenderBox::containingBlockLogicalHeightForContent(AvailableLogicalHeightType heightType) const > { >- if (hasOverrideContainingBlockLogicalHeight()) { >+ if (hasOverrideContainingBlockContentLogicalHeight()) { > if (auto overrideLogicalHeight = overrideContainingBlockContentLogicalHeight()) > return overrideLogicalHeight.value(); > } >@@ -1895,14 +1895,14 @@ LayoutUnit RenderBox::containingBlockAvailableLineWidthInFragment(RenderFragment > > LayoutUnit RenderBox::perpendicularContainingBlockLogicalHeight() const > { >- if (hasOverrideContainingBlockLogicalHeight()) { >+ if (hasOverrideContainingBlockContentLogicalHeight()) { > if (auto overrideLogicalHeight = overrideContainingBlockContentLogicalHeight()) > return overrideLogicalHeight.value(); > } > > RenderBlock* cb = containingBlock(); >- if (cb->hasOverrideLogicalContentHeight()) >- return cb->overrideLogicalContentHeight(); >+ if (cb->hasOverrideContentLogicalHeight()) >+ return cb->overrideContentLogicalHeight(); > > const RenderStyle& containingBlockStyle = cb->style(); > Length logicalHeightLength = containingBlockStyle.logicalHeight(); >@@ -2312,8 +2312,8 @@ void RenderBox::computeLogicalWidthInFragment(LogicalExtentComputedValues& compu > // width. Use the width from the style context. > // FIXME: Account for block-flow in flexible boxes. > // https://bugs.webkit.org/show_bug.cgi?id=46418 >- if (hasOverrideLogicalContentWidth() && (isRubyRun() || style().borderFit() == BorderFitLines || (parent()->isFlexibleBoxIncludingDeprecated()))) { >- computedValues.m_extent = overrideLogicalContentWidth() + borderAndPaddingLogicalWidth(); >+ if (hasOverrideContentLogicalWidth() && (isRubyRun() || style().borderFit() == BorderFitLines || (parent()->isFlexibleBoxIncludingDeprecated()))) { >+ computedValues.m_extent = overrideContentLogicalWidth() + borderAndPaddingLogicalWidth(); > return; > } > >@@ -2716,8 +2716,8 @@ RenderBox::LogicalExtentComputedValues RenderBox::computeLogicalHeight(LayoutUni > // grab our cached flexible height. > // FIXME: Account for block-flow in flexible boxes. > // https://bugs.webkit.org/show_bug.cgi?id=46418 >- if (hasOverrideLogicalContentHeight() && (parent()->isFlexibleBoxIncludingDeprecated() || parent()->isRenderGrid())) { >- h = Length(overrideLogicalContentHeight(), Fixed); >+ if (hasOverrideContentLogicalHeight() && (parent()->isFlexibleBoxIncludingDeprecated() || parent()->isRenderGrid())) { >+ h = Length(overrideContentLogicalHeight(), Fixed); > } else if (treatAsReplaced) > h = Length(computeReplacedLogicalHeight(), Fixed); > else { >@@ -2904,17 +2904,17 @@ std::optional<LayoutUnit> RenderBox::computePercentageLogicalHeight(const Length > > if (isHorizontal != cb->isHorizontalWritingMode()) > availableHeight = containingBlockChild->containingBlockLogicalWidthForContent(); >- else if (hasOverrideContainingBlockLogicalHeight()) >+ else if (hasOverrideContainingBlockContentLogicalHeight()) > availableHeight = overrideContainingBlockContentLogicalHeight(); > else if (is<RenderTableCell>(*cb)) { > if (!skippedAutoHeightContainingBlock) { > // Table cells violate what the CSS spec says to do with heights. Basically we > // don't care if the cell specified a height or not. We just always make ourselves > // be a percentage of the cell's current content height. >- if (!cb->hasOverrideLogicalContentHeight()) >+ if (!cb->hasOverrideContentLogicalHeight()) > return tableCellShouldHaveZeroInitialSize(*cb, *this, scrollsOverflowY()) ? std::optional<LayoutUnit>(0) : std::nullopt; > >- availableHeight = cb->overrideLogicalContentHeight(); >+ availableHeight = cb->overrideContentLogicalHeight(); > } > } else > availableHeight = cb->availableLogicalHeightForPercentageComputation(); >@@ -2924,13 +2924,13 @@ std::optional<LayoutUnit> RenderBox::computePercentageLogicalHeight(const Length > > LayoutUnit result = valueForLength(height, availableHeight.value() - rootMarginBorderPaddingHeight + (isTable() && isOutOfFlowPositioned() ? cb->paddingBefore() + cb->paddingAfter() : LayoutUnit())); > >- // |overrideLogicalContentHeight| is the maximum height made available by the >+ // |overrideContentLogicalHeight| is the maximum height made available by the > // cell to its percent height children when we decide they can determine the > // height of the cell. If the percent height child is box-sizing:content-box > // then we must subtract the border and padding from the cell's >- // |availableHeight| (given by |overrideLogicalContentHeight|) to arrive >+ // |availableHeight| (given by |overrideContentLogicalHeight|) to arrive > // at the child's computed height. >- bool subtractBorderAndPadding = isTable() || (is<RenderTableCell>(*cb) && !skippedAutoHeightContainingBlock && cb->hasOverrideLogicalContentHeight()); >+ bool subtractBorderAndPadding = isTable() || (is<RenderTableCell>(*cb) && !skippedAutoHeightContainingBlock && cb->hasOverrideContentLogicalHeight()); > if (subtractBorderAndPadding) { > result -= borderAndPaddingLogicalHeight(); > return std::max(LayoutUnit(), result); >@@ -3069,8 +3069,8 @@ LayoutUnit RenderBox::computeReplacedLogicalHeightUsing(SizeType heightType, Len > block->addPercentHeightDescendant(*const_cast<RenderBox*>(this)); > if (block->isFlexItem()) > stretchedHeight = downcast<RenderFlexibleBox>(block->parent())->childLogicalHeightForPercentageResolution(*block); >- else if (block->isGridItem() && block->hasOverrideLogicalContentHeight()) >- stretchedHeight = block->overrideLogicalContentHeight(); >+ else if (block->isGridItem() && block->hasOverrideContentLogicalHeight()) >+ stretchedHeight = block->overrideContentLogicalHeight(); > } > > // FIXME: This calculation is not patched for block-flow yet. >@@ -3135,8 +3135,8 @@ LayoutUnit RenderBox::availableLogicalHeightUsing(const Length& h, AvailableLogi > // artificially. We're going to rely on this cell getting expanded to some new > // height, and then when we lay out again we'll use the calculation below. > if (isTableCell() && (h.isAuto() || h.isPercentOrCalculated())) { >- if (hasOverrideLogicalContentHeight()) >- return overrideLogicalContentHeight(); >+ if (hasOverrideContentLogicalHeight()) >+ return overrideContentLogicalHeight(); > return logicalHeight() - borderAndPaddingLogicalHeight(); > } > >@@ -3205,7 +3205,7 @@ LayoutUnit RenderBox::containingBlockLogicalWidthForPositioned(const RenderBoxMo > if (checkForPerpendicularWritingMode && containingBlock.isHorizontalWritingMode() != isHorizontalWritingMode()) > return containingBlockLogicalHeightForPositioned(containingBlock, false); > >- if (hasOverrideContainingBlockLogicalWidth()) { >+ if (hasOverrideContainingBlockContentLogicalWidth()) { > if (auto overrideLogicalWidth = overrideContainingBlockContentLogicalWidth()) > return overrideLogicalWidth.value(); > } >@@ -3270,7 +3270,7 @@ LayoutUnit RenderBox::containingBlockLogicalHeightForPositioned(const RenderBoxM > if (checkForPerpendicularWritingMode && containingBlock.isHorizontalWritingMode() != isHorizontalWritingMode()) > return containingBlockLogicalWidthForPositioned(containingBlock, nullptr, false); > >- if (hasOverrideContainingBlockLogicalHeight()) { >+ if (hasOverrideContainingBlockContentLogicalHeight()) { > if (auto overrideLogicalHeight = overrideContainingBlockContentLogicalHeight()) > return overrideLogicalHeight.value(); > } >diff --git a/Source/WebCore/rendering/RenderBox.h b/Source/WebCore/rendering/RenderBox.h >index 8fcdfd481b6b9af2689ae36a2f946d8eb88e666f..1187716464e0aa70dd275f2e2297be0c693ede1b 100644 >--- a/Source/WebCore/rendering/RenderBox.h >+++ b/Source/WebCore/rendering/RenderBox.h >@@ -302,23 +302,23 @@ public: > // the border-box height/width like the regular height/width accessors on RenderBox. > // Right now, these are different than contentHeight/contentWidth because they still > // include the scrollbar height/width. >- LayoutUnit overrideLogicalContentWidth() const; >- LayoutUnit overrideLogicalContentHeight() const; >- bool hasOverrideLogicalContentHeight() const; >- bool hasOverrideLogicalContentWidth() const; >- void setOverrideLogicalContentHeight(LayoutUnit); >- void setOverrideLogicalContentWidth(LayoutUnit); >- void clearOverrideSize(); >- void clearOverrideLogicalContentHeight(); >- void clearOverrideLogicalContentWidth(); >+ LayoutUnit overrideContentLogicalWidth() const; >+ LayoutUnit overrideContentLogicalHeight() const; >+ bool hasOverrideContentLogicalHeight() const; >+ bool hasOverrideContentLogicalWidth() const; >+ void setOverrideContentLogicalHeight(LayoutUnit); >+ void setOverrideContentLogicalWidth(LayoutUnit); >+ void clearOverrideContentSize(); >+ void clearOverrideContentLogicalHeight(); >+ void clearOverrideContentLogicalWidth(); > > std::optional<LayoutUnit> overrideContainingBlockContentLogicalWidth() const; > std::optional<LayoutUnit> overrideContainingBlockContentLogicalHeight() const; >- bool hasOverrideContainingBlockLogicalWidth() const; >- bool hasOverrideContainingBlockLogicalHeight() const; >+ bool hasOverrideContainingBlockContentLogicalWidth() const; >+ bool hasOverrideContainingBlockContentLogicalHeight() const; > void setOverrideContainingBlockContentLogicalWidth(std::optional<LayoutUnit>); > void setOverrideContainingBlockContentLogicalHeight(std::optional<LayoutUnit>); >- void clearContainingBlockOverrideSize(); >+ void clearOverrideContainingBlockContentSize(); > void clearOverrideContainingBlockContentLogicalHeight(); > > LayoutSize offsetFromContainer(RenderElement&, const LayoutPoint&, bool* offsetDependsOnPoint = nullptr) const override; >diff --git a/Source/WebCore/rendering/RenderBoxModelObject.cpp b/Source/WebCore/rendering/RenderBoxModelObject.cpp >index e00e624c4fb82ec8598ca263b09d070e54b27b7b..5d1dfd497b23e632749e2138035bd6040d14816d 100644 >--- a/Source/WebCore/rendering/RenderBoxModelObject.cpp >+++ b/Source/WebCore/rendering/RenderBoxModelObject.cpp >@@ -333,7 +333,7 @@ bool RenderBoxModelObject::hasAutoHeightOrContainingBlockWithAutoHeight() const > return false; > } > >- if (thisBox && thisBox->isGridItem() && thisBox->hasOverrideContainingBlockLogicalHeight()) >+ if (thisBox && thisBox->isGridItem() && thisBox->hasOverrideContainingBlockContentLogicalHeight()) > return false; > > if (logicalHeightLength.isAuto() && !isOutOfFlowPositionedWithImplicitHeight(*this)) >diff --git a/Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp b/Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp >index e715219e26889690d3b5c61b3ff797b7763f1c18..92660c9f08d63434469efa48cffcd48142fce2a7 100644 >--- a/Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp >+++ b/Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp >@@ -152,15 +152,15 @@ static bool childDoesNotAffectWidthOrFlexing(RenderObject* child) > > static LayoutUnit contentWidthForChild(RenderBox* child) > { >- if (child->hasOverrideLogicalContentWidth()) >- return child->overrideLogicalContentWidth(); >+ if (child->hasOverrideContentLogicalWidth()) >+ return child->overrideContentLogicalWidth(); > return child->logicalWidth() - child->borderAndPaddingLogicalWidth(); > } > > static LayoutUnit contentHeightForChild(RenderBox* child) > { >- if (child->hasOverrideLogicalContentHeight()) >- return child->overrideLogicalContentHeight(); >+ if (child->hasOverrideContentLogicalHeight()) >+ return child->overrideContentLogicalHeight(); > return child->logicalHeight() - child->borderAndPaddingLogicalHeight(); > } > >@@ -355,7 +355,7 @@ static void gatherFlexChildrenInfo(FlexBoxIterator& iterator, bool relayoutChild > if (!childDoesNotAffectWidthOrFlexing(child) && child->style().boxFlex() > 0.0f) { > // We always have to lay out flexible objects again, since the flex distribution > // may have changed, and we need to reallocate space. >- child->clearOverrideSize(); >+ child->clearOverrideContentSize(); > if (!relayoutChildren) > child->setChildNeedsLayout(MarkOnlyThis); > haveFlex = true; >@@ -583,7 +583,7 @@ void RenderDeprecatedFlexibleBox::layoutHorizontalBox(bool relayoutChildren) > if (allowedChildFlex(child, expanding, i)) { > LayoutUnit spaceAdd = LayoutUnit(spaceAvailableThisPass * (child->style().boxFlex() / totalFlex)); > if (spaceAdd) { >- child->setOverrideLogicalContentWidth(contentWidthForChild(child) + spaceAdd); >+ child->setOverrideContentLogicalWidth(contentWidthForChild(child) + spaceAdd); > flexingChildren = true; > relayoutChildren = true; > } >@@ -600,7 +600,7 @@ void RenderDeprecatedFlexibleBox::layoutHorizontalBox(bool relayoutChildren) > LayoutUnit spaceAdd = groupRemainingSpace > 0 ? 1 : -1; > for (RenderBox* child = iterator.first(); child && groupRemainingSpace; child = iterator.next()) { > if (allowedChildFlex(child, expanding, i)) { >- child->setOverrideLogicalContentWidth(contentWidthForChild(child) + spaceAdd); >+ child->setOverrideContentLogicalWidth(contentWidthForChild(child) + spaceAdd); > flexingChildren = true; > relayoutChildren = true; > remainingSpace -= spaceAdd; >@@ -840,7 +840,7 @@ void RenderDeprecatedFlexibleBox::layoutVerticalBox(bool relayoutChildren) > if (allowedChildFlex(child, expanding, i)) { > LayoutUnit spaceAdd = spaceAvailableThisPass * (child->style().boxFlex() / totalFlex); > if (spaceAdd) { >- child->setOverrideLogicalContentHeight(contentHeightForChild(child) + spaceAdd); >+ child->setOverrideContentLogicalHeight(contentHeightForChild(child) + spaceAdd); > flexingChildren = true; > relayoutChildren = true; > } >@@ -857,7 +857,7 @@ void RenderDeprecatedFlexibleBox::layoutVerticalBox(bool relayoutChildren) > LayoutUnit spaceAdd = groupRemainingSpace > 0 ? 1 : -1; > for (RenderBox* child = iterator.first(); child && groupRemainingSpace; child = iterator.next()) { > if (allowedChildFlex(child, expanding, i)) { >- child->setOverrideLogicalContentHeight(contentHeightForChild(child) + spaceAdd); >+ child->setOverrideContentLogicalHeight(contentHeightForChild(child) + spaceAdd); > flexingChildren = true; > relayoutChildren = true; > remainingSpace -= spaceAdd; >@@ -935,7 +935,7 @@ void RenderDeprecatedFlexibleBox::applyLineClamp(FlexBoxIterator& iterator, bool > if (childDoesNotAffectWidthOrFlexing(child)) > continue; > >- child->clearOverrideSize(); >+ child->clearOverrideContentSize(); > if (relayoutChildren || (child->isReplaced() && (child->style().width().isPercentOrCalculated() || child->style().height().isPercentOrCalculated())) > || (child->style().height().isAuto() && is<RenderBlockFlow>(*child))) { > child->setChildNeedsLayout(MarkOnlyThis); >@@ -972,7 +972,7 @@ void RenderDeprecatedFlexibleBox::applyLineClamp(FlexBoxIterator& iterator, bool > continue; > > child->setChildNeedsLayout(MarkOnlyThis); >- child->setOverrideLogicalContentHeight(newHeight - child->verticalBorderAndPaddingExtent()); >+ child->setOverrideContentLogicalHeight(newHeight - child->verticalBorderAndPaddingExtent()); > child->layoutIfNeeded(); > > // FIXME: For now don't support RTL. >@@ -1035,7 +1035,7 @@ void RenderDeprecatedFlexibleBox::clearLineClamp() > if (childDoesNotAffectWidthOrFlexing(child)) > continue; > >- child->clearOverrideSize(); >+ child->clearOverrideContentSize(); > if ((child->isReplaced() && (child->style().width().isPercentOrCalculated() || child->style().height().isPercentOrCalculated())) > || (child->style().height().isAuto() && is<RenderBlockFlow>(*child))) { > child->setChildNeedsLayout(); >diff --git a/Source/WebCore/rendering/RenderFlexibleBox.cpp b/Source/WebCore/rendering/RenderFlexibleBox.cpp >index 7b4013bf76bfc7ff121d0d7fa17775f3578f031a..3f86fd09f683d25f53b73ce9306028089b60bee8 100644 >--- a/Source/WebCore/rendering/RenderFlexibleBox.cpp >+++ b/Source/WebCore/rendering/RenderFlexibleBox.cpp >@@ -817,7 +817,7 @@ void RenderFlexibleBox::clearCachedMainSizeForChild(const RenderBox& child) > > LayoutUnit RenderFlexibleBox::computeInnerFlexBaseSizeForChild(RenderBox& child, LayoutUnit mainAxisBorderAndPadding, bool relayoutChildren) > { >- child.clearOverrideSize(); >+ child.clearOverrideContentSize(); > > Length flexBasis = flexBasisForChild(child); > if (mainAxisLengthIsDefinite(child, flexBasis)) >@@ -1122,10 +1122,10 @@ std::optional<LayoutUnit> RenderFlexibleBox::crossSizeForPercentageResolution(co > return std::nullopt; > > // Here we implement https://drafts.csswg.org/css-flexbox/#algo-stretch >- if (hasOrthogonalFlow(child) && child.hasOverrideLogicalContentWidth()) >- return child.overrideLogicalContentWidth(); >- if (!hasOrthogonalFlow(child) && child.hasOverrideLogicalContentHeight()) >- return child.overrideLogicalContentHeight(); >+ if (hasOrthogonalFlow(child) && child.hasOverrideContentLogicalWidth()) >+ return child.overrideContentLogicalWidth(); >+ if (!hasOrthogonalFlow(child) && child.hasOverrideContentLogicalHeight()) >+ return child.overrideContentLogicalHeight(); > > // We don't currently implement the optimization from > // https://drafts.csswg.org/css-flexbox/#definite-sizes case 1. While that >@@ -1154,8 +1154,8 @@ std::optional<LayoutUnit> RenderFlexibleBox::mainSizeForPercentageResolution(con > } > > if (hasOrthogonalFlow(child)) >- return child.hasOverrideLogicalContentHeight() ? std::optional<LayoutUnit>(child.overrideLogicalContentHeight()) : std::nullopt; >- return child.hasOverrideLogicalContentWidth() ? std::optional<LayoutUnit>(child.overrideLogicalContentWidth()) : std::nullopt; >+ return child.hasOverrideContentLogicalHeight() ? std::optional<LayoutUnit>(child.overrideContentLogicalHeight()) : std::nullopt; >+ return child.hasOverrideContentLogicalWidth() ? std::optional<LayoutUnit>(child.overrideContentLogicalWidth()) : std::nullopt; > } > > std::optional<LayoutUnit> RenderFlexibleBox::childLogicalHeightForPercentageResolution(const RenderBox& child) >@@ -1191,7 +1191,7 @@ FlexItem RenderFlexibleBox::constructFlexItem(RenderBox& child, bool relayoutChi > // min/max/preferred size, run layout on it now to make sure its logical > // height and scroll bars are up to date. > if (childHasIntrinsicMainAxisSize(child) && child.needsLayout()) { >- child.clearOverrideSize(); >+ child.clearOverrideContentSize(); > child.setChildNeedsLayout(MarkOnlyThis); > child.layoutIfNeeded(); > cacheChildMainSize(child); >@@ -1379,9 +1379,9 @@ static LayoutUnit alignmentOffset(LayoutUnit availableFreeSpace, ItemPosition po > void RenderFlexibleBox::setOverrideMainAxisContentSizeForChild(RenderBox& child, LayoutUnit childPreferredSize) > { > if (hasOrthogonalFlow(child)) >- child.setOverrideLogicalContentHeight(childPreferredSize); >+ child.setOverrideContentLogicalHeight(childPreferredSize); > else >- child.setOverrideLogicalContentWidth(childPreferredSize); >+ child.setOverrideContentLogicalWidth(childPreferredSize); > } > > LayoutUnit RenderFlexibleBox::staticMainAxisPositionForPositionedChild(const RenderBox& child) >@@ -1810,8 +1810,8 @@ void RenderFlexibleBox::applyStretchAlignmentToChild(RenderBox& child, LayoutUni > // So, redo it here. > childNeedsRelayout = true; > } >- if (childNeedsRelayout || !child.hasOverrideLogicalContentHeight()) >- child.setOverrideLogicalContentHeight(desiredLogicalHeight - child.borderAndPaddingLogicalHeight()); >+ if (childNeedsRelayout || !child.hasOverrideContentLogicalHeight()) >+ child.setOverrideContentLogicalHeight(desiredLogicalHeight - child.borderAndPaddingLogicalHeight()); > if (childNeedsRelayout) { > child.setLogicalHeight(LayoutUnit()); > // We cache the child's intrinsic content logical height to avoid it being >@@ -1832,7 +1832,7 @@ void RenderFlexibleBox::applyStretchAlignmentToChild(RenderBox& child, LayoutUni > childWidth = child.constrainLogicalWidthInFragmentByMinMax(childWidth, crossAxisContentExtent(), *this, nullptr); > > if (childWidth != child.logicalWidth()) { >- child.setOverrideLogicalContentWidth(childWidth - child.borderAndPaddingLogicalWidth()); >+ child.setOverrideContentLogicalWidth(childWidth - child.borderAndPaddingLogicalWidth()); > child.setChildNeedsLayout(MarkOnlyThis); > child.layoutIfNeeded(); > } >diff --git a/Source/WebCore/rendering/RenderFullScreen.cpp b/Source/WebCore/rendering/RenderFullScreen.cpp >index ef725eec4f32f6216402c6a84fd1f08c03d37ee3..d24d50de39eeb4646ee7df3ea40b473b5b78bcf0 100644 >--- a/Source/WebCore/rendering/RenderFullScreen.cpp >+++ b/Source/WebCore/rendering/RenderFullScreen.cpp >@@ -170,7 +170,7 @@ void RenderFullScreen::unwrapRenderer(bool& requiresRenderTreeRebuild) > // may have set one on the child, and we don't want to leave that > // lying around on the child. > if (is<RenderBox>(*child)) >- downcast<RenderBox>(*child).clearOverrideSize(); >+ downcast<RenderBox>(*child).clearOverrideContentSize(); > auto childToMove = builder.detach(*child->parent(), *child); > builder.attach(*parent(), WTFMove(childToMove), this); > parent()->setNeedsLayoutAndPrefWidthsRecalc(); >diff --git a/Source/WebCore/rendering/RenderGrid.cpp b/Source/WebCore/rendering/RenderGrid.cpp >index bda80a019e55b5d973a80c56decfdeb4c42d4977..c76492ff6fa9c651ff3f32d0af5c43c99d07ba68 100644 >--- a/Source/WebCore/rendering/RenderGrid.cpp >+++ b/Source/WebCore/rendering/RenderGrid.cpp >@@ -213,7 +213,7 @@ void RenderGrid::layoutBlock(bool relayoutChildren, LayoutUnit) > LayoutSize previousSize = size(); > // FIXME: We should use RenderBlock::hasDefiniteLogicalHeight() but it does not work for positioned stuff. > // FIXME: Consider caching the hasDefiniteLogicalHeight value throughout the layout. >- bool hasDefiniteLogicalHeight = hasOverrideLogicalContentHeight() || computeContentLogicalHeight(MainOrPreferredSize, style().logicalHeight(), std::nullopt); >+ bool hasDefiniteLogicalHeight = hasOverrideContentLogicalHeight() || computeContentLogicalHeight(MainOrPreferredSize, style().logicalHeight(), std::nullopt); > > // We need to clear both own and containingBlock override sizes of orthogonal items to ensure we get the > // same result when grid's intrinsic size is computed again in the updateLogicalWidth call bellow. >@@ -221,8 +221,8 @@ void RenderGrid::layoutBlock(bool relayoutChildren, LayoutUnit) > for (auto* child = firstChildBox(); child; child = child->nextSiblingBox()) { > if (child->isOutOfFlowPositioned() || !GridLayoutFunctions::isOrthogonalChild(*this, *child)) > continue; >- child->clearOverrideSize(); >- child->clearContainingBlockOverrideSize(); >+ child->clearOverrideContentSize(); >+ child->clearOverrideContainingBlockContentSize(); > child->setNeedsLayout(); > child->layoutIfNeeded(); > } >@@ -874,8 +874,8 @@ void RenderGrid::layoutGridItems() > > // Because the grid area cannot be styled, we don't need to adjust > // the grid breadth to account for 'box-sizing'. >- std::optional<LayoutUnit> oldOverrideContainingBlockContentLogicalWidth = child->hasOverrideContainingBlockLogicalWidth() ? child->overrideContainingBlockContentLogicalWidth() : LayoutUnit(); >- std::optional<LayoutUnit> oldOverrideContainingBlockContentLogicalHeight = child->hasOverrideContainingBlockLogicalHeight() ? child->overrideContainingBlockContentLogicalHeight() : LayoutUnit(); >+ std::optional<LayoutUnit> oldOverrideContainingBlockContentLogicalWidth = child->hasOverrideContainingBlockContentLogicalWidth() ? child->overrideContainingBlockContentLogicalWidth() : LayoutUnit(); >+ std::optional<LayoutUnit> oldOverrideContainingBlockContentLogicalHeight = child->hasOverrideContainingBlockContentLogicalHeight() ? child->overrideContainingBlockContentLogicalHeight() : LayoutUnit(); > > LayoutUnit overrideContainingBlockContentLogicalWidth = gridAreaBreadthForChildIncludingAlignmentOffsets(*child, ForColumns); > LayoutUnit overrideContainingBlockContentLogicalHeight = gridAreaBreadthForChildIncludingAlignmentOffsets(*child, ForRows); >@@ -1065,7 +1065,7 @@ void RenderGrid::applyStretchAlignmentToChildIfNeeded(RenderBox& child) > > // We clear height override values because we will decide now whether it's allowed or > // not, evaluating the conditions which might have changed since the old values were set. >- child.clearOverrideLogicalContentHeight(); >+ child.clearOverrideContentLogicalHeight(); > > GridTrackSizingDirection childBlockDirection = GridLayoutFunctions::flowAwareDirectionForChild(*this, child, ForRows); > bool blockFlowIsColumnAxis = childBlockDirection == ForRows; >@@ -1073,7 +1073,7 @@ void RenderGrid::applyStretchAlignmentToChildIfNeeded(RenderBox& child) > if (allowedToStretchChildBlockSize) { > LayoutUnit stretchedLogicalHeight = availableAlignmentSpaceForChildBeforeStretching(GridLayoutFunctions::overrideContainingBlockContentSizeForChild(child, childBlockDirection).value(), child); > LayoutUnit desiredLogicalHeight = child.constrainLogicalHeightByMinMax(stretchedLogicalHeight, LayoutUnit(-1)); >- child.setOverrideLogicalContentHeight(desiredLogicalHeight - child.borderAndPaddingLogicalHeight()); >+ child.setOverrideContentLogicalHeight(desiredLogicalHeight - child.borderAndPaddingLogicalHeight()); > if (desiredLogicalHeight != child.logicalHeight()) { > // FIXME: Can avoid laying out here in some cases. See https://webkit.org/b/87905. > child.setLogicalHeight(LayoutUnit()); >diff --git a/Source/WebCore/rendering/RenderRubyBase.cpp b/Source/WebCore/rendering/RenderRubyBase.cpp >index 7bc1aa568a3870bf7cd700ae0c85e12140e136ac..50456180f361fc4b4f2926b36248b4b4db697918 100644 >--- a/Source/WebCore/rendering/RenderRubyBase.cpp >+++ b/Source/WebCore/rendering/RenderRubyBase.cpp >@@ -67,13 +67,13 @@ ETextAlign RenderRubyBase::textAlignmentForLine(bool /* endsWithSoftBreak */) co > > void RenderRubyBase::adjustInlineDirectionLineBounds(int expansionOpportunityCount, float& logicalLeft, float& logicalWidth) const > { >- if (rubyRun()->hasOverrideLogicalContentWidth() && firstRootBox() && !firstRootBox()->nextRootBox()) { >+ if (rubyRun()->hasOverrideContentLogicalWidth() && firstRootBox() && !firstRootBox()->nextRootBox()) { > logicalLeft += m_initialOffset; > logicalWidth -= 2 * m_initialOffset; > return; > } > >- LayoutUnit maxPreferredLogicalWidth = rubyRun() && rubyRun()->hasOverrideLogicalContentWidth() ? rubyRun()->overrideLogicalContentWidth() : this->maxPreferredLogicalWidth(); >+ LayoutUnit maxPreferredLogicalWidth = rubyRun() && rubyRun()->hasOverrideContentLogicalWidth() ? rubyRun()->overrideContentLogicalWidth() : this->maxPreferredLogicalWidth(); > if (maxPreferredLogicalWidth >= logicalWidth) > return; > >diff --git a/Source/WebCore/rendering/RenderTableCell.cpp b/Source/WebCore/rendering/RenderTableCell.cpp >index e095ec5794681b0a5403c8ab05e407a0f29dd2f8..8966ba07cc873c077dfa747cd588e1dc6a176e72 100644 >--- a/Source/WebCore/rendering/RenderTableCell.cpp >+++ b/Source/WebCore/rendering/RenderTableCell.cpp >@@ -328,10 +328,10 @@ LayoutUnit RenderTableCell::paddingAfter() const > return computedCSSPaddingAfter() + intrinsicPaddingAfter(); > } > >-void RenderTableCell::setOverrideLogicalContentHeightFromRowHeight(LayoutUnit rowHeight) >+void RenderTableCell::setOverrideContentLogicalHeightFromRowHeight(LayoutUnit rowHeight) > { > clearIntrinsicPadding(); >- setOverrideLogicalContentHeight(std::max<LayoutUnit>(0, rowHeight - borderAndPaddingLogicalHeight())); >+ setOverrideContentLogicalHeight(std::max<LayoutUnit>(0, rowHeight - borderAndPaddingLogicalHeight())); > } > > LayoutSize RenderTableCell::offsetFromContainer(RenderElement& container, const LayoutPoint& point, bool* offsetDependsOnPoint) const >diff --git a/Source/WebCore/rendering/RenderTableCell.h b/Source/WebCore/rendering/RenderTableCell.h >index dc9c5e181cc5f01bb9187adeac67b4f9a7aa296e..232855a5520ad32df83887a77828981dad3ea8db 100644 >--- a/Source/WebCore/rendering/RenderTableCell.h >+++ b/Source/WebCore/rendering/RenderTableCell.h >@@ -102,7 +102,7 @@ public: > LayoutUnit paddingBefore() const override; > LayoutUnit paddingAfter() const override; > >- void setOverrideLogicalContentHeightFromRowHeight(LayoutUnit); >+ void setOverrideContentLogicalHeightFromRowHeight(LayoutUnit); > > void scrollbarsChanged(bool horizontalScrollbarChanged, bool verticalScrollbarChanged) override; > >diff --git a/Source/WebCore/rendering/RenderTableSection.cpp b/Source/WebCore/rendering/RenderTableSection.cpp >index c7e7bd637a09730980a8a22ed55209fabd1c214d..175ec0437e9ce9a1d74e19022dce57826f060b94 100644 >--- a/Source/WebCore/rendering/RenderTableSection.cpp >+++ b/Source/WebCore/rendering/RenderTableSection.cpp >@@ -285,9 +285,9 @@ LayoutUnit RenderTableSection::calcRowLogicalHeight() > // For row spanning cells, |r| is the last row in the span. > unsigned cellStartRow = cell->rowIndex(); > >- if (cell->hasOverrideLogicalContentHeight()) { >+ if (cell->hasOverrideContentLogicalHeight()) { > cell->clearIntrinsicPadding(); >- cell->clearOverrideSize(); >+ cell->clearOverrideContentSize(); > cell->setChildNeedsLayout(MarkOnlyThis); > cell->layoutIfNeeded(); > } >@@ -524,7 +524,7 @@ void RenderTableSection::relayoutCellIfFlexed(RenderTableCell& cell, int rowInde > // Alignment within a cell is based off the calculated > // height, which becomes irrelevant once the cell has > // been resized based off its percentage. >- cell.setOverrideLogicalContentHeightFromRowHeight(rowHeight); >+ cell.setOverrideContentLogicalHeightFromRowHeight(rowHeight); > cell.layoutIfNeeded(); > > if (!cell.isBaselineAligned())
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 185609
: 340309