Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 0d2e95a2786bc89afe987be509593e5edbeece34 https://github.com/WebKit/WebKit/commit/0d2e95a2786bc89afe987be509593e5edbeece34 Author: Sammy Gill <sammy.g...@apple.com> Date: 2023-10-10 (Tue, 10 Oct 2023)
Changed paths: M Source/WebCore/css/ComputedStyleExtractor.cpp M Source/WebCore/rendering/Grid.cpp M Source/WebCore/rendering/GridBaselineAlignment.cpp M Source/WebCore/rendering/GridLayoutFunctions.cpp M Source/WebCore/rendering/GridLayoutFunctions.h M Source/WebCore/rendering/GridMasonryLayout.cpp M Source/WebCore/rendering/GridMasonryLayout.h M Source/WebCore/rendering/GridTrackSizingAlgorithm.cpp M Source/WebCore/rendering/GridTrackSizingAlgorithm.h M Source/WebCore/rendering/RenderBox.cpp M Source/WebCore/rendering/RenderGrid.cpp M Source/WebCore/rendering/RenderGrid.h M Source/WebCore/rendering/style/GridPosition.cpp M Source/WebCore/rendering/style/GridPosition.h M Source/WebCore/rendering/style/GridPositionsResolver.cpp M Source/WebCore/rendering/style/GridPositionsResolver.h M Source/WebCore/style/StyleBuilderConverter.h M Source/WebCore/style/StyleBuilderCustom.h Log Message: ----------- [css-grid] enums in grid code should be enum classes https://bugs.webkit.org/show_bug.cgi?id=262975 rdar://problem/116755214 Reviewed by Simon Fraser. The follwing are enums in grid code that should be enum classes. cacheBaselineAlignedChildren uses bitwise operators with GridAxis so a couple of static_casts were needed there. * Source/WebCore/css/ComputedStyleExtractor.cpp: (WebCore::valueForGridTrackSizeList): (WebCore::valueForGridTrackList): (WebCore::ComputedStyleExtractor::valueForPropertyInStyle const): * Source/WebCore/rendering/Grid.cpp: (WebCore::Grid::numTracks const): (WebCore::Grid::ensureGridSize): (WebCore::Grid::explicitGridStart const): (WebCore::Grid::setAutoRepeatTracks): (WebCore::Grid::autoRepeatTracks const): (WebCore::Grid::hasAutoRepeatEmptyTracks const): (WebCore::Grid::autoRepeatEmptyTracks const): (WebCore::Grid::gridItemSpan const): (WebCore::GridIterator::GridIterator): (WebCore::GridIterator::nextGridItem): (WebCore::GridIterator::isEmptyAreaEnough const): (WebCore::GridIterator::nextEmptyGridArea): (WebCore::GridIterator::createForSubgrid): * Source/WebCore/rendering/GridBaselineAlignment.cpp: (WebCore::GridBaselineAlignment::isHorizontalBaselineAxis const): (WebCore::GridBaselineAlignment::isParallelToBaselineAxisForChild const): (WebCore::GridBaselineAlignment::baselineGroupForChild const): (WebCore::GridBaselineAlignment::updateBaselineAlignmentContext): (WebCore::GridBaselineAlignment::clear): * Source/WebCore/rendering/GridLayoutFunctions.cpp: (WebCore::GridLayoutFunctions::marginStartIsAuto): (WebCore::GridLayoutFunctions::marginEndIsAuto): (WebCore::GridLayoutFunctions::childHasMargin): (WebCore::GridLayoutFunctions::computeMarginLogicalSizeForChild): (WebCore::GridLayoutFunctions::hasRelativeOrIntrinsicSizeForChild): (WebCore::GridLayoutFunctions::extraMarginForSubgrid): (WebCore::GridLayoutFunctions::marginLogicalSizeForChild): (WebCore::GridLayoutFunctions::flowAwareDirectionForChild): (WebCore::GridLayoutFunctions::flowAwareDirectionForParent): (WebCore::GridLayoutFunctions::hasOverridingContainingBlockContentSizeForChild): (WebCore::GridLayoutFunctions::overridingContainingBlockContentSizeForChild): (WebCore::GridLayoutFunctions::isFlippedDirection): * Source/WebCore/rendering/GridLayoutFunctions.h: (): Deleted. * Source/WebCore/rendering/GridMasonryLayout.cpp: (WebCore::GridMasonryLayout::performMasonryPlacement): (WebCore::GridMasonryLayout::allocateCapacityForMasonryVectors): (WebCore::GridMasonryLayout::setItemGridAxisContainingBlockToGridArea): (WebCore::GridMasonryLayout::masonryAxisMarginBoxForItem): (WebCore::GridMasonryLayout::gridAxisDirection const): (WebCore::GridMasonryLayout::gridAxisSpanFromArea const): (WebCore::GridMasonryLayout::masonryGridAreaFromGridAxisSpan const): * Source/WebCore/rendering/GridMasonryLayout.h: (WebCore::GridMasonryLayout::itemGridAreaStartsAtFirstLine): * Source/WebCore/rendering/GridTrackSizingAlgorithm.cpp: (WebCore::gridAxisForDirection): (WebCore::gridDirectionForAxis): (WebCore::hasRelativeMarginOrPaddingForChild): (WebCore::hasRelativeOrIntrinsicSizeForChild): (WebCore::setOverridingContainingBlockContentSizeForChild): (WebCore::GridTrackSizingAlgorithm::setFreeSpace): (WebCore::GridTrackSizingAlgorithm::setAvailableSpace): (WebCore::GridTrackSizingAlgorithm::rawGridTrackSize const): (WebCore::GridTrackSizingAlgorithm::itemSizeForTrackSizeComputationPhase const): (WebCore::shouldProcessTrackForTrackSizeComputationPhase): (WebCore::trackSizeForTrackSizeComputationPhase): (WebCore::updateTrackSizeForTrackSizeComputationPhase): (WebCore::trackShouldGrowBeyondGrowthLimitsForTrackSizeComputationPhase): (WebCore::markAsInfinitelyGrowableForTrackSizeComputationPhase): (WebCore::GridTrackSizingAlgorithm::increaseSizesToAccommodateSpanningItems): (WebCore::clampGrowthShareIfNeeded): (WebCore::distributeItemIncurredIncreaseToTrack): (WebCore::GridTrackSizingAlgorithm::distributeSpaceToTracks const): (WebCore::GridTrackSizingAlgorithm::estimatedGridAreaBreadthForChild const): (WebCore::GridTrackSizingAlgorithm::gridAreaBreadthForChild const): (WebCore::GridTrackSizingAlgorithm::computeGridContainerIntrinsicSizes): (WebCore::GridTrackSizingAlgorithmStrategy::logicalHeightForChild const): (WebCore::GridTrackSizingAlgorithmStrategy::minContentForChild const): (WebCore::GridTrackSizingAlgorithmStrategy::maxContentForChild const): (WebCore::GridTrackSizingAlgorithmStrategy::minSizeForChild const): (WebCore::GridTrackSizingAlgorithm::canParticipateInBaselineAlignment const): (WebCore::GridTrackSizingAlgorithm::participateInBaselineAlignment const): (WebCore::GridTrackSizingAlgorithm::cacheBaselineAlignedItem): (WebCore::GridTrackSizingAlgorithm::copyBaselineItemsCache): (WebCore::GridTrackSizingAlgorithmStrategy::minLogicalSizeForChild const): (WebCore::IndefiniteSizeStrategy::layoutGridItemForMinSizeComputation const): (WebCore::IndefiniteSizeStrategy::recomputeUsedFlexFractionIfNeeded const): (WebCore::IndefiniteSizeStrategy::freeSpaceForStretchAutoTracksStep const): (WebCore::DefiniteSizeStrategy::minLogicalSizeForChild const): (WebCore::DefiniteSizeStrategy::minContentForChild const): (WebCore::GridTrackSizingAlgorithm::initializeTrackSizes): (WebCore::marginAndBorderAndPaddingForEdge): (WebCore::GridTrackSizingAlgorithm::accumulateIntrinsicSizesForTrack): (WebCore::GridTrackSizingAlgorithm::advanceNextState): (WebCore::GridTrackSizingAlgorithm::isValidTransition const): (WebCore::GridTrackSizingAlgorithm::setup): (WebCore::GridTrackSizingAlgorithm::computeBaselineAlignmentContext): (WebCore::GridTrackSizingAlgorithm::copyUsedTrackSizesForSubgrid): (WebCore::GridTrackSizingAlgorithm::run): (WebCore::GridTrackSizingAlgorithm::reset): * Source/WebCore/rendering/GridTrackSizingAlgorithm.h: (WebCore::GridTrackSizingAlgorithmStrategy::distributeSpaceToTracks const): * Source/WebCore/rendering/RenderBox.cpp: (WebCore::RenderBox::hasStretchedLogicalHeight const): (WebCore::RenderBox::hasStretchedLogicalWidth const): * Source/WebCore/rendering/RenderGrid.cpp: (WebCore::RenderGrid::selfAlignmentForChild const): (WebCore::RenderGrid::styleDidChange): (WebCore::RenderGrid::availableSpaceForGutters const): (WebCore::RenderGrid::computeTrackSizesForDefiniteSize): (WebCore::RenderGrid::repeatTracksSizingIfNeeded): (WebCore::cacheBaselineAlignedChildren): (WebCore::RenderGrid::layoutGrid): (WebCore::RenderGrid::layoutMasonry): (WebCore::RenderGrid::gridGap const): (WebCore::RenderGrid::gridItemOffset const): (WebCore::RenderGrid::computeIntrinsicLogicalWidths const): (WebCore::RenderGrid::computeTrackSizesForIndefiniteSize const): (WebCore::RenderGrid::shouldCheckExplicitIntrinsicInnerLogicalSize const): (WebCore::RenderGrid::explicitIntrinsicInnerLogicalSize const): (WebCore::RenderGrid::computeAutoRepeatTracksCount const): (WebCore::RenderGrid::computeEmptyTracksForAutoRepeat const): (WebCore::RenderGrid::clampAutoRepeatTracks const): (WebCore::RenderGrid::isMasonry const): (WebCore::RenderGrid::placeItemsOnGrid): (WebCore::RenderGrid::performGridItemsPreLayout const): (WebCore::RenderGrid::populateExplicitGridAndOrderIterator): (WebCore::RenderGrid::createEmptyGridAreaAtSpecifiedPositionsOutsideGrid const): (WebCore::RenderGrid::placeSpecifiedMajorAxisItemsOnGrid): (WebCore::RenderGrid::placeAutoMajorAxisItemOnGrid): (WebCore::RenderGrid::autoPlacementMajorAxisDirection const): (WebCore::RenderGrid::autoPlacementMinorAxisDirection const): (WebCore::RenderGrid::trackSizesForComputedStyle const): (WebCore::overrideSizeChanged): (WebCore::RenderGrid::updateGridAreaLogicalSize const): (WebCore::RenderGrid::updateGridAreaForAspectRatioItems): (WebCore::RenderGrid::layoutGridItems): (WebCore::RenderGrid::layoutMasonryItems): (WebCore::RenderGrid::hasStaticPositionForChild const): (WebCore::RenderGrid::layoutPositionedObject): (WebCore::RenderGrid::gridAreaBreadthForChildIncludingAlignmentOffsets const): (WebCore::RenderGrid::populateGridPositionsForDirection): (WebCore::RenderGrid::alignSelfForChild const): (WebCore::RenderGrid::justifySelfForChild const): (WebCore::RenderGrid::applyStretchAlignmentToChildIfNeeded): (WebCore::RenderGrid::applySubgridStretchAlignmentToChildIfNeeded): (WebCore::RenderGrid::isChildEligibleForMarginTrim const): (WebCore::RenderGrid::isBaselineAlignmentForChild const): (WebCore::RenderGrid::getBaselineChild const): (WebCore::RenderGrid::columnAxisBaselineOffsetForChild const): (WebCore::RenderGrid::rowAxisBaselineOffsetForChild const): (WebCore::RenderGrid::columnAxisPositionForChild const): (WebCore::RenderGrid::rowAxisPositionForChild const): (WebCore::RenderGrid::columnAxisOffsetForChild const): (WebCore::RenderGrid::rowAxisOffsetForChild const): (WebCore::RenderGrid::isSubgrid const): (WebCore::RenderGrid::gridAreaBreadthForOutOfFlowChild): (WebCore::RenderGrid::logicalOffsetForOutOfFlowChild const): (WebCore::RenderGrid::gridAreaPositionForOutOfFlowChild const): (WebCore::RenderGrid::gridAreaPositionForInFlowChild const): (WebCore::RenderGrid::contentAlignment const): (WebCore::RenderGrid::computeContentPositionAndDistributionOffset): (WebCore::RenderGrid::setLogicalPositionForChild const): (WebCore::RenderGrid::setLogicalOffsetForChild const): (WebCore::RenderGrid::logicalOffsetForChild const): (WebCore::RenderGrid::numTracks const): (WebCore::RenderGrid::computeGridPositionsForOutOfFlowChild const): * Source/WebCore/rendering/RenderGrid.h: * Source/WebCore/rendering/style/GridPosition.cpp: (WebCore::GridPosition::setExplicitPosition): (WebCore::GridPosition::setAutoPosition): (WebCore::GridPosition::setSpanPosition): (WebCore::GridPosition::setNamedGridArea): (WebCore::GridPosition::integerPosition const): (WebCore::GridPosition::namedGridLine const): (WebCore::GridPosition::spanPosition const): (WebCore::operator<<): * Source/WebCore/rendering/style/GridPosition.h: (WebCore::GridPosition::GridPosition): (WebCore::GridPosition::isAuto const): (WebCore::GridPosition::isSpan const): (WebCore::GridPosition::isNamedGridArea const): (): Deleted. * Source/WebCore/rendering/style/GridPositionsResolver.cpp: (WebCore::isColumnSide): (WebCore::isStartSide): (WebCore::directionFromSide): (WebCore::transposedSide): (WebCore::NamedLineCollectionBase::NamedLineCollectionBase): (WebCore::NamedLineCollection::NamedLineCollection): (WebCore::adjustGridPositionsFromStyle): (WebCore::GridPositionsResolver::explicitGridColumnCount): (WebCore::GridPositionsResolver::explicitGridRowCount): (WebCore::definiteGridSpanWithNamedLineSpanAgainstOpposite): (WebCore::GridPositionsResolver::initialPositionSide): (WebCore::GridPositionsResolver::finalPositionSide): (WebCore::resolveGridPositionFromStyle): * Source/WebCore/rendering/style/GridPositionsResolver.h: * Source/WebCore/style/StyleBuilderConverter.h: (WebCore::Style::BuilderConverter::createImplicitNamedGridLinesFromGridArea): * Source/WebCore/style/StyleBuilderCustom.h: (WebCore::Style::BuilderCustom::applyValueGridTemplateAreas): Canonical link: https://commits.webkit.org/269184@main _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes