Changeset 238114 in webkit
- Timestamp:
- Nov 12, 2018 4:31:51 PM (5 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r238112 r238114 1 2018-11-12 Javier Fernandez <jfernandez@igalia.com> 2 3 [css-grid] Refactoring to make more explicit the orthogonal items' pre-layout logic 4 https://bugs.webkit.org/show_bug.cgi?id=191358 5 6 Reviewed by Manuel Rego Casasnovas. 7 8 These changes are just a refactoring to ease the integration of the new Baseline Alignment 9 logic in a follow up patch. 10 11 We need to properly estimate the grid area size of orthogonal items so that we can perform 12 an accurate pre-layout. This is important because orthogonal items will synthesize their baseline 13 if they participate in any baseline alignment context. 14 15 No new tests, since no behavior change has been introduced in this patch. 16 17 * rendering/Grid.cpp: 18 (WebCore::Grid::setNeedsItemsPlacement): 19 * rendering/Grid.h: 20 * rendering/GridTrackSizingAlgorithm.cpp: 21 (WebCore::GridTrackSizingAlgorithm::estimatedGridAreaBreadthForChild const): 22 (WebCore::GridTrackSizingAlgorithm::gridAreaBreadthForChild const): 23 (WebCore::GridTrackSizingAlgorithm::isRelativeGridLengthAsAuto const): 24 (WebCore::GridTrackSizingAlgorithm::isRelativeSizedTrackAsAuto const): 25 (WebCore::GridTrackSizingAlgorithm::gridTrackSize const): 26 (WebCore::IndefiniteSizeStrategy::findUsedFlexFraction const): 27 (WebCore::GridTrackSizingAlgorithm::run): 28 (WebCore::GridTrackSizingAlgorithm::reset): 29 * rendering/GridTrackSizingAlgorithm.h: 30 (WebCore::GridTrackSizingAlgorithmStrategy::gridTrackSize const): 31 * rendering/RenderGrid.cpp: 32 (WebCore::RenderGrid::repeatTracksSizingIfNeeded): 33 (WebCore::RenderGrid::layoutBlock): 34 (WebCore::RenderGrid::computeIntrinsicLogicalWidths const): 35 (WebCore::RenderGrid::computeTrackSizesForIndefiniteSize const): 36 (WebCore::RenderGrid::placeItemsOnGrid const): 37 (WebCore::RenderGrid::performGridItemsPreLayout const): 38 (WebCore::overrideSizeChanged): 39 (WebCore::hasRelativeBlockAxisSize): 40 (WebCore::RenderGrid::updateGridAreaLogicalSize const): 41 (WebCore::RenderGrid::layoutGridItems): 42 * rendering/RenderGrid.h: 43 1 44 2018-11-12 Sihui Liu <sihui_liu@apple.com> 2 45 -
trunk/Source/WebCore/rendering/Grid.cpp
r231245 r238114 158 158 m_grid.shrink(0); 159 159 m_gridItemArea.clear(); 160 m_hasAnyOrthogonalGridItem = false;161 160 m_smallestRowStart = 0; 162 161 m_smallestColumnStart = 0; -
trunk/Source/WebCore/rendering/Grid.h
r231245 r238114 54 54 bool hasGridItems() const { return !m_gridItemArea.isEmpty(); } 55 55 56 // FIXME: move this to SizingData once placeItemsOnGrid() takes it as argument.57 bool hasAnyOrthogonalGridItem() const { return m_hasAnyOrthogonalGridItem; }58 void setHasAnyOrthogonalGridItem(bool hasAnyOrthogonalGridItem) { m_hasAnyOrthogonalGridItem = hasAnyOrthogonalGridItem; }59 60 56 GridArea gridItemArea(const RenderBox& item) const; 61 57 void setGridItemArea(const RenderBox& item, GridArea); … … 96 92 unsigned m_autoRepeatRows { 0 }; 97 93 98 bool m_hasAnyOrthogonalGridItem { false };99 94 bool m_needsItemsPlacement { true }; 100 95 -
trunk/Source/WebCore/rendering/GridTrackSizingAlgorithm.cpp
r237884 r238114 534 534 } 535 535 536 LayoutUnit GridTrackSizingAlgorithm::assumedRowsSizeForOrthogonalChild(const RenderBox& child) const 537 { 538 ASSERT(GridLayoutFunctions::isOrthogonalChild(*m_renderGrid, child)); 539 const GridSpan& span = m_grid.gridItemSpan(child, ForRows); 536 LayoutSize GridTrackSizingAlgorithm::estimatedGridAreaBreadthForChild(const RenderBox& child) const 537 { 538 return {estimatedGridAreaBreadthForChild(child, ForColumns), estimatedGridAreaBreadthForChild(child, ForRows)}; 539 } 540 541 LayoutUnit GridTrackSizingAlgorithm::estimatedGridAreaBreadthForChild(const RenderBox& child, GridTrackSizingDirection direction) const 542 { 543 const GridSpan& span = m_grid.gridItemSpan(child, direction); 540 544 LayoutUnit gridAreaSize; 541 545 bool gridAreaIsIndefinite = false; 542 LayoutUnit containingBlockAvailableSize = m_renderGrid->containingBlockLogicalHeightForContent(ExcludeMarginBorderPadding);546 std::optional<LayoutUnit> availableSize = availableSpace(direction); 543 547 for (auto trackPosition : span) { 544 GridLength maxTrackSize = gridTrackSize(ForRows, trackPosition).maxTrackBreadth(); 545 if (maxTrackSize.isContentSized() || maxTrackSize.isFlex()) 548 // We may need to estimate the grid area size before running the track 549 // sizing algorithm in order to perform the pre-layout of orthogonal 550 // items. 551 GridTrackSize trackSize = wasSetup() ? gridTrackSize(direction, trackPosition) : rawGridTrackSize(direction, trackPosition); 552 GridLength maxTrackSize = trackSize.maxTrackBreadth(); 553 if (maxTrackSize.isContentSized() || maxTrackSize.isFlex() || isRelativeGridLengthAsAuto(maxTrackSize, direction)) 546 554 gridAreaIsIndefinite = true; 547 555 else 548 gridAreaSize += valueForLength(maxTrackSize.length(), containingBlockAvailableSize); 549 } 550 551 gridAreaSize += m_renderGrid->guttersSize(m_grid, ForRows, span.startLine(), span.integerSpan(), availableSpace(ForRows)); 552 553 return gridAreaIsIndefinite ? std::max(child.maxPreferredLogicalWidth(), gridAreaSize) : gridAreaSize; 556 gridAreaSize += valueForLength(maxTrackSize.length(), availableSize.value_or(LayoutUnit())); 557 } 558 559 gridAreaSize += m_renderGrid->guttersSize(m_grid, direction, span.startLine(), span.integerSpan(), availableSize); 560 561 GridTrackSizingDirection childInlineDirection = GridLayoutFunctions::flowAwareDirectionForChild(*m_renderGrid, child, ForColumns); 562 if (gridAreaIsIndefinite) 563 return direction == childInlineDirection ? std::max(child.maxPreferredLogicalWidth(), gridAreaSize) : LayoutUnit(-1); 564 return gridAreaSize; 554 565 } 555 566 … … 566 577 // https://github.com/w3c/csswg-drafts/issues/2697 567 578 if (m_sizingState == ColumnSizingFirstIteration) 568 return assumedRowsSizeForOrthogonalChild(child);579 return estimatedGridAreaBreadthForChild(child, ForRows); 569 580 addContentAlignmentOffset = true; 570 581 } … … 584 595 } 585 596 597 bool GridTrackSizingAlgorithm::isRelativeGridLengthAsAuto(const GridLength& length, GridTrackSizingDirection direction) const 598 { 599 return length.isPercentage() && !availableSpace(direction); 600 } 601 586 602 GridTrackSize GridTrackSizingAlgorithm::gridTrackSize(GridTrackSizingDirection direction, unsigned translatedIndex) const 587 603 { 604 ASSERT(wasSetup()); 588 605 // Collapse empty auto repeat tracks if auto-fit. 589 606 if (m_grid.hasAutoRepeatEmptyTracks(direction) && m_grid.isEmptyAutoRepeatTrack(direction, translatedIndex)) … … 596 613 GridLength minTrackBreadth = trackSize.minTrackBreadth(); 597 614 GridLength maxTrackBreadth = trackSize.maxTrackBreadth(); 598 599 // FIXME: Ensure this condition for determining whether a size is indefinite or not is working 600 // correctly for orthogonal flows. 601 if (!availableSpace(direction) && (minTrackBreadth.isPercentage() || maxTrackBreadth.isPercentage())) { 602 if (minTrackBreadth.isPercentage()) 603 minTrackBreadth = Length(Auto); 604 if (maxTrackBreadth.isPercentage()) 605 maxTrackBreadth = Length(Auto); 606 } 615 // If the logical width/height of the grid container is indefinite, percentage 616 // values are treated as <auto>. 617 if (isRelativeGridLengthAsAuto(trackSize.minTrackBreadth(), direction)) 618 minTrackBreadth = Length(Auto); 619 if (isRelativeGridLengthAsAuto(trackSize.maxTrackBreadth(), direction)) 620 maxTrackBreadth = Length(Auto); 607 621 608 622 // Flex sizes are invalid as a min sizing function. However we still can have a flexible |minTrackBreadth| … … 842 856 // FIXME: we pass TrackSizing to gridTrackSize() because it does not really matter 843 857 // as we know the track is a flex sized track. It'd be nice not to have to do that. 844 flexFraction = std::max(flexFraction, normalizedFlexFraction(allTracks[trackIndex], m_algorithm.gridTrackSize(direction, trackIndex).maxTrackBreadth().flex()));858 flexFraction = std::max(flexFraction, normalizedFlexFraction(allTracks[trackIndex], gridTrackSize(direction, trackIndex).maxTrackBreadth().flex())); 845 859 } 846 860 … … 1165 1179 void GridTrackSizingAlgorithm::run() 1166 1180 { 1181 ASSERT(wasSetup()); 1167 1182 StateMachine stateMachine(*this); 1168 1183 … … 1198 1213 void GridTrackSizingAlgorithm::reset() 1199 1214 { 1215 ASSERT(wasSetup()); 1200 1216 m_sizingState = ColumnSizingFirstIteration; 1201 1217 m_columns.shrink(0); -
trunk/Source/WebCore/rendering/GridTrackSizingAlgorithm.h
r234687 r238114 103 103 // Required by RenderGrid. Try to minimize the exposed surface. 104 104 const Grid& grid() const { return m_grid; } 105 GridTrackSize gridTrackSize(GridTrackSizingDirection, unsigned translatedIndex) const; 105 // FIXME (jfernandez): We should remove any public getter for this attribute 106 // and encapsulate any access in the algorithm class. 107 Grid& mutableGrid() const { return m_grid; } 106 108 107 109 LayoutUnit minContentSize() const { return m_minContentSize; }; 108 110 LayoutUnit maxContentSize() const { return m_maxContentSize; }; 111 112 LayoutSize estimatedGridAreaBreadthForChild(const RenderBox&) const; 109 113 110 114 Vector<GridTrack>& tracks(GridTrackSizingDirection direction) { return direction == ForColumns ? m_columns : m_rows; } … … 127 131 private: 128 132 std::optional<LayoutUnit> availableSpace() const { return availableSpace(m_direction); } 133 bool isRelativeGridLengthAsAuto(const GridLength&, GridTrackSizingDirection) const; 134 GridTrackSize gridTrackSize(GridTrackSizingDirection, unsigned translatedIndex) const; 129 135 const GridTrackSize& rawGridTrackSize(GridTrackSizingDirection, unsigned translatedIndex) const; 130 LayoutUnit assumedRowsSizeForOrthogonalChild(const RenderBox&) const;131 136 132 137 // Helper methods for step 1. initializeTrackSizes(). … … 141 146 LayoutUnit itemSizeForTrackSizeComputationPhase(TrackSizeComputationPhase, RenderBox&) const; 142 147 template <TrackSizeComputationPhase phase> void distributeSpaceToTracks(Vector<GridTrack*>& tracks, Vector<GridTrack*>* growBeyondGrowthLimitsTracks, LayoutUnit& availableLogicalSpace) const; 148 LayoutUnit estimatedGridAreaBreadthForChild(const RenderBox&, GridTrackSizingDirection) const; 143 149 LayoutUnit gridAreaBreadthForChild(const RenderBox&, GridTrackSizingDirection) const; 144 150 … … 163 169 bool isValidTransition() const; 164 170 171 // Data. 172 bool wasSetup() const { return !!m_strategy; } 165 173 bool m_needsSetup { true }; 166 174 bool m_hasPercentSizedRowsIndefiniteHeight { false }; … … 240 248 bool updateOverrideContainingBlockContentSizeForChild(RenderBox&, GridTrackSizingDirection, std::optional<LayoutUnit> = std::nullopt) const; 241 249 250 GridTrackSize gridTrackSize(GridTrackSizingDirection direction, size_t translatedIndex) const { return m_algorithm.gridTrackSize(direction, translatedIndex); } 251 242 252 // GridTrackSizingAlgorithm accessors for subclasses. 243 253 LayoutUnit computeTrackBasedSize() const { return m_algorithm.computeTrackBasedSize(); } -
trunk/Source/WebCore/rendering/RenderGrid.cpp
r237884 r238114 159 159 // cases with orthogonal flows require this extra cycle; we need a more specific 160 160 // condition to detect whether child's min-content contribution has changed or not. 161 if (m_ grid.hasAnyOrthogonalGridItem()|| m_trackSizingAlgorithm.hasAnyPercentSizedRowsIndefiniteHeight()) {161 if (m_hasAnyOrthogonalItem || m_trackSizingAlgorithm.hasAnyPercentSizedRowsIndefiniteHeight()) { 162 162 computeTrackSizesForDefiniteSize(ForColumns, availableSpaceForColumns); 163 163 computeContentPositionAndDistributionOffset(ForColumns, m_trackSizingAlgorithm.freeSpace(ForColumns).value(), nonCollapsedTracks(ForColumns)); … … 195 195 bool hasDefiniteLogicalHeight = hasOverrideContentLogicalHeight() || computeContentLogicalHeight(MainOrPreferredSize, style().logicalHeight(), std::nullopt); 196 196 197 // We need to clear both own and containingBlock override sizes of orthogonal items to ensure we get the 198 // same result when grid's intrinsic size is computed again in the updateLogicalWidth call bellow. 199 if (sizesLogicalWidthToFitContent(MaxSize) || style().logicalWidth().isIntrinsicOrAuto()) { 200 for (auto* child = firstChildBox(); child; child = child->nextSiblingBox()) { 201 if (child->isOutOfFlowPositioned() || !GridLayoutFunctions::isOrthogonalChild(*this, *child)) 202 continue; 203 child->clearOverrideContentSize(); 204 child->clearOverrideContainingBlockContentSize(); 205 child->setNeedsLayout(); 206 child->layoutIfNeeded(); 207 } 197 m_hasAnyOrthogonalItem = false; 198 for (auto* child = firstChildBox(); child; child = child->nextSiblingBox()) { 199 if (child->isOutOfFlowPositioned()) 200 continue; 201 // Grid's layout logic controls the grid item's override height, hence we need to 202 // clear any override height set previously, so it doesn't interfere in current layout 203 // execution. Grid never uses the override width, that's why we don't need to clear it. 204 child->clearOverrideContentLogicalHeight(); 205 206 // We may need to repeat the track sizing in case of any grid item was orthogonal. 207 if (GridLayoutFunctions::isOrthogonalChild(*this, *child)) 208 m_hasAnyOrthogonalItem = true; 208 209 } 209 210 … … 217 218 218 219 LayoutUnit availableSpaceForColumns = availableLogicalWidth(); 219 placeItemsOnGrid(m_grid, availableSpaceForColumns); 220 placeItemsOnGrid(m_trackSizingAlgorithm, availableSpaceForColumns); 221 222 performGridItemsPreLayout(m_trackSizingAlgorithm); 220 223 221 224 // 1- First, the track sizing algorithm is used to resolve the sizes of the … … 236 239 m_minContentHeight = LayoutUnit(); 237 240 m_maxContentHeight = LayoutUnit(); 238 computeTrackSizesForIndefiniteSize(m_trackSizingAlgorithm, ForRows, m_grid,*m_minContentHeight, *m_maxContentHeight);241 computeTrackSizesForIndefiniteSize(m_trackSizingAlgorithm, ForRows, *m_minContentHeight, *m_maxContentHeight); 239 242 // FIXME: This should be really added to the intrinsic height in RenderBox::computeContentAndScrollbarLogicalHeightUsing(). 240 243 // Remove this when that is fixed. … … 385 388 386 389 Grid grid(const_cast<RenderGrid&>(*this)); 387 placeItemsOnGrid(grid, std::nullopt);388 389 390 GridTrackSizingAlgorithm algorithm(this, grid); 390 computeTrackSizesForIndefiniteSize(algorithm, ForColumns, grid, minLogicalWidth, maxLogicalWidth); 391 placeItemsOnGrid(algorithm, std::nullopt); 392 393 performGridItemsPreLayout(algorithm); 394 395 computeTrackSizesForIndefiniteSize(algorithm, ForColumns, minLogicalWidth, maxLogicalWidth); 391 396 392 397 if (hadExcludedChildren) { … … 400 405 } 401 406 402 void RenderGrid::computeTrackSizesForIndefiniteSize(GridTrackSizingAlgorithm& algorithm, GridTrackSizingDirection direction, Grid& grid, LayoutUnit& minIntrinsicSize, LayoutUnit& maxIntrinsicSize) const 403 { 407 void RenderGrid::computeTrackSizesForIndefiniteSize(GridTrackSizingAlgorithm& algorithm, GridTrackSizingDirection direction, LayoutUnit& minIntrinsicSize, LayoutUnit& maxIntrinsicSize) const 408 { 409 const Grid& grid = algorithm.grid(); 404 410 algorithm.setup(direction, numTracks(direction, grid), IntrinsicSizeComputation, std::nullopt, std::nullopt); 405 411 algorithm.run(); … … 558 564 } 559 565 560 // FIXME ): We shouldn't have to pass the available logical width as argument. The problem is that566 // FIXME: We shouldn't have to pass the available logical width as argument. The problem is that 561 567 // availableLogicalWidth() does always return a value even if we cannot resolve it like when 562 568 // computing the intrinsic size (preferred widths). That's why we pass the responsibility to the 563 569 // caller who does know whether the available logical width is indefinite or not. 564 void RenderGrid::placeItemsOnGrid(Grid& grid, std::optional<LayoutUnit> availableSpace) const 565 { 566 unsigned autoRepeatColumns = computeAutoRepeatTracksCount(ForColumns, availableSpace); 570 void RenderGrid::placeItemsOnGrid(GridTrackSizingAlgorithm& algorithm, std::optional<LayoutUnit> availableLogicalWidth) const 571 { 572 Grid& grid = algorithm.mutableGrid(); 573 unsigned autoRepeatColumns = computeAutoRepeatTracksCount(ForColumns, availableLogicalWidth); 567 574 unsigned autoRepeatRows = computeAutoRepeatTracksCount(ForRows, availableLogicalHeightForPercentageComputation()); 568 575 … … 583 590 Vector<RenderBox*> autoMajorAxisAutoGridItems; 584 591 Vector<RenderBox*> specifiedMajorAxisAutoGridItems; 585 bool hasAnyOrthogonalGridItem = false;586 592 for (auto* child = grid.orderIterator().first(); child; child = grid.orderIterator().next()) { 587 593 if (grid.orderIterator().shouldSkipChild(*child)) 588 594 continue; 589 590 hasAnyOrthogonalGridItem = hasAnyOrthogonalGridItem || GridLayoutFunctions::isOrthogonalChild(*this, *child);591 595 592 596 GridArea area = grid.gridItemArea(*child); … … 608 612 grid.insert(*child, { area.rows, area.columns }); 609 613 } 610 grid.setHasAnyOrthogonalGridItem(hasAnyOrthogonalGridItem);611 614 612 615 #if !ASSERT_DISABLED … … 635 638 } 636 639 #endif 640 } 641 642 void RenderGrid::performGridItemsPreLayout(const GridTrackSizingAlgorithm& algorithm) const 643 { 644 ASSERT(!algorithm.grid().needsItemsPlacement()); 645 // FIXME: We need a way when we are calling this during intrinsic size compuation before performing 646 // the layout. Maybe using the PreLayout phase ? 647 for (auto* child = firstChildBox(); child; child = child->nextSiblingBox()) { 648 if (child->isOutOfFlowPositioned()) 649 continue; 650 // Orthogonal items should be laid out in order to properly compute content-sized tracks that may depend on item's intrinsic size. 651 // We also need to properly estimate its grid area size, since it may affect to the baseline shims if such item particiaptes in baseline alignment. 652 if (GridLayoutFunctions::isOrthogonalChild(*this, *child)) { 653 updateGridAreaLogicalSize(*child, algorithm.estimatedGridAreaBreadthForChild(*child)); 654 child->layoutIfNeeded(); 655 } 656 } 637 657 } 638 658 … … 850 870 } 851 871 872 static bool overrideSizeChanged(const RenderBox& child, GridTrackSizingDirection direction, LayoutSize size) 873 { 874 if (direction == ForColumns) 875 return !child.hasOverrideContainingBlockContentLogicalWidth() || child.overrideContainingBlockContentLogicalWidth() != size.width(); 876 return !child.hasOverrideContainingBlockContentLogicalHeight() || child.overrideContainingBlockContentLogicalHeight() != size.height(); 877 } 878 879 static bool hasRelativeBlockAxisSize(const RenderGrid& grid, const RenderBox& child) 880 { 881 return GridLayoutFunctions::isOrthogonalChild(grid, child) ? child.hasRelativeLogicalWidth() || child.style().logicalWidth().isAuto() : child.hasRelativeLogicalHeight(); 882 } 883 884 void RenderGrid::updateGridAreaLogicalSize(RenderBox& child, LayoutSize gridAreaLogicalSize) const 885 { 886 // Because the grid area cannot be styled, we don't need to adjust 887 // the grid breadth to account for 'box-sizing'. 888 bool gridAreaWidthChanged = overrideSizeChanged(child, ForColumns, gridAreaLogicalSize); 889 bool gridAreaHeightChanged = overrideSizeChanged(child, ForRows, gridAreaLogicalSize); 890 if (gridAreaWidthChanged || (gridAreaHeightChanged && hasRelativeBlockAxisSize(*this, child))) 891 child.setNeedsLayout(MarkOnlyThis); 892 893 child.setOverrideContainingBlockContentLogicalWidth(gridAreaLogicalSize.width()); 894 child.setOverrideContainingBlockContentLogicalHeight(gridAreaLogicalSize.height()); 895 } 896 852 897 void RenderGrid::layoutGridItems() 853 898 { … … 863 908 } 864 909 865 // Because the grid area cannot be styled, we don't need to adjust 866 // the grid breadth to account for 'box-sizing'. 867 std::optional<LayoutUnit> oldOverrideContainingBlockContentLogicalWidth = child->hasOverrideContainingBlockContentLogicalWidth() ? child->overrideContainingBlockContentLogicalWidth() : LayoutUnit(); 868 std::optional<LayoutUnit> oldOverrideContainingBlockContentLogicalHeight = child->hasOverrideContainingBlockContentLogicalHeight() ? child->overrideContainingBlockContentLogicalHeight() : LayoutUnit(); 869 870 LayoutUnit overrideContainingBlockContentLogicalWidth = gridAreaBreadthForChildIncludingAlignmentOffsets(*child, ForColumns); 871 LayoutUnit overrideContainingBlockContentLogicalHeight = gridAreaBreadthForChildIncludingAlignmentOffsets(*child, ForRows); 872 if (!oldOverrideContainingBlockContentLogicalWidth || oldOverrideContainingBlockContentLogicalWidth.value() != overrideContainingBlockContentLogicalWidth 873 || ((!oldOverrideContainingBlockContentLogicalHeight || oldOverrideContainingBlockContentLogicalHeight.value() != overrideContainingBlockContentLogicalHeight) 874 && child->hasRelativeLogicalHeight())) 875 child->setNeedsLayout(MarkOnlyThis); 876 877 child->setOverrideContainingBlockContentLogicalWidth(overrideContainingBlockContentLogicalWidth); 878 child->setOverrideContainingBlockContentLogicalHeight(overrideContainingBlockContentLogicalHeight); 910 // Setting the definite grid area's sizes. It may imply that the 911 // item must perform a layout if its area differs from the one 912 // used during the track sizing algorithm. 913 updateGridAreaLogicalSize(*child, LayoutSize(gridAreaBreadthForChildIncludingAlignmentOffsets(*child, ForColumns), gridAreaBreadthForChildIncludingAlignmentOffsets(*child, ForRows))); 879 914 880 915 LayoutRect oldChildRect = child->frameRect(); -
trunk/Source/WebCore/rendering/RenderGrid.h
r237884 r238114 75 75 LayoutUnit gridItemOffset(GridTrackSizingDirection) const; 76 76 77 void updateGridAreaLogicalSize(RenderBox&, LayoutSize) const; 78 77 79 StyleContentAlignmentData contentAlignment(GridTrackSizingDirection) const; 78 80 … … 106 108 std::unique_ptr<OrderedTrackIndexSet> computeEmptyTracksForAutoRepeat(Grid&, GridTrackSizingDirection) const; 107 109 108 void placeItemsOnGrid(Grid&, std::optional<LayoutUnit> availableSpaceForColumns) const; 110 void performGridItemsPreLayout(const GridTrackSizingAlgorithm&) const; 111 112 void placeItemsOnGrid(GridTrackSizingAlgorithm&, std::optional<LayoutUnit> availableLogicalWidth) const; 109 113 void populateExplicitGridAndOrderIterator(Grid&) const; 110 114 std::unique_ptr<GridArea> createEmptyGridAreaAtSpecifiedPositionsOutsideGrid(Grid&, const RenderBox&, GridTrackSizingDirection, const GridSpan&) const; … … 122 126 123 127 void computeTrackSizesForDefiniteSize(GridTrackSizingDirection, LayoutUnit availableSpace); 124 void computeTrackSizesForIndefiniteSize(GridTrackSizingAlgorithm&, GridTrackSizingDirection, Grid&,LayoutUnit& minIntrinsicSize, LayoutUnit& maxIntrinsicSize) const;128 void computeTrackSizesForIndefiniteSize(GridTrackSizingAlgorithm&, GridTrackSizingDirection, LayoutUnit& minIntrinsicSize, LayoutUnit& maxIntrinsicSize) const; 125 129 LayoutUnit computeTrackBasedLogicalHeight() const; 126 130 … … 194 198 std::optional<LayoutUnit> m_minContentHeight; 195 199 std::optional<LayoutUnit> m_maxContentHeight; 200 201 bool m_hasAnyOrthogonalItem {false}; 196 202 }; 197 203
Note: See TracChangeset
for help on using the changeset viewer.