Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 7f95fb8d4a1f63ad3f96b3e9fdf4ab53f9e14d80 https://github.com/WebKit/WebKit/commit/7f95fb8d4a1f63ad3f96b3e9fdf4ab53f9e14d80 Author: Simon Fraser <simon.fra...@apple.com> Date: 2024-08-02 (Fri, 02 Aug 2024)
Changed paths: M Source/WebCore/platform/graphics/FloatQuad.cpp M Source/WebCore/platform/graphics/GeometryUtilities.cpp M Source/WebCore/platform/graphics/GeometryUtilities.h M Source/WebCore/rendering/shapes/Shape.cpp M Source/WebCore/rendering/style/BasicShapes.cpp M Source/WebCore/rendering/style/BasicShapes.h M Source/WebCore/rendering/style/StyleGradientImage.cpp Log Message: ----------- Clean up some radial-size logic in shapes and gradients https://bugs.webkit.org/show_bug.cgi?id=277558 rdar://133073530 Reviewed by Alan Baradlay. Share some code between gradients and shapes related to computing the distance to closest corners and sides, moving some helper functions to GeometryUtilities. Convert if/else into switch in a couple of places, to prepare for corner-relative values. * Source/WebCore/platform/graphics/FloatQuad.cpp: (WebCore::min4): Deleted. (WebCore::max4): Deleted. * Source/WebCore/platform/graphics/GeometryUtilities.cpp: (WebCore::distanceToClosestSide): (WebCore::distanceToFarthestSide): (WebCore::distanceToClosestCorner): (WebCore::distanceToFarthestCorner): * Source/WebCore/platform/graphics/GeometryUtilities.h: (WebCore::min4): (WebCore::max4): * Source/WebCore/rendering/shapes/Shape.cpp: (WebCore::Shape::createShape): * Source/WebCore/rendering/style/BasicShapes.cpp: (WebCore::BasicShapeCircle::floatValueForRadiusInBox const): Pass FloatSize instead of width and height. (WebCore::BasicShapeCircle::pathForCenterCoordinate const): (WebCore::BasicShapeEllipse::floatSizeForRadiusInBox const): Compute x and y in one call, returning a FloatSize (WebCore::BasicShapeEllipse::pathForCenterCoordinate const): (WebCore::BasicShapeEllipse::floatValueForRadiusInBox const): Deleted. * Source/WebCore/rendering/style/BasicShapes.h: * Source/WebCore/rendering/style/StyleGradientImage.cpp: (WebCore::findDistanceToClosestCorner): Renamed to avoid conflict with distanceToClosestCorner (WebCore::findDistanceToFarthestCorner): Renamed to avoid conflict with distanceToFarthestCorner (WebCore::StyleGradientImage::createGradient const): (WebCore::distanceToClosestCorner): Deleted. (WebCore::distanceToFarthestCorner): Deleted. Canonical link: https://commits.webkit.org/281778@main To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes