Changeset 268919 in webkit
- Timestamp:
- Oct 23, 2020, 2:55:25 AM (6 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 22 edited
-
ChangeLog (modified) (1 diff)
-
WebCore.order (modified) (3 diffs)
-
rendering/ComplexLineLayout.cpp (modified) (2 diffs)
-
rendering/GridLayoutFunctions.cpp (modified) (1 diff)
-
rendering/GridLayoutFunctions.h (modified) (1 diff)
-
rendering/GridTrackSizingAlgorithm.cpp (modified) (9 diffs)
-
rendering/GridTrackSizingAlgorithm.h (modified) (1 diff)
-
rendering/RenderBlock.cpp (modified) (4 diffs)
-
rendering/RenderBlockFlow.cpp (modified) (2 diffs)
-
rendering/RenderBox.cpp (modified) (19 diffs)
-
rendering/RenderBox.h (modified) (1 diff)
-
rendering/RenderBoxModelObject.cpp (modified) (4 diffs)
-
rendering/RenderBoxModelObject.h (modified) (1 diff)
-
rendering/RenderDeprecatedFlexibleBox.cpp (modified) (10 diffs)
-
rendering/RenderFlexibleBox.cpp (modified) (8 diffs)
-
rendering/RenderFullScreen.cpp (modified) (1 diff)
-
rendering/RenderGrid.cpp (modified) (11 diffs)
-
rendering/RenderRubyBase.cpp (modified) (2 diffs)
-
rendering/RenderTable.cpp (modified) (1 diff)
-
rendering/RenderTableCell.cpp (modified) (1 diff)
-
rendering/RenderTableCell.h (modified) (1 diff)
-
rendering/RenderTableSection.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r268907 r268919 1 2020-10-21 Sergio Villar Senin <svillar@igalia.com> 2 3 Rename override sizes to overriding sizes 4 https://bugs.webkit.org/show_bug.cgi?id=217898 5 6 Reviewed by Darin Adler. 7 8 We've been traditionally using the word "override" to refer to those sizes that were explicitly set by 9 layout systems like tables, flex or grid. However that's a grammatical mistake. override is a verb which 10 does not work well as a noun. It'd be more correct to refer to them as "overriding" sizes. 11 12 No new tests required as this is just a renaming. 13 14 * WebCore.order: 15 * rendering/ComplexLineLayout.cpp: 16 (WebCore::ComplexLineLayout::updateRubyForJustifiedText): 17 * rendering/GridLayoutFunctions.cpp: 18 (WebCore::GridLayoutFunctions::hasOverridingContainingBlockContentSizeForChild): 19 (WebCore::GridLayoutFunctions::overridingContainingBlockContentSizeForChild): 20 (WebCore::GridLayoutFunctions::hasOverrideContainingBlockContentSizeForChild): Deleted. 21 (WebCore::GridLayoutFunctions::overrideContainingBlockContentSizeForChild): Deleted. 22 * rendering/GridLayoutFunctions.h: 23 * rendering/GridTrackSizingAlgorithm.cpp: 24 (WebCore::shouldClearOverridingContainingBlockContentSizeForChild): 25 (WebCore::setOverridingContainingBlockContentSizeForChild): 26 (WebCore::GridTrackSizingAlgorithmStrategy::logicalHeightForChild const): 27 (WebCore::GridTrackSizingAlgorithmStrategy::minContentForChild const): 28 (WebCore::GridTrackSizingAlgorithmStrategy::maxContentForChild const): 29 (WebCore::GridTrackSizingAlgorithmStrategy::updateOverridingContainingBlockContentSizeForChild const): 30 (WebCore::GridTrackSizingAlgorithmStrategy::minLogicalSizeForChild const): 31 (WebCore::DefiniteSizeStrategy::minLogicalSizeForChild const): 32 (WebCore::DefiniteSizeStrategy::minContentForChild const): 33 (WebCore::shouldClearOverrideContainingBlockContentSizeForChild): Deleted. 34 (WebCore::setOverrideContainingBlockContentSizeForChild): Deleted. 35 (WebCore::GridTrackSizingAlgorithmStrategy::updateOverrideContainingBlockContentSizeForChild const): Deleted. 36 * rendering/GridTrackSizingAlgorithm.h: 37 * rendering/RenderBlock.cpp: 38 (WebCore::RenderBlock::insertPositionedObject): 39 (WebCore::RenderBlock::computeChildPreferredLogicalWidths const): 40 (WebCore::RenderBlock::availableLogicalHeightForPercentageComputation const): 41 * rendering/RenderBlockFlow.cpp: 42 (WebCore::RenderBlockFlow::fitBorderToLinesIfNeeded): 43 * rendering/RenderBox.cpp: 44 (WebCore::RenderBox::willBeDestroyed): 45 (WebCore::RenderBox::styleDidChange): 46 (WebCore::RenderBox::hasOverridingLogicalHeight const): 47 (WebCore::RenderBox::hasOverridingLogicalWidth const): 48 (WebCore::RenderBox::setOverridingLogicalHeight): 49 (WebCore::RenderBox::setOverridingLogicalWidth): 50 (WebCore::RenderBox::clearOverridingLogicalHeight): 51 (WebCore::RenderBox::clearOverridingLogicalWidth): 52 (WebCore::RenderBox::clearOverridingContentSize): 53 (WebCore::RenderBox::overridingLogicalWidth const): 54 (WebCore::RenderBox::overridingLogicalHeight const): 55 (WebCore::RenderBox::overridingContainingBlockContentWidth const): 56 (WebCore::RenderBox::overridingContainingBlockContentHeight const): 57 (WebCore::RenderBox::hasOverridingContainingBlockContentWidth const): 58 (WebCore::RenderBox::hasOverridingContainingBlockContentHeight const): 59 (WebCore::RenderBox::overridingContainingBlockContentLogicalWidth const): 60 (WebCore::RenderBox::overridingContainingBlockContentLogicalHeight const): 61 (WebCore::RenderBox::hasOverridingContainingBlockContentLogicalWidth const): 62 (WebCore::RenderBox::hasOverridingContainingBlockContentLogicalHeight const): 63 (WebCore::RenderBox::setOverridingContainingBlockContentLogicalWidth): 64 (WebCore::RenderBox::setOverridingContainingBlockContentLogicalHeight): 65 (WebCore::RenderBox::clearOverridingContainingBlockContentSize): 66 (WebCore::RenderBox::clearOverridingContainingBlockContentLogicalHeight): 67 (WebCore::RenderBox::containingBlockLogicalWidthForContent const): 68 (WebCore::RenderBox::containingBlockLogicalHeightForContent const): 69 (WebCore::RenderBox::perpendicularContainingBlockLogicalHeight const): 70 (WebCore::RenderBox::computeLogicalWidthInFragment const): 71 (WebCore::RenderBox::cacheIntrinsicContentLogicalHeightForFlexItem const): 72 (WebCore::RenderBox::computeLogicalHeight const): 73 (WebCore::RenderBox::computePercentageLogicalHeight const): 74 (WebCore::RenderBox::computeReplacedLogicalHeightUsing const): 75 (WebCore::RenderBox::availableLogicalHeightUsing const): 76 (WebCore::RenderBox::containingBlockLogicalWidthForPositioned const): 77 (WebCore::RenderBox::containingBlockLogicalHeightForPositioned const): 78 (WebCore::RenderBox::hasOverrideLogicalHeight const): Deleted. 79 (WebCore::RenderBox::hasOverrideLogicalWidth const): Deleted. 80 (WebCore::RenderBox::setOverrideLogicalHeight): Deleted. 81 (WebCore::RenderBox::setOverrideLogicalWidth): Deleted. 82 (WebCore::RenderBox::clearOverrideLogicalHeight): Deleted. 83 (WebCore::RenderBox::clearOverrideLogicalWidth): Deleted. 84 (WebCore::RenderBox::clearOverrideContentSize): Deleted. 85 (WebCore::RenderBox::overrideLogicalWidth const): Deleted. 86 (WebCore::RenderBox::overrideLogicalHeight const): Deleted. 87 (WebCore::RenderBox::overrideContainingBlockContentWidth const): Deleted. 88 (WebCore::RenderBox::overrideContainingBlockContentHeight const): Deleted. 89 (WebCore::RenderBox::hasOverrideContainingBlockContentWidth const): Deleted. 90 (WebCore::RenderBox::hasOverrideContainingBlockContentHeight const): Deleted. 91 (WebCore::RenderBox::overrideContainingBlockContentLogicalWidth const): Deleted. 92 (WebCore::RenderBox::overrideContainingBlockContentLogicalHeight const): Deleted. 93 (WebCore::RenderBox::hasOverrideContainingBlockContentLogicalWidth const): Deleted. 94 (WebCore::RenderBox::hasOverrideContainingBlockContentLogicalHeight const): Deleted. 95 (WebCore::RenderBox::setOverrideContainingBlockContentLogicalWidth): Deleted. 96 (WebCore::RenderBox::setOverrideContainingBlockContentLogicalHeight): Deleted. 97 (WebCore::RenderBox::clearOverrideContainingBlockContentSize): Deleted. 98 (WebCore::RenderBox::clearOverrideContainingBlockContentLogicalHeight): Deleted. 99 * rendering/RenderBox.h: 100 (WebCore::RenderBox::overridingContentLogicalWidth const): 101 (WebCore::RenderBox::overridingContentLogicalHeight const): 102 (WebCore::RenderBox::overrideContentLogicalWidth const): Deleted. 103 (WebCore::RenderBox::overrideContentLogicalHeight const): Deleted. 104 * rendering/RenderBoxModelObject.cpp: 105 (WebCore::RenderBoxModelObject::hasAutoHeightOrContainingBlockWithAutoHeight const): 106 (WebCore::RenderBoxModelObject::relativePositionOffset const): 107 * rendering/RenderBoxModelObject.h: 108 (WebCore::RenderBoxModelObject::overridingContainingBlockContentWidth const): 109 (WebCore::RenderBoxModelObject::overridingContainingBlockContentHeight const): 110 (WebCore::RenderBoxModelObject::hasOverridingContainingBlockContentWidth const): 111 (WebCore::RenderBoxModelObject::hasOverridingContainingBlockContentHeight const): 112 (WebCore::RenderBoxModelObject::overrideContainingBlockContentWidth const): Deleted. 113 (WebCore::RenderBoxModelObject::overrideContainingBlockContentHeight const): Deleted. 114 (WebCore::RenderBoxModelObject::hasOverrideContainingBlockContentWidth const): Deleted. 115 (WebCore::RenderBoxModelObject::hasOverrideContainingBlockContentHeight const): Deleted. 116 * rendering/RenderDeprecatedFlexibleBox.cpp: 117 (WebCore::widthForChild): 118 (WebCore::heightForChild): 119 (WebCore::gatherFlexChildrenInfo): 120 (WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox): 121 (WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox): 122 (WebCore::RenderDeprecatedFlexibleBox::applyLineClamp): 123 (WebCore::RenderDeprecatedFlexibleBox::clearLineClamp): 124 * rendering/RenderFlexibleBox.cpp: 125 (WebCore::RenderFlexibleBox::childIntrinsicLogicalWidth const): 126 (WebCore::RenderFlexibleBox::computeInnerFlexBaseSizeForChild): 127 (WebCore::RenderFlexibleBox::crossSizeForPercentageResolution): 128 (WebCore::RenderFlexibleBox::mainSizeForPercentageResolution): 129 (WebCore::RenderFlexibleBox::constructFlexItem): 130 (WebCore::RenderFlexibleBox::setOverrideMainAxisContentSizeForChild): 131 (WebCore::RenderFlexibleBox::applyStretchAlignmentToChild): 132 * rendering/RenderFullScreen.cpp: 133 (WebCore::RenderFullScreen::unwrapRenderer): 134 * rendering/RenderGrid.cpp: 135 (WebCore::RenderGrid::layoutBlock): 136 (WebCore::RenderGrid::placeItemsOnGrid const): 137 (WebCore::overrideSizeChanged): 138 (WebCore::RenderGrid::updateGridAreaLogicalSize const): 139 (WebCore::RenderGrid::layoutPositionedObject): 140 (WebCore::RenderGrid::applyStretchAlignmentToChildIfNeeded): 141 (WebCore::RenderGrid::updateAutoMarginsInRowAxisIfNeeded): 142 (WebCore::RenderGrid::updateAutoMarginsInColumnAxisIfNeeded): 143 (WebCore::RenderGrid::gridAreaPositionForOutOfFlowChild const): 144 * rendering/RenderRubyBase.cpp: 145 (WebCore::RenderRubyBase::adjustInlineDirectionLineBounds const): 146 * rendering/RenderTable.cpp: 147 (WebCore::RenderTable::updateLogicalWidth): 148 * rendering/RenderTableCell.cpp: 149 (WebCore::RenderTableCell::setOverridingLogicalHeightFromRowHeight): 150 (WebCore::RenderTableCell::setOverrideLogicalHeightFromRowHeight): Deleted. 151 * rendering/RenderTableCell.h: 152 * rendering/RenderTableSection.cpp: 153 (WebCore::RenderTableSection::calcRowLogicalHeight): 154 (WebCore::RenderTableSection::relayoutCellIfFlexed): 155 1 156 2020-10-23 Philippe Normand <pnormand@igalia.com> 2 157 -
trunk/Source/WebCore/WebCore.order
r263635 r268919 9702 9702 __ZN7WebCore17RenderFlexibleBox26autoMarginOffsetInMainAxisERKN3WTF6VectorIPNS_9RenderBoxELm0ENS1_15CrashOnOverflowEEERNS_10LayoutUnitE 9703 9703 __ZN7WebCore17RenderFlexibleBox22setLogicalOverrideSizeEPNS_9RenderBoxENS_10LayoutUnitE 9704 __ZN7WebCore9RenderBox3 0setOverrideLogicalContentWidthENS_10LayoutUnitE9704 __ZN7WebCore9RenderBox32setOverridingLogicalContentWidthENS_10LayoutUnitE 9705 9705 __ZN7WebCore17RenderFlexibleBox18needToStretchChildEPNS_9RenderBoxE 9706 9706 __ZN7WebCore11RenderBlock37updateBlockChildDirtyBitsBeforeLayoutEbPNS_9RenderBoxE … … 15060 15060 __ZNSt3__17__sort5IRPFbRKNS_4pairIPN3WTF16AtomicStringImplENS2_12AtomicStringEEES8_EPS6_EEjT0_SD_SD_SD_SD_T_ 15061 15061 __ZN7WebCore13HTMLBRElement36collectStyleForPresentationAttributeERKNS_13QualifiedNameERKN3WTF12AtomicStringEPNS_23MutableStylePropertySetE 15062 __ZN7WebCore15RenderTableCell4 4setOverrideLogicalContentHeightFromRowHeightENS_10LayoutUnitE15063 __ZN7WebCore9RenderBox3 1setOverrideLogicalContentHeightENS_10LayoutUnitE15062 __ZN7WebCore15RenderTableCell46setOverridingLogicalContentHeightFromRowHeightENS_10LayoutUnitE 15063 __ZN7WebCore9RenderBox33setOverridingLogicalContentHeightENS_10LayoutUnitE 15064 15064 __ZNK7WebCore17HTMLScriptElement14isURLAttributeERKNS_9AttributeE 15065 15065 __ZNK7WebCore16HTMLImageElement14isURLAttributeERKNS_9AttributeE … … 27361 27361 __ZN7WebCoreL18gOverrideHeightMapE 27362 27362 __ZN7WebCoreL17gOverrideWidthMapE 27363 __ZN7WebCoreL 39gOverrideContainingBlockLogicalWidthMapE27364 __ZN7WebCoreL4 0gOverrideContainingBlockLogicalHeightMapE27363 __ZN7WebCoreL41gOverridingContainingBlockLogicalWidthMapE 27364 __ZN7WebCoreL42gOverridingContainingBlockLogicalHeightMapE 27365 27365 __ZN7WebCoreL15continuationMapE 27366 27366 __ZN7WebCoreL27firstLetterRemainingTextMapE -
trunk/Source/WebCore/rendering/ComplexLineLayout.cpp
r268666 r268919 591 591 } 592 592 593 ASSERT(!rubyRun.hasOverrid eLogicalWidth());593 ASSERT(!rubyRun.hasOverridingLogicalWidth()); 594 594 float newBaseWidth = rubyRun.logicalWidth() + totalExpansion + m_flow.marginStartForChild(rubyRun) + m_flow.marginEndForChild(rubyRun); 595 595 float newRubyRunWidth = rubyRun.logicalWidth() + totalExpansion; 596 596 rubyBase.setInitialOffset((newRubyRunWidth - newBaseWidth) / 2); 597 rubyRun.setOverrid eLogicalWidth(LayoutUnit(newRubyRunWidth));597 rubyRun.setOverridingLogicalWidth(LayoutUnit(newRubyRunWidth)); 598 598 rubyRun.setNeedsLayout(MarkOnlyThis); 599 599 rootBox.markDirty(); … … 603 603 } 604 604 rubyRun.layoutBlock(true); 605 rubyRun.clearOverrid eLogicalWidth();605 rubyRun.clearOverridingLogicalWidth(); 606 606 r.box()->setExpansion(newRubyRunWidth - r.box()->logicalWidth()); 607 607 -
trunk/Source/WebCore/rendering/GridLayoutFunctions.cpp
r261907 r268919 88 88 } 89 89 90 bool hasOverrid eContainingBlockContentSizeForChild(const RenderBox& child, GridTrackSizingDirection direction)90 bool hasOverridingContainingBlockContentSizeForChild(const RenderBox& child, GridTrackSizingDirection direction) 91 91 { 92 return direction == ForColumns ? child.hasOverrid eContainingBlockContentLogicalWidth() : child.hasOverrideContainingBlockContentLogicalHeight();92 return direction == ForColumns ? child.hasOverridingContainingBlockContentLogicalWidth() : child.hasOverridingContainingBlockContentLogicalHeight(); 93 93 } 94 94 95 Optional<LayoutUnit> overrid eContainingBlockContentSizeForChild(const RenderBox& child, GridTrackSizingDirection direction)95 Optional<LayoutUnit> overridingContainingBlockContentSizeForChild(const RenderBox& child, GridTrackSizingDirection direction) 96 96 { 97 return direction == ForColumns ? child.overrid eContainingBlockContentLogicalWidth() : child.overrideContainingBlockContentLogicalHeight();97 return direction == ForColumns ? child.overridingContainingBlockContentLogicalWidth() : child.overridingContainingBlockContentLogicalHeight(); 98 98 } 99 99 -
trunk/Source/WebCore/rendering/GridLayoutFunctions.h
r244115 r268919 42 42 bool isOrthogonalChild(const RenderGrid&, const RenderBox&); 43 43 GridTrackSizingDirection flowAwareDirectionForChild(const RenderGrid&, const RenderBox&, GridTrackSizingDirection); 44 bool hasOverrid eContainingBlockContentSizeForChild(const RenderBox&, GridTrackSizingDirection);45 Optional<LayoutUnit> overrid eContainingBlockContentSizeForChild(const RenderBox&, GridTrackSizingDirection);44 bool hasOverridingContainingBlockContentSizeForChild(const RenderBox&, GridTrackSizingDirection); 45 Optional<LayoutUnit> overridingContainingBlockContentSizeForChild(const RenderBox&, GridTrackSizingDirection); 46 46 47 47 } -
trunk/Source/WebCore/rendering/GridTrackSizingAlgorithm.cpp
r268666 r268919 121 121 } 122 122 123 static bool shouldClearOverrid eContainingBlockContentSizeForChild(const RenderBox& child, GridTrackSizingDirection direction)123 static bool shouldClearOverridingContainingBlockContentSizeForChild(const RenderBox& child, GridTrackSizingDirection direction) 124 124 { 125 125 return hasRelativeOrIntrinsicSizeForChild(child, direction) || hasRelativeMarginOrPaddingForChild(child, direction); 126 126 } 127 127 128 static void setOverrid eContainingBlockContentSizeForChild(RenderBox& child, GridTrackSizingDirection direction, Optional<LayoutUnit> size)128 static void setOverridingContainingBlockContentSizeForChild(RenderBox& child, GridTrackSizingDirection direction, Optional<LayoutUnit> size) 129 129 { 130 130 if (direction == ForColumns) 131 child.setOverrid eContainingBlockContentLogicalWidth(size);131 child.setOverridingContainingBlockContentLogicalWidth(size); 132 132 else 133 child.setOverrid eContainingBlockContentLogicalHeight(size);133 child.setOverridingContainingBlockContentLogicalHeight(size); 134 134 } 135 135 … … 757 757 // If |child| has a relative logical height, we shouldn't let it override its intrinsic height, which is 758 758 // what we are interested in here. Thus we need to set the block-axis override size to -1 (no possible resolution). 759 if (shouldClearOverrid eContainingBlockContentSizeForChild(child, ForRows)) {760 setOverrid eContainingBlockContentSizeForChild(child, childBlockDirection, WTF::nullopt);759 if (shouldClearOverridingContainingBlockContentSizeForChild(child, ForRows)) { 760 setOverridingContainingBlockContentSizeForChild(child, childBlockDirection, WTF::nullopt); 761 761 child.setNeedsLayout(MarkOnlyThis); 762 762 } … … 764 764 // We need to clear the stretched height to properly compute logical height during layout. 765 765 if (child.needsLayout()) 766 child.clearOverrid eLogicalHeight();766 child.clearOverridingLogicalHeight(); 767 767 768 768 child.layoutIfNeeded(); … … 779 779 } 780 780 781 if (updateOverrid eContainingBlockContentSizeForChild(child, childInlineDirection))781 if (updateOverridingContainingBlockContentSizeForChild(child, childInlineDirection)) 782 782 child.setNeedsLayout(MarkOnlyThis); 783 783 return logicalHeightForChild(child); … … 793 793 } 794 794 795 if (updateOverrid eContainingBlockContentSizeForChild(child, childInlineDirection))795 if (updateOverridingContainingBlockContentSizeForChild(child, childInlineDirection)) 796 796 child.setNeedsLayout(MarkOnlyThis); 797 797 return logicalHeightForChild(child); … … 900 900 } 901 901 902 bool GridTrackSizingAlgorithmStrategy::updateOverrid eContainingBlockContentSizeForChild(RenderBox& child, GridTrackSizingDirection direction, Optional<LayoutUnit> overrideSize) const902 bool GridTrackSizingAlgorithmStrategy::updateOverridingContainingBlockContentSizeForChild(RenderBox& child, GridTrackSizingDirection direction, Optional<LayoutUnit> overrideSize) const 903 903 { 904 904 if (!overrideSize) 905 905 overrideSize = m_algorithm.gridAreaBreadthForChild(child, direction); 906 if (GridLayoutFunctions::hasOverrid eContainingBlockContentSizeForChild(child, direction) && GridLayoutFunctions::overrideContainingBlockContentSizeForChild(child, direction) == overrideSize)906 if (GridLayoutFunctions::hasOverridingContainingBlockContentSizeForChild(child, direction) && GridLayoutFunctions::overridingContainingBlockContentSizeForChild(child, direction) == overrideSize) 907 907 return false; 908 908 909 setOverrid eContainingBlockContentSizeForChild(child, direction, overrideSize);909 setOverridingContainingBlockContentSizeForChild(child, direction, overrideSize); 910 910 return true; 911 911 } … … 917 917 if (isRowAxis) 918 918 return child.computeLogicalWidthInFragmentUsing(MinSize, childMinSize, availableSize, *renderGrid(), nullptr) + GridLayoutFunctions::marginLogicalSizeForChild(*renderGrid(), childInlineDirection, child); 919 bool overrideSizeHasChanged = updateOverrid eContainingBlockContentSizeForChild(child, childInlineDirection, availableSize);919 bool overrideSizeHasChanged = updateOverridingContainingBlockContentSizeForChild(child, childInlineDirection, availableSize); 920 920 layoutGridItemForMinSizeComputation(child, overrideSizeHasChanged); 921 921 GridTrackSizingDirection childBlockDirection = GridLayoutFunctions::flowAwareDirectionForChild(*renderGrid(), child, ForRows); … … 1051 1051 GridTrackSizingDirection flowAwareDirection = GridLayoutFunctions::flowAwareDirectionForChild(*renderGrid(), child, direction()); 1052 1052 if (hasRelativeMarginOrPaddingForChild(child, flowAwareDirection) || (direction() != childInlineDirection && hasRelativeOrIntrinsicSizeForChild(child, flowAwareDirection))) 1053 setOverrid eContainingBlockContentSizeForChild(child, direction(), indefiniteSize);1053 setOverridingContainingBlockContentSizeForChild(child, direction(), indefiniteSize); 1054 1054 return GridTrackSizingAlgorithmStrategy::minLogicalSizeForChild(child, childMinSize, availableSize); 1055 1055 } … … 1094 1094 { 1095 1095 GridTrackSizingDirection childInlineDirection = GridLayoutFunctions::flowAwareDirectionForChild(*renderGrid(), child, ForColumns); 1096 if (direction() == childInlineDirection && child.needsLayout() && shouldClearOverrid eContainingBlockContentSizeForChild(child, ForColumns))1097 setOverrid eContainingBlockContentSizeForChild(child, childInlineDirection, LayoutUnit());1096 if (direction() == childInlineDirection && child.needsLayout() && shouldClearOverridingContainingBlockContentSizeForChild(child, ForColumns)) 1097 setOverridingContainingBlockContentSizeForChild(child, childInlineDirection, LayoutUnit()); 1098 1098 return GridTrackSizingAlgorithmStrategy::minContentForChild(child); 1099 1099 } -
trunk/Source/WebCore/rendering/GridTrackSizingAlgorithm.h
r267503 r268919 272 272 273 273 LayoutUnit logicalHeightForChild(RenderBox&) const; 274 bool updateOverrid eContainingBlockContentSizeForChild(RenderBox&, GridTrackSizingDirection, Optional<LayoutUnit> = WTF::nullopt) const;274 bool updateOverridingContainingBlockContentSizeForChild(RenderBox&, GridTrackSizingDirection, Optional<LayoutUnit> = WTF::nullopt) const; 275 275 276 276 // GridTrackSizingAlgorithm accessors for subclasses. -
trunk/Source/WebCore/rendering/RenderBlock.cpp
r268666 r268919 1769 1769 ASSERT(!isAnonymousBlock()); 1770 1770 1771 positioned.clearOverrid eContainingBlockContentSize();1771 positioned.clearOverridingContainingBlockContentSize(); 1772 1772 1773 1773 if (positioned.isRenderFragmentedFlow()) … … 2418 2418 } 2419 2419 2420 // The preferred widths of flexbox children should never depend on overrid esizes. They should2420 // The preferred widths of flexbox children should never depend on overriding sizes. They should 2421 2421 // always be computed without regard for any overrides that are present. 2422 Optional<LayoutUnit> overrid eHeight;2423 Optional<LayoutUnit> overrid eWidth;2422 Optional<LayoutUnit> overridingHeight; 2423 Optional<LayoutUnit> overridingWidth; 2424 2424 2425 2425 if (child.isBox()) { 2426 2426 auto& box = downcast<RenderBox>(child); 2427 2427 if (box.isFlexItem()) { 2428 if (box.hasOverrid eLogicalHeight())2429 overrid eHeight = Optional<LayoutUnit>(box.overrideLogicalHeight());2430 if (box.hasOverrid eLogicalWidth())2431 overrid eWidth = Optional<LayoutUnit>(box.overrideLogicalWidth());2432 box.clearOverrid eContentSize();2428 if (box.hasOverridingLogicalHeight()) 2429 overridingHeight = Optional<LayoutUnit>(box.overridingLogicalHeight()); 2430 if (box.hasOverridingLogicalWidth()) 2431 overridingWidth = Optional<LayoutUnit>(box.overridingLogicalWidth()); 2432 box.clearOverridingContentSize(); 2433 2433 } 2434 2434 } … … 2439 2439 if (child.isBox()) { 2440 2440 auto& box = downcast<RenderBox>(child); 2441 if (overrid eHeight)2442 box.setOverrid eLogicalHeight(overrideHeight.value());2443 if (overrid eWidth)2444 box.setOverrid eLogicalWidth(overrideWidth.value());2441 if (overridingHeight) 2442 box.setOverridingLogicalHeight(overridingHeight.value()); 2443 if (overridingWidth) 2444 box.setOverridingLogicalWidth(overridingWidth.value()); 2445 2445 } 2446 2446 … … 3220 3220 if (stretchedFlexHeight) 3221 3221 availableHeight = stretchedFlexHeight; 3222 else if (isGridItem() && hasOverrid eLogicalHeight())3223 availableHeight = overrid eLogicalHeight();3222 else if (isGridItem() && hasOverridingLogicalHeight()) 3223 availableHeight = overridingLogicalHeight(); 3224 3224 else if (styleToUse.logicalHeight().isFixed()) { 3225 3225 LayoutUnit contentBoxHeight = adjustContentBoxLogicalHeightForBoxSizing((LayoutUnit)styleToUse.logicalHeight().value()); -
trunk/Source/WebCore/rendering/RenderBlockFlow.cpp
r268798 r268919 3046 3046 void RenderBlockFlow::fitBorderToLinesIfNeeded() 3047 3047 { 3048 if (style().borderFit() == BorderFit::Border || hasOverrid eLogicalWidth())3048 if (style().borderFit() == BorderFit::Border || hasOverridingLogicalWidth()) 3049 3049 return; 3050 3050 … … 3065 3065 return; 3066 3066 3067 setOverrid eLogicalWidth(newContentWidth + borderAndPaddingLogicalWidth());3067 setOverridingLogicalWidth(newContentWidth + borderAndPaddingLogicalWidth()); 3068 3068 layoutBlock(false); 3069 clearOverrid eLogicalWidth();3069 clearOverridingLogicalWidth(); 3070 3070 } 3071 3071 -
trunk/Source/WebCore/rendering/RenderBox.cpp
r268850 r268919 95 95 96 96 typedef WTF::HashMap<const RenderBox*, LayoutUnit> OverrideSizeMap; 97 static OverrideSizeMap* gOverrid eLogicalHeightMap = nullptr;98 static OverrideSizeMap* gOverrid eLogicalWidthMap = nullptr;97 static OverrideSizeMap* gOverridingLogicalHeightMap = nullptr; 98 static OverrideSizeMap* gOverridingLogicalWidthMap = nullptr; 99 99 100 100 // FIXME: We should store these based on physical direction. 101 101 typedef WTF::HashMap<const RenderBox*, Optional<LayoutUnit>> OverrideOptionalSizeMap; 102 static OverrideOptionalSizeMap* gOverrid eContainingBlockContentLogicalHeightMap = nullptr;103 static OverrideOptionalSizeMap* gOverrid eContainingBlockContentLogicalWidthMap = nullptr;102 static OverrideOptionalSizeMap* gOverridingContainingBlockContentLogicalHeightMap = nullptr; 103 static OverrideOptionalSizeMap* gOverridingContainingBlockContentLogicalWidthMap = nullptr; 104 104 105 105 // Size of border belt for autoscroll. When mouse pointer in border belt, … … 151 151 frame().eventHandler().stopAutoscrollTimer(true); 152 152 153 clearOverrid eContentSize();154 clearOverrid eContainingBlockContentSize();153 clearOverridingContentSize(); 154 clearOverridingContainingBlockContentSize(); 155 155 156 156 RenderBlock::removePercentHeightDescendantIfNeeded(*this); … … 408 408 // any override content size set by our container, because it would likely be incorrect after the style change. 409 409 if (isOutOfFlowPositioned() && parent() && parent()->style().isDisplayFlexibleOrGridBox()) 410 clearOverrid eContentSize();410 clearOverridingContentSize(); 411 411 412 412 #if ENABLE(LAYOUT_FORMATTING_CONTEXT) … … 1089 1089 } 1090 1090 1091 bool RenderBox::hasOverrid eLogicalHeight() const1092 { 1093 return gOverrid eLogicalHeightMap && gOverrideLogicalHeightMap->contains(this);1094 } 1095 1096 bool RenderBox::hasOverrid eLogicalWidth() const1097 { 1098 return gOverrid eLogicalWidthMap && gOverrideLogicalWidthMap->contains(this);1099 } 1100 1101 void RenderBox::setOverrid eLogicalHeight(LayoutUnit height)1102 { 1103 if (!gOverrid eLogicalHeightMap)1104 gOverrid eLogicalHeightMap = new OverrideSizeMap();1105 gOverrid eLogicalHeightMap->set(this, height);1106 } 1107 1108 void RenderBox::setOverrid eLogicalWidth(LayoutUnit width)1109 { 1110 if (!gOverrid eLogicalWidthMap)1111 gOverrid eLogicalWidthMap = new OverrideSizeMap();1112 gOverrid eLogicalWidthMap->set(this, width);1113 } 1114 1115 void RenderBox::clearOverrid eLogicalHeight()1116 { 1117 if (gOverrid eLogicalHeightMap)1118 gOverrid eLogicalHeightMap->remove(this);1119 } 1120 1121 void RenderBox::clearOverrid eLogicalWidth()1122 { 1123 if (gOverrid eLogicalWidthMap)1124 gOverrid eLogicalWidthMap->remove(this);1125 } 1126 1127 void RenderBox::clearOverrid eContentSize()1128 { 1129 clearOverrid eLogicalHeight();1130 clearOverrid eLogicalWidth();1131 } 1132 1133 LayoutUnit RenderBox::overrid eLogicalWidth() const1134 { 1135 ASSERT(hasOverrid eLogicalWidth());1136 return gOverrid eLogicalWidthMap->get(this);1137 } 1138 1139 LayoutUnit RenderBox::overrid eLogicalHeight() const1140 { 1141 ASSERT(hasOverrid eLogicalHeight());1142 return gOverrid eLogicalHeightMap->get(this);1143 } 1144 1145 Optional<LayoutUnit> RenderBox::overrid eContainingBlockContentWidth() const1146 { 1147 ASSERT(hasOverrid eContainingBlockContentWidth());1091 bool RenderBox::hasOverridingLogicalHeight() const 1092 { 1093 return gOverridingLogicalHeightMap && gOverridingLogicalHeightMap->contains(this); 1094 } 1095 1096 bool RenderBox::hasOverridingLogicalWidth() const 1097 { 1098 return gOverridingLogicalWidthMap && gOverridingLogicalWidthMap->contains(this); 1099 } 1100 1101 void RenderBox::setOverridingLogicalHeight(LayoutUnit height) 1102 { 1103 if (!gOverridingLogicalHeightMap) 1104 gOverridingLogicalHeightMap = new OverrideSizeMap(); 1105 gOverridingLogicalHeightMap->set(this, height); 1106 } 1107 1108 void RenderBox::setOverridingLogicalWidth(LayoutUnit width) 1109 { 1110 if (!gOverridingLogicalWidthMap) 1111 gOverridingLogicalWidthMap = new OverrideSizeMap(); 1112 gOverridingLogicalWidthMap->set(this, width); 1113 } 1114 1115 void RenderBox::clearOverridingLogicalHeight() 1116 { 1117 if (gOverridingLogicalHeightMap) 1118 gOverridingLogicalHeightMap->remove(this); 1119 } 1120 1121 void RenderBox::clearOverridingLogicalWidth() 1122 { 1123 if (gOverridingLogicalWidthMap) 1124 gOverridingLogicalWidthMap->remove(this); 1125 } 1126 1127 void RenderBox::clearOverridingContentSize() 1128 { 1129 clearOverridingLogicalHeight(); 1130 clearOverridingLogicalWidth(); 1131 } 1132 1133 LayoutUnit RenderBox::overridingLogicalWidth() const 1134 { 1135 ASSERT(hasOverridingLogicalWidth()); 1136 return gOverridingLogicalWidthMap->get(this); 1137 } 1138 1139 LayoutUnit RenderBox::overridingLogicalHeight() const 1140 { 1141 ASSERT(hasOverridingLogicalHeight()); 1142 return gOverridingLogicalHeightMap->get(this); 1143 } 1144 1145 Optional<LayoutUnit> RenderBox::overridingContainingBlockContentWidth() const 1146 { 1147 ASSERT(hasOverridingContainingBlockContentWidth()); 1148 1148 return containingBlock()->style().isHorizontalWritingMode() 1149 ? gOverrid eContainingBlockContentLogicalWidthMap->get(this)1150 : gOverrid eContainingBlockContentLogicalHeightMap->get(this);1151 } 1152 1153 Optional<LayoutUnit> RenderBox::overrid eContainingBlockContentHeight() const1154 { 1155 ASSERT(hasOverrid eContainingBlockContentHeight());1149 ? gOverridingContainingBlockContentLogicalWidthMap->get(this) 1150 : gOverridingContainingBlockContentLogicalHeightMap->get(this); 1151 } 1152 1153 Optional<LayoutUnit> RenderBox::overridingContainingBlockContentHeight() const 1154 { 1155 ASSERT(hasOverridingContainingBlockContentHeight()); 1156 1156 return containingBlock()->style().isHorizontalWritingMode() 1157 ? gOverrid eContainingBlockContentLogicalHeightMap->get(this)1158 : gOverrid eContainingBlockContentLogicalWidthMap->get(this);1159 } 1160 1161 bool RenderBox::hasOverrid eContainingBlockContentWidth() const1157 ? gOverridingContainingBlockContentLogicalHeightMap->get(this) 1158 : gOverridingContainingBlockContentLogicalWidthMap->get(this); 1159 } 1160 1161 bool RenderBox::hasOverridingContainingBlockContentWidth() const 1162 1162 { 1163 1163 RenderBlock* cb = containingBlock(); … … 1166 1166 1167 1167 return cb->style().isHorizontalWritingMode() 1168 ? gOverrid eContainingBlockContentLogicalWidthMap && gOverrideContainingBlockContentLogicalWidthMap->contains(this)1169 : gOverrid eContainingBlockContentLogicalHeightMap && gOverrideContainingBlockContentLogicalHeightMap->contains(this);1170 } 1171 1172 bool RenderBox::hasOverrid eContainingBlockContentHeight() const1168 ? gOverridingContainingBlockContentLogicalWidthMap && gOverridingContainingBlockContentLogicalWidthMap->contains(this) 1169 : gOverridingContainingBlockContentLogicalHeightMap && gOverridingContainingBlockContentLogicalHeightMap->contains(this); 1170 } 1171 1172 bool RenderBox::hasOverridingContainingBlockContentHeight() const 1173 1173 { 1174 1174 RenderBlock* cb = containingBlock(); … … 1177 1177 1178 1178 return cb->style().isHorizontalWritingMode() 1179 ? gOverrid eContainingBlockContentLogicalHeightMap && gOverrideContainingBlockContentLogicalHeightMap->contains(this)1180 : gOverrid eContainingBlockContentLogicalHeightMap && gOverrideContainingBlockContentLogicalHeightMap->contains(this);1181 } 1182 1183 Optional<LayoutUnit> RenderBox::overrid eContainingBlockContentLogicalWidth() const1184 { 1185 ASSERT(hasOverrid eContainingBlockContentLogicalWidth());1186 return gOverrid eContainingBlockContentLogicalWidthMap->get(this);1187 } 1188 1189 Optional<LayoutUnit> RenderBox::overrid eContainingBlockContentLogicalHeight() const1190 { 1191 ASSERT(hasOverrid eContainingBlockContentLogicalHeight());1192 return gOverrid eContainingBlockContentLogicalHeightMap->get(this);1193 } 1194 1195 bool RenderBox::hasOverrid eContainingBlockContentLogicalWidth() const1196 { 1197 return gOverrid eContainingBlockContentLogicalWidthMap && gOverrideContainingBlockContentLogicalWidthMap->contains(this);1198 } 1199 1200 bool RenderBox::hasOverrid eContainingBlockContentLogicalHeight() const1201 { 1202 return gOverrid eContainingBlockContentLogicalHeightMap && gOverrideContainingBlockContentLogicalHeightMap->contains(this);1203 } 1204 1205 void RenderBox::setOverrid eContainingBlockContentLogicalWidth(Optional<LayoutUnit> logicalWidth)1206 { 1207 if (!gOverrid eContainingBlockContentLogicalWidthMap)1208 gOverrid eContainingBlockContentLogicalWidthMap = new OverrideOptionalSizeMap;1209 gOverrid eContainingBlockContentLogicalWidthMap->set(this, logicalWidth);1210 } 1211 1212 void RenderBox::setOverrid eContainingBlockContentLogicalHeight(Optional<LayoutUnit> logicalHeight)1213 { 1214 if (!gOverrid eContainingBlockContentLogicalHeightMap)1215 gOverrid eContainingBlockContentLogicalHeightMap = new OverrideOptionalSizeMap;1216 gOverrid eContainingBlockContentLogicalHeightMap->set(this, logicalHeight);1217 } 1218 1219 void RenderBox::clearOverrid eContainingBlockContentSize()1220 { 1221 if (gOverrid eContainingBlockContentLogicalWidthMap)1222 gOverrid eContainingBlockContentLogicalWidthMap->remove(this);1223 clearOverrid eContainingBlockContentLogicalHeight();1224 } 1225 1226 void RenderBox::clearOverrid eContainingBlockContentLogicalHeight()1227 { 1228 if (gOverrid eContainingBlockContentLogicalHeightMap)1229 gOverrid eContainingBlockContentLogicalHeightMap->remove(this);1179 ? gOverridingContainingBlockContentLogicalHeightMap && gOverridingContainingBlockContentLogicalHeightMap->contains(this) 1180 : gOverridingContainingBlockContentLogicalHeightMap && gOverridingContainingBlockContentLogicalHeightMap->contains(this); 1181 } 1182 1183 Optional<LayoutUnit> RenderBox::overridingContainingBlockContentLogicalWidth() const 1184 { 1185 ASSERT(hasOverridingContainingBlockContentLogicalWidth()); 1186 return gOverridingContainingBlockContentLogicalWidthMap->get(this); 1187 } 1188 1189 Optional<LayoutUnit> RenderBox::overridingContainingBlockContentLogicalHeight() const 1190 { 1191 ASSERT(hasOverridingContainingBlockContentLogicalHeight()); 1192 return gOverridingContainingBlockContentLogicalHeightMap->get(this); 1193 } 1194 1195 bool RenderBox::hasOverridingContainingBlockContentLogicalWidth() const 1196 { 1197 return gOverridingContainingBlockContentLogicalWidthMap && gOverridingContainingBlockContentLogicalWidthMap->contains(this); 1198 } 1199 1200 bool RenderBox::hasOverridingContainingBlockContentLogicalHeight() const 1201 { 1202 return gOverridingContainingBlockContentLogicalHeightMap && gOverridingContainingBlockContentLogicalHeightMap->contains(this); 1203 } 1204 1205 void RenderBox::setOverridingContainingBlockContentLogicalWidth(Optional<LayoutUnit> logicalWidth) 1206 { 1207 if (!gOverridingContainingBlockContentLogicalWidthMap) 1208 gOverridingContainingBlockContentLogicalWidthMap = new OverrideOptionalSizeMap; 1209 gOverridingContainingBlockContentLogicalWidthMap->set(this, logicalWidth); 1210 } 1211 1212 void RenderBox::setOverridingContainingBlockContentLogicalHeight(Optional<LayoutUnit> logicalHeight) 1213 { 1214 if (!gOverridingContainingBlockContentLogicalHeightMap) 1215 gOverridingContainingBlockContentLogicalHeightMap = new OverrideOptionalSizeMap; 1216 gOverridingContainingBlockContentLogicalHeightMap->set(this, logicalHeight); 1217 } 1218 1219 void RenderBox::clearOverridingContainingBlockContentSize() 1220 { 1221 if (gOverridingContainingBlockContentLogicalWidthMap) 1222 gOverridingContainingBlockContentLogicalWidthMap->remove(this); 1223 clearOverridingContainingBlockContentLogicalHeight(); 1224 } 1225 1226 void RenderBox::clearOverridingContainingBlockContentLogicalHeight() 1227 { 1228 if (gOverridingContainingBlockContentLogicalHeightMap) 1229 gOverridingContainingBlockContentLogicalHeightMap->remove(this); 1230 1230 } 1231 1231 … … 1974 1974 LayoutUnit RenderBox::containingBlockLogicalWidthForContent() const 1975 1975 { 1976 if (hasOverrid eContainingBlockContentLogicalWidth()) {1977 if (auto overrideLogicalWidth = overrideContainingBlockContentLogicalWidth())1978 return overrideLogicalWidth.value();1976 if (hasOverridingContainingBlockContentLogicalWidth()) { 1977 if (auto width = overridingContainingBlockContentLogicalWidth()) 1978 return width.value(); 1979 1979 } 1980 1980 … … 1986 1986 LayoutUnit RenderBox::containingBlockLogicalHeightForContent(AvailableLogicalHeightType heightType) const 1987 1987 { 1988 if (hasOverrid eContainingBlockContentLogicalHeight()) {1989 if (auto overrideLogicalHeight = overrideContainingBlockContentLogicalHeight())1990 return overrideLogicalHeight.value();1988 if (hasOverridingContainingBlockContentLogicalHeight()) { 1989 if (auto height = overridingContainingBlockContentLogicalHeight()) 1990 return height.value(); 1991 1991 } 1992 1992 … … 2027 2027 LayoutUnit RenderBox::perpendicularContainingBlockLogicalHeight() const 2028 2028 { 2029 if (hasOverrid eContainingBlockContentLogicalHeight()) {2030 if (auto overrideLogicalHeight = overrideContainingBlockContentLogicalHeight())2031 return overrideLogicalHeight.value();2029 if (hasOverridingContainingBlockContentLogicalHeight()) { 2030 if (auto height = overridingContainingBlockContentLogicalHeight()) 2031 return height.value(); 2032 2032 } 2033 2033 2034 2034 RenderBlock* cb = containingBlock(); 2035 if (cb->hasOverrid eLogicalHeight())2036 return cb->overrid eContentLogicalHeight();2035 if (cb->hasOverridingLogicalHeight()) 2036 return cb->overridingContentLogicalHeight(); 2037 2037 2038 2038 const RenderStyle& containingBlockStyle = cb->style(); … … 2440 2440 // FIXME: Account for block-flow in flexible boxes. 2441 2441 // https://bugs.webkit.org/show_bug.cgi?id=46418 2442 if (hasOverrid eLogicalWidth() && (isRubyRun() || style().borderFit() == BorderFit::Lines || (parent()->isFlexibleBoxIncludingDeprecated()))) {2443 computedValues.m_extent = overrid eLogicalWidth();2442 if (hasOverridingLogicalWidth() && (isRubyRun() || style().borderFit() == BorderFit::Lines || (parent()->isFlexibleBoxIncludingDeprecated()))) { 2443 computedValues.m_extent = overridingLogicalWidth(); 2444 2444 return; 2445 2445 } … … 2783 2783 void RenderBox::cacheIntrinsicContentLogicalHeightForFlexItem(LayoutUnit height) const 2784 2784 { 2785 // FIXME: it should be enough with checking hasOverrid eLogicalHeight() as this logic could be shared2785 // FIXME: it should be enough with checking hasOverridingLogicalHeight() as this logic could be shared 2786 2786 // by any layout system using overrides like grid or flex. However this causes a never ending sequence of calls 2787 2787 // between layoutBlock() <-> relayoutToAvoidWidows(). 2788 if (isFloatingOrOutOfFlowPositioned() || !parent() || !parent()->isFlexibleBox() || hasOverrid eLogicalHeight())2788 if (isFloatingOrOutOfFlowPositioned() || !parent() || !parent()->isFlexibleBox() || hasOverridingLogicalHeight()) 2789 2789 return; 2790 2790 downcast<RenderFlexibleBox>(parent())->setCachedChildIntrinsicContentLogicalHeight(*this, height); … … 2847 2847 // FIXME: Account for block-flow in flexible boxes. 2848 2848 // https://bugs.webkit.org/show_bug.cgi?id=46418 2849 if (hasOverrid eLogicalHeight() && (parent()->isFlexibleBoxIncludingDeprecated() || parent()->isRenderGrid())) {2850 h = Length(overrid eLogicalHeight(), Fixed);2849 if (hasOverridingLogicalHeight() && (parent()->isFlexibleBoxIncludingDeprecated() || parent()->isRenderGrid())) { 2850 h = Length(overridingLogicalHeight(), Fixed); 2851 2851 } else if (treatAsReplaced) 2852 2852 h = Length(computeReplacedLogicalHeight() + borderAndPaddingLogicalHeight(), Fixed); … … 3032 3032 if (isHorizontal != cb->isHorizontalWritingMode()) 3033 3033 availableHeight = containingBlockChild->containingBlockLogicalWidthForContent(); 3034 else if (hasOverrid eContainingBlockContentLogicalHeight())3035 availableHeight = overrid eContainingBlockContentLogicalHeight();3034 else if (hasOverridingContainingBlockContentLogicalHeight()) 3035 availableHeight = overridingContainingBlockContentLogicalHeight(); 3036 3036 else if (is<RenderTableCell>(*cb)) { 3037 3037 if (!skippedAutoHeightContainingBlock) { … … 3039 3039 // don't care if the cell specified a height or not. We just always make ourselves 3040 3040 // be a percentage of the cell's current content height. 3041 if (!cb->hasOverrid eLogicalHeight())3041 if (!cb->hasOverridingLogicalHeight()) 3042 3042 return tableCellShouldHaveZeroInitialSize(*cb, *this, scrollsOverflowY()) ? Optional<LayoutUnit>(0) : WTF::nullopt; 3043 3043 3044 availableHeight = cb->overrid eLogicalHeight() - cb->computedCSSPaddingBefore() - cb->computedCSSPaddingAfter() - cb->borderBefore() - cb->borderAfter();3044 availableHeight = cb->overridingLogicalHeight() - cb->computedCSSPaddingBefore() - cb->computedCSSPaddingAfter() - cb->borderBefore() - cb->borderAfter(); 3045 3045 } 3046 3046 } else … … 3052 3052 LayoutUnit result = valueForLength(height, availableHeight.value() - rootMarginBorderPaddingHeight + (isTable() && isOutOfFlowPositioned() ? cb->paddingBefore() + cb->paddingAfter() : 0_lu)); 3053 3053 3054 // |overrid eLogicalHeight| is the maximum height made available by the3054 // |overridingLogicalHeight| is the maximum height made available by the 3055 3055 // cell to its percent height children when we decide they can determine the 3056 3056 // height of the cell. If the percent height child is box-sizing:content-box 3057 3057 // then we must subtract the border and padding from the cell's 3058 // |availableHeight| (given by |overrid eLogicalHeight|) to arrive3058 // |availableHeight| (given by |overridingLogicalHeight|) to arrive 3059 3059 // at the child's computed height. 3060 bool subtractBorderAndPadding = isTable() || (is<RenderTableCell>(*cb) && !skippedAutoHeightContainingBlock && cb->hasOverrid eLogicalHeight());3060 bool subtractBorderAndPadding = isTable() || (is<RenderTableCell>(*cb) && !skippedAutoHeightContainingBlock && cb->hasOverridingLogicalHeight()); 3061 3061 if (subtractBorderAndPadding) { 3062 3062 result -= borderAndPaddingLogicalHeight(); … … 3197 3197 if (block->isFlexItem()) 3198 3198 stretchedHeight = downcast<RenderFlexibleBox>(block->parent())->childLogicalHeightForPercentageResolution(*block); 3199 else if (block->isGridItem() && block->hasOverrid eLogicalHeight())3200 stretchedHeight = block->overrid eLogicalHeight() - block->borderAndPaddingLogicalHeight();3199 else if (block->isGridItem() && block->hasOverridingLogicalHeight()) 3200 stretchedHeight = block->overridingLogicalHeight() - block->borderAndPaddingLogicalHeight(); 3201 3201 } 3202 3202 … … 3263 3263 // height, and then when we lay out again we'll use the calculation below. 3264 3264 if (isTableCell() && (h.isAuto() || h.isPercentOrCalculated())) { 3265 if (hasOverrid eLogicalHeight())3266 return overrid eLogicalHeight() - computedCSSPaddingBefore() - computedCSSPaddingAfter() - borderBefore() - borderAfter();3265 if (hasOverridingLogicalHeight()) 3266 return overridingLogicalHeight() - computedCSSPaddingBefore() - computedCSSPaddingAfter() - borderBefore() - borderAfter(); 3267 3267 return logicalHeight() - borderAndPaddingLogicalHeight(); 3268 3268 } … … 3333 3333 return containingBlockLogicalHeightForPositioned(containingBlock, false); 3334 3334 3335 if (hasOverrid eContainingBlockContentLogicalWidth()) {3336 if (auto overrideLogicalWidth = overrideContainingBlockContentLogicalWidth())3337 return overrideLogicalWidth.value();3335 if (hasOverridingContainingBlockContentLogicalWidth()) { 3336 if (auto width = overridingContainingBlockContentLogicalWidth()) 3337 return width.value(); 3338 3338 } 3339 3339 … … 3398 3398 return containingBlockLogicalWidthForPositioned(containingBlock, nullptr, false); 3399 3399 3400 if (hasOverrid eContainingBlockContentLogicalHeight()) {3401 if (auto overrideLogicalHeight = overrideContainingBlockContentLogicalHeight())3402 return overrideLogicalHeight.value();3400 if (hasOverridingContainingBlockContentLogicalHeight()) { 3401 if (auto height = overridingContainingBlockContentLogicalHeight()) 3402 return height.value(); 3403 3403 } 3404 3404 -
trunk/Source/WebCore/rendering/RenderBox.h
r268666 r268919 308 308 LayoutUnit maxPreferredLogicalWidth() const override; 309 309 310 LayoutUnit overrid eLogicalWidth() const;311 LayoutUnit overrid eLogicalHeight() const;312 bool hasOverrid eLogicalHeight() const;313 bool hasOverrid eLogicalWidth() const;314 void setOverrid eLogicalHeight(LayoutUnit);315 void setOverrid eLogicalWidth(LayoutUnit);316 void clearOverrid eContentSize();317 void clearOverrid eLogicalHeight();318 void clearOverrid eLogicalWidth();319 320 LayoutUnit overrid eContentLogicalWidth() const { return overrideLogicalWidth() - borderAndPaddingLogicalWidth() - scrollbarLogicalWidth(); }321 LayoutUnit overrid eContentLogicalHeight() const { return overrideLogicalHeight() - borderAndPaddingLogicalHeight() - scrollbarLogicalHeight(); }322 323 Optional<LayoutUnit> overrid eContainingBlockContentWidth() const override;324 Optional<LayoutUnit> overrid eContainingBlockContentHeight() const override;325 bool hasOverrid eContainingBlockContentWidth() const override;326 bool hasOverrid eContainingBlockContentHeight() const override;327 Optional<LayoutUnit> overrid eContainingBlockContentLogicalWidth() const;328 Optional<LayoutUnit> overrid eContainingBlockContentLogicalHeight() const;329 bool hasOverrid eContainingBlockContentLogicalWidth() const;330 bool hasOverrid eContainingBlockContentLogicalHeight() const;331 void setOverrid eContainingBlockContentLogicalWidth(Optional<LayoutUnit>);332 void setOverrid eContainingBlockContentLogicalHeight(Optional<LayoutUnit>);333 void clearOverrid eContainingBlockContentSize();334 void clearOverrid eContainingBlockContentLogicalHeight();310 LayoutUnit overridingLogicalWidth() const; 311 LayoutUnit overridingLogicalHeight() const; 312 bool hasOverridingLogicalHeight() const; 313 bool hasOverridingLogicalWidth() const; 314 void setOverridingLogicalHeight(LayoutUnit); 315 void setOverridingLogicalWidth(LayoutUnit); 316 void clearOverridingContentSize(); 317 void clearOverridingLogicalHeight(); 318 void clearOverridingLogicalWidth(); 319 320 LayoutUnit overridingContentLogicalWidth() const { return overridingLogicalWidth() - borderAndPaddingLogicalWidth() - scrollbarLogicalWidth(); } 321 LayoutUnit overridingContentLogicalHeight() const { return overridingLogicalHeight() - borderAndPaddingLogicalHeight() - scrollbarLogicalHeight(); } 322 323 Optional<LayoutUnit> overridingContainingBlockContentWidth() const override; 324 Optional<LayoutUnit> overridingContainingBlockContentHeight() const override; 325 bool hasOverridingContainingBlockContentWidth() const override; 326 bool hasOverridingContainingBlockContentHeight() const override; 327 Optional<LayoutUnit> overridingContainingBlockContentLogicalWidth() const; 328 Optional<LayoutUnit> overridingContainingBlockContentLogicalHeight() const; 329 bool hasOverridingContainingBlockContentLogicalWidth() const; 330 bool hasOverridingContainingBlockContentLogicalHeight() const; 331 void setOverridingContainingBlockContentLogicalWidth(Optional<LayoutUnit>); 332 void setOverridingContainingBlockContentLogicalHeight(Optional<LayoutUnit>); 333 void clearOverridingContainingBlockContentSize(); 334 void clearOverridingContainingBlockContentLogicalHeight(); 335 335 336 336 LayoutSize offsetFromContainer(RenderElement&, const LayoutPoint&, bool* offsetDependsOnPoint = nullptr) const override; -
trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp
r267571 r268919 281 281 } 282 282 283 if (thisBox && thisBox->isGridItem() && thisBox->hasOverrid eContainingBlockContentLogicalHeight())283 if (thisBox && thisBox->isGridItem() && thisBox->hasOverridingContainingBlockContentLogicalHeight()) 284 284 return false; 285 285 … … 349 349 // https://drafts.csswg.org/css-grid/#grid-item-sizing 350 350 if (!style().left().isAuto() || !style().right().isAuto()) { 351 LayoutUnit availableWidth = hasOverrid eContainingBlockContentWidth()352 ? overrid eContainingBlockContentWidth().valueOr(LayoutUnit()) : containingBlock()->availableWidth();351 LayoutUnit availableWidth = hasOverridingContainingBlockContentWidth() 352 ? overridingContainingBlockContentWidth().valueOr(LayoutUnit()) : containingBlock()->availableWidth(); 353 353 if (!style().left().isAuto()) { 354 354 if (!style().right().isAuto() && !containingBlock()->style().isLeftToRightDirection()) … … 372 372 || !containingBlock()->hasAutoHeightOrContainingBlockWithAutoHeight() 373 373 || containingBlock()->stretchesToViewport() 374 || hasOverrid eContainingBlockContentHeight())) {374 || hasOverridingContainingBlockContentHeight())) { 375 375 // FIXME: The computation of the available height is repeated later for "bottom". 376 376 // We could refactor this and move it to some common code for both ifs, however moving it outside of the ifs 377 377 // is not possible as it'd cause performance regressions. 378 378 offset.expand(0_lu, valueForLength(style().top(), !style().top().isFixed() 379 ? (hasOverrid eContainingBlockContentHeight() ? overrideContainingBlockContentHeight().valueOr(0_lu) : containingBlock()->availableHeight())379 ? (hasOverridingContainingBlockContentHeight() ? overridingContainingBlockContentHeight().valueOr(0_lu) : containingBlock()->availableHeight()) 380 380 : LayoutUnit())); 381 381 } else if (!style().bottom().isAuto() … … 383 383 || !containingBlock()->hasAutoHeightOrContainingBlockWithAutoHeight() 384 384 || containingBlock()->stretchesToViewport() 385 || hasOverrid eContainingBlockContentHeight())) {385 || hasOverridingContainingBlockContentHeight())) { 386 386 // FIXME: Check comment above for "top", it applies here too. 387 387 offset.expand(0_lu, -valueForLength(style().bottom(), !style().bottom().isFixed() 388 ? (hasOverrid eContainingBlockContentHeight() ? overrideContainingBlockContentHeight().valueOr(0_lu) : containingBlock()->availableHeight())388 ? (hasOverridingContainingBlockContentHeight() ? overridingContainingBlockContentHeight().valueOr(0_lu) : containingBlock()->availableHeight()) 389 389 : LayoutUnit())); 390 390 } -
trunk/Source/WebCore/rendering/RenderBoxModelObject.h
r256196 r268919 234 234 bool hasRunningAcceleratedAnimations() const; 235 235 236 virtual Optional<LayoutUnit> overrid eContainingBlockContentWidth() const { ASSERT_NOT_REACHED(); return -1_lu; }237 virtual Optional<LayoutUnit> overrid eContainingBlockContentHeight() const { ASSERT_NOT_REACHED(); return -1_lu; }238 virtual bool hasOverrid eContainingBlockContentWidth() const { return false; }239 virtual bool hasOverrid eContainingBlockContentHeight() const { return false; }236 virtual Optional<LayoutUnit> overridingContainingBlockContentWidth() const { ASSERT_NOT_REACHED(); return -1_lu; } 237 virtual Optional<LayoutUnit> overridingContainingBlockContentHeight() const { ASSERT_NOT_REACHED(); return -1_lu; } 238 virtual bool hasOverridingContainingBlockContentWidth() const { return false; } 239 virtual bool hasOverridingContainingBlockContentHeight() const { return false; } 240 240 241 241 protected: -
trunk/Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp
r268666 r268919 154 154 static LayoutUnit widthForChild(RenderBox* child) 155 155 { 156 if (child->hasOverrid eLogicalWidth())157 return child->overrid eLogicalWidth();156 if (child->hasOverridingLogicalWidth()) 157 return child->overridingLogicalWidth(); 158 158 return child->logicalWidth(); 159 159 } … … 161 161 static LayoutUnit heightForChild(RenderBox* child) 162 162 { 163 if (child->hasOverrid eLogicalHeight())164 return child->overrid eLogicalHeight();163 if (child->hasOverridingLogicalHeight()) 164 return child->overridingLogicalHeight(); 165 165 return child->logicalHeight(); 166 166 } … … 368 368 // We always have to lay out flexible objects again, since the flex distribution 369 369 // may have changed, and we need to reallocate space. 370 child->clearOverrid eContentSize();370 child->clearOverridingContentSize(); 371 371 if (!relayoutChildren) 372 372 child->setChildNeedsLayout(MarkOnlyThis); … … 596 596 LayoutUnit spaceAdd = LayoutUnit(spaceAvailableThisPass * (child->style().boxFlex() / totalFlex)); 597 597 if (spaceAdd) { 598 child->setOverrid eLogicalWidth(widthForChild(child) + spaceAdd);598 child->setOverridingLogicalWidth(widthForChild(child) + spaceAdd); 599 599 flexingChildren = true; 600 600 relayoutChildren = true; … … 613 613 for (RenderBox* child = iterator.first(); child && groupRemainingSpace; child = iterator.next()) { 614 614 if (allowedChildFlex(child, expanding, i)) { 615 child->setOverrid eLogicalWidth(widthForChild(child) + spaceAdd);615 child->setOverridingLogicalWidth(widthForChild(child) + spaceAdd); 616 616 flexingChildren = true; 617 617 relayoutChildren = true; … … 853 853 LayoutUnit spaceAdd { spaceAvailableThisPass * (child->style().boxFlex() / totalFlex) }; 854 854 if (spaceAdd) { 855 child->setOverrid eLogicalHeight(heightForChild(child) + spaceAdd);855 child->setOverridingLogicalHeight(heightForChild(child) + spaceAdd); 856 856 flexingChildren = true; 857 857 relayoutChildren = true; … … 870 870 for (RenderBox* child = iterator.first(); child && groupRemainingSpace; child = iterator.next()) { 871 871 if (allowedChildFlex(child, expanding, i)) { 872 child->setOverrid eLogicalHeight(heightForChild(child) + spaceAdd);872 child->setOverridingLogicalHeight(heightForChild(child) + spaceAdd); 873 873 flexingChildren = true; 874 874 relayoutChildren = true; … … 948 948 continue; 949 949 950 child->clearOverrid eContentSize();950 child->clearOverridingContentSize(); 951 951 if (relayoutChildren || (child->isReplaced() && (child->style().width().isPercentOrCalculated() || child->style().height().isPercentOrCalculated())) 952 952 || (child->style().height().isAuto() && is<RenderBlockFlow>(*child))) { … … 985 985 986 986 child->setChildNeedsLayout(MarkOnlyThis); 987 child->setOverrid eLogicalHeight(newHeight);987 child->setOverridingLogicalHeight(newHeight); 988 988 child->layoutIfNeeded(); 989 989 … … 1050 1050 continue; 1051 1051 1052 child->clearOverrid eContentSize();1052 child->clearOverridingContentSize(); 1053 1053 if ((child->isReplaced() && (child->style().width().isPercentOrCalculated() || child->style().height().isPercentOrCalculated())) 1054 1054 || (child->style().height().isAuto() && is<RenderBlockFlow>(*child))) { -
trunk/Source/WebCore/rendering/RenderFlexibleBox.cpp
r268666 r268919 481 481 482 482 // Temporarily clear potential overrides to compute the logical width otherwise it'll return the override size. 483 bool childHasOverrideWidth = child.hasOverrid eLogicalWidth();484 auto overrideWidth = childHasOverrideWidth ? child.overrid eLogicalWidth() : -1_lu;483 bool childHasOverrideWidth = child.hasOverridingLogicalWidth(); 484 auto overrideWidth = childHasOverrideWidth ? child.overridingLogicalWidth() : -1_lu; 485 485 if (childHasOverrideWidth) 486 const_cast<RenderBox*>(&child)->clearOverrid eLogicalWidth();486 const_cast<RenderBox*>(&child)->clearOverridingLogicalWidth(); 487 487 LogicalExtentComputedValues values; 488 488 child.computeLogicalWidthInFragment(values); 489 489 if (childHasOverrideWidth) 490 const_cast<RenderBox*>(&child)->setOverrid eLogicalWidth(overrideWidth);490 const_cast<RenderBox*>(&child)->setOverridingLogicalWidth(overrideWidth); 491 491 return values.m_extent; 492 492 } … … 845 845 LayoutUnit RenderFlexibleBox::computeInnerFlexBaseSizeForChild(RenderBox& child, LayoutUnit mainAxisBorderAndPadding, bool relayoutChildren) 846 846 { 847 child.clearOverrid eContentSize();847 child.clearOverridingContentSize(); 848 848 849 849 Length flexBasis = flexBasisForChild(child); … … 1170 1170 1171 1171 // Here we implement https://drafts.csswg.org/css-flexbox/#algo-stretch 1172 if (child.hasOverrid eLogicalHeight())1173 return child.overrid eContentLogicalHeight();1172 if (child.hasOverridingLogicalHeight()) 1173 return child.overridingContentLogicalHeight(); 1174 1174 1175 1175 // We don't currently implement the optimization from … … 1191 1191 return WTF::nullopt; 1192 1192 1193 return child.hasOverrid eLogicalHeight() ? Optional<LayoutUnit>(child.overrideContentLogicalHeight()) : WTF::nullopt;1193 return child.hasOverridingLogicalHeight() ? Optional<LayoutUnit>(child.overridingContentLogicalHeight()) : WTF::nullopt; 1194 1194 } 1195 1195 … … 1232 1232 if (child.needsLayout() || !m_intrinsicSizeAlongMainAxis.contains(&child)) { 1233 1233 if (isHorizontalWritingMode() == child.isHorizontalWritingMode()) 1234 child.setOverrid eContainingBlockContentLogicalHeight(WTF::nullopt);1234 child.setOverridingContainingBlockContentLogicalHeight(WTF::nullopt); 1235 1235 else 1236 child.setOverrid eContainingBlockContentLogicalWidth(WTF::nullopt);1237 child.clearOverrid eContentSize();1236 child.setOverridingContainingBlockContentLogicalWidth(WTF::nullopt); 1237 child.clearOverridingContentSize(); 1238 1238 child.setChildNeedsLayout(MarkOnlyThis); 1239 1239 child.layoutIfNeeded(); 1240 1240 cacheChildMainSize(child); 1241 1241 relayoutChildren = false; 1242 child.clearOverrid eContainingBlockContentSize();1242 child.clearOverridingContainingBlockContentSize(); 1243 1243 } 1244 1244 } … … 1425 1425 { 1426 1426 if (hasOrthogonalFlow(child)) 1427 child.setOverrid eLogicalHeight(childPreferredSize + child.borderAndPaddingLogicalHeight());1427 child.setOverridingLogicalHeight(childPreferredSize + child.borderAndPaddingLogicalHeight()); 1428 1428 else 1429 child.setOverrid eLogicalWidth(childPreferredSize + child.borderAndPaddingLogicalWidth());1429 child.setOverridingLogicalWidth(childPreferredSize + child.borderAndPaddingLogicalWidth()); 1430 1430 } 1431 1431 … … 1884 1884 childNeedsRelayout = true; 1885 1885 } 1886 if (childNeedsRelayout || !child.hasOverrid eLogicalHeight())1887 child.setOverrid eLogicalHeight(desiredLogicalHeight);1886 if (childNeedsRelayout || !child.hasOverridingLogicalHeight()) 1887 child.setOverridingLogicalHeight(desiredLogicalHeight); 1888 1888 if (childNeedsRelayout) { 1889 1889 SetForScope<bool> resetChildLogicalHeight(m_shouldResetChildLogicalHeightBeforeLayout, true); … … 1906 1906 1907 1907 if (childWidth != child.logicalWidth()) { 1908 child.setOverrid eLogicalWidth(childWidth);1908 child.setOverridingLogicalWidth(childWidth); 1909 1909 child.setChildNeedsLayout(MarkOnlyThis); 1910 1910 child.layoutIfNeeded(); -
trunk/Source/WebCore/rendering/RenderFullScreen.cpp
r252724 r268919 172 172 // lying around on the child. 173 173 if (is<RenderBox>(*child)) 174 downcast<RenderBox>(*child).clearOverrid eContentSize();174 downcast<RenderBox>(*child).clearOverridingContentSize(); 175 175 auto childToMove = builder.detach(*child->parent(), *child); 176 176 builder.attach(*parent(), WTFMove(childToMove), this); -
trunk/Source/WebCore/rendering/RenderGrid.cpp
r268666 r268919 194 194 // FIXME: We should use RenderBlock::hasDefiniteLogicalHeight() but it does not work for positioned stuff. 195 195 // FIXME: Consider caching the hasDefiniteLogicalHeight value throughout the layout. 196 bool hasDefiniteLogicalHeight = hasOverrid eLogicalHeight() || computeContentLogicalHeight(MainOrPreferredSize, style().logicalHeight(), WTF::nullopt);196 bool hasDefiniteLogicalHeight = hasOverridingLogicalHeight() || computeContentLogicalHeight(MainOrPreferredSize, style().logicalHeight(), WTF::nullopt); 197 197 198 198 m_hasAnyOrthogonalItem = false; … … 203 203 // clear any override height set previously, so it doesn't interfere in current layout 204 204 // execution. Grid never uses the override width, that's why we don't need to clear it. 205 child->clearOverrid eLogicalHeight();205 child->clearOverridingLogicalHeight(); 206 206 207 207 // We may need to repeat the track sizing in case of any grid item was orthogonal. … … 611 611 // Grid items should use the grid area sizes instead of the containing block (grid container) 612 612 // sizes, we initialize the overrides here if needed to ensure it. 613 if (!child->hasOverrid eContainingBlockContentLogicalWidth())614 child->setOverrid eContainingBlockContentLogicalWidth(LayoutUnit());615 if (!child->hasOverrid eContainingBlockContentLogicalHeight())616 child->setOverrid eContainingBlockContentLogicalHeight(LayoutUnit(-1));613 if (!child->hasOverridingContainingBlockContentLogicalWidth()) 614 child->setOverridingContainingBlockContentLogicalWidth(LayoutUnit()); 615 if (!child->hasOverridingContainingBlockContentLogicalHeight()) 616 child->setOverridingContainingBlockContentLogicalHeight(LayoutUnit(-1)); 617 617 618 618 GridArea area = grid.gridItemArea(*child); … … 903 903 { 904 904 if (direction == ForColumns) 905 return !child.hasOverrid eContainingBlockContentLogicalWidth() || child.overrideContainingBlockContentLogicalWidth() != size.width();906 return !child.hasOverrid eContainingBlockContentLogicalHeight() || child.overrideContainingBlockContentLogicalHeight() != size.height();905 return !child.hasOverridingContainingBlockContentLogicalWidth() || child.overridingContainingBlockContentLogicalWidth() != size.width(); 906 return !child.hasOverridingContainingBlockContentLogicalHeight() || child.overridingContainingBlockContentLogicalHeight() != size.height(); 907 907 } 908 908 … … 921 921 child.setNeedsLayout(MarkOnlyThis); 922 922 923 child.setOverrid eContainingBlockContentLogicalWidth(gridAreaLogicalSize.width());924 child.setOverrid eContainingBlockContentLogicalHeight(gridAreaLogicalSize.height());923 child.setOverridingContainingBlockContentLogicalWidth(gridAreaLogicalSize.width()); 924 child.setOverridingContainingBlockContentLogicalHeight(gridAreaLogicalSize.height()); 925 925 } 926 926 … … 987 987 LayoutUnit rowBreadth = gridAreaBreadthForOutOfFlowChild(child, ForRows); 988 988 989 child.setOverrid eContainingBlockContentLogicalWidth(columnBreadth);990 child.setOverrid eContainingBlockContentLogicalHeight(rowBreadth);989 child.setOverridingContainingBlockContentLogicalWidth(columnBreadth); 990 child.setOverridingContainingBlockContentLogicalHeight(rowBreadth); 991 991 992 992 // Mark for layout as we're resetting the position before and we relay in generic layout logic … … 1126 1126 void RenderGrid::applyStretchAlignmentToChildIfNeeded(RenderBox& child) 1127 1127 { 1128 ASSERT(child.overrid eContainingBlockContentLogicalHeight());1128 ASSERT(child.overridingContainingBlockContentLogicalHeight()); 1129 1129 1130 1130 // We clear height override values because we will decide now whether it's allowed or 1131 1131 // not, evaluating the conditions which might have changed since the old values were set. 1132 child.clearOverrid eLogicalHeight();1132 child.clearOverridingLogicalHeight(); 1133 1133 1134 1134 GridTrackSizingDirection childBlockDirection = GridLayoutFunctions::flowAwareDirectionForChild(*this, child, ForRows); … … 1136 1136 bool allowedToStretchChildBlockSize = blockFlowIsColumnAxis ? allowedToStretchChildAlongColumnAxis(child) : allowedToStretchChildAlongRowAxis(child); 1137 1137 if (allowedToStretchChildBlockSize) { 1138 LayoutUnit stretchedLogicalHeight = availableAlignmentSpaceForChildBeforeStretching(GridLayoutFunctions::overrid eContainingBlockContentSizeForChild(child, childBlockDirection).value(), child);1138 LayoutUnit stretchedLogicalHeight = availableAlignmentSpaceForChildBeforeStretching(GridLayoutFunctions::overridingContainingBlockContentSizeForChild(child, childBlockDirection).value(), child); 1139 1139 LayoutUnit desiredLogicalHeight = child.constrainLogicalHeightByMinMax(stretchedLogicalHeight, -1_lu); 1140 child.setOverrid eLogicalHeight(desiredLogicalHeight);1140 child.setOverridingLogicalHeight(desiredLogicalHeight); 1141 1141 if (desiredLogicalHeight != child.logicalHeight()) { 1142 1142 // FIXME: Can avoid laying out here in some cases. See https://webkit.org/b/87905. … … 1180 1180 marginLogicalWidth += child.marginEnd(); 1181 1181 1182 LayoutUnit availableAlignmentSpace = child.overrid eContainingBlockContentLogicalWidth().value() - child.logicalWidth() - marginLogicalWidth;1182 LayoutUnit availableAlignmentSpace = child.overridingContainingBlockContentLogicalWidth().value() - child.logicalWidth() - marginLogicalWidth; 1183 1183 if (availableAlignmentSpace <= 0) 1184 1184 return; … … 1211 1211 marginLogicalHeight += child.marginAfter(); 1212 1212 1213 LayoutUnit availableAlignmentSpace = child.overrid eContainingBlockContentLogicalHeight().value() - child.logicalHeight() - marginLogicalHeight;1213 LayoutUnit availableAlignmentSpace = child.overridingContainingBlockContentLogicalHeight().value() - child.logicalHeight() - marginLogicalHeight; 1214 1214 if (availableAlignmentSpace <= 0) 1215 1215 return; … … 1592 1592 { 1593 1593 ASSERT(child.isOutOfFlowPositioned()); 1594 ASSERT(GridLayoutFunctions::hasOverrid eContainingBlockContentSizeForChild(child, direction));1595 LayoutUnit trackBreadth = GridLayoutFunctions::overrid eContainingBlockContentSizeForChild(child, direction).value();1594 ASSERT(GridLayoutFunctions::hasOverridingContainingBlockContentSizeForChild(child, direction)); 1595 LayoutUnit trackBreadth = GridLayoutFunctions::overridingContainingBlockContentSizeForChild(child, direction).value(); 1596 1596 bool isRowAxis = direction == ForColumns; 1597 1597 auto& outOfFlowItemLine = isRowAxis ? m_outOfFlowItemColumn : m_outOfFlowItemRow; -
trunk/Source/WebCore/rendering/RenderRubyBase.cpp
r268666 r268919 68 68 void RenderRubyBase::adjustInlineDirectionLineBounds(int expansionOpportunityCount, float& logicalLeft, float& logicalWidth) const 69 69 { 70 if (rubyRun()->hasOverrid eLogicalWidth() && firstRootBox() && !firstRootBox()->nextRootBox()) {70 if (rubyRun()->hasOverridingLogicalWidth() && firstRootBox() && !firstRootBox()->nextRootBox()) { 71 71 logicalLeft += m_initialOffset; 72 72 logicalWidth -= 2 * m_initialOffset; … … 74 74 } 75 75 76 LayoutUnit maxPreferredLogicalWidth = rubyRun() && rubyRun()->hasOverrid eLogicalWidth() ? rubyRun()->overrideLogicalWidth() : this->maxPreferredLogicalWidth();76 LayoutUnit maxPreferredLogicalWidth = rubyRun() && rubyRun()->hasOverridingLogicalWidth() ? rubyRun()->overridingLogicalWidth() : this->maxPreferredLogicalWidth(); 77 77 if (maxPreferredLogicalWidth >= logicalWidth) 78 78 return; -
trunk/Source/WebCore/rendering/RenderTable.cpp
r268666 r268919 283 283 // Our parent might have set an override content logical width on us, so we must respect it. This 284 284 // is how flexbox containers flex or stretch us. 285 if (hasOverrid eLogicalWidth())286 setLogicalWidth(std::max(logicalWidth(), overrid eLogicalWidth()));285 if (hasOverridingLogicalWidth()) 286 setLogicalWidth(std::max(logicalWidth(), overridingLogicalWidth())); 287 287 288 288 // Ensure we aren't bigger than our max-width style. -
trunk/Source/WebCore/rendering/RenderTableCell.cpp
r268666 r268919 331 331 } 332 332 333 void RenderTableCell::setOverrid eLogicalHeightFromRowHeight(LayoutUnit rowHeight)333 void RenderTableCell::setOverridingLogicalHeightFromRowHeight(LayoutUnit rowHeight) 334 334 { 335 335 clearIntrinsicPadding(); 336 setOverrid eLogicalHeight(rowHeight);336 setOverridingLogicalHeight(rowHeight); 337 337 } 338 338 -
trunk/Source/WebCore/rendering/RenderTableCell.h
r268666 r268919 103 103 LayoutUnit paddingAfter() const override; 104 104 105 void setOverrid eLogicalHeightFromRowHeight(LayoutUnit);105 void setOverridingLogicalHeightFromRowHeight(LayoutUnit); 106 106 107 107 void scrollbarsChanged(bool horizontalScrollbarChanged, bool verticalScrollbarChanged) override; -
trunk/Source/WebCore/rendering/RenderTableSection.cpp
r268666 r268919 284 284 unsigned cellStartRow = cell->rowIndex(); 285 285 286 if (cell->hasOverrid eLogicalHeight()) {286 if (cell->hasOverridingLogicalHeight()) { 287 287 cell->clearIntrinsicPadding(); 288 cell->clearOverrid eContentSize();288 cell->clearOverridingContentSize(); 289 289 cell->setChildNeedsLayout(MarkOnlyThis); 290 290 cell->layoutIfNeeded(); … … 523 523 // height, which becomes irrelevant once the cell has 524 524 // been resized based off its percentage. 525 cell.setOverrid eLogicalHeightFromRowHeight(rowHeight);525 cell.setOverridingLogicalHeightFromRowHeight(rowHeight); 526 526 cell.layoutIfNeeded(); 527 527
Note:
See TracChangeset
for help on using the changeset viewer.