[webkit-changes] [WebKit/WebKit] f8ea32: Use an enum class for SVGPathSegType

Chris Dumez noreply at github.com
Thu Aug 31 07:14:46 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: f8ea32b01fdae3f7c9373634db5ea6c6764b7575
      https://github.com/WebKit/WebKit/commit/f8ea32b01fdae3f7c9373634db5ea6c6764b7575
  Author: Chris Dumez <cdumez at apple.com>
  Date:   2023-08-31 (Thu, 31 Aug 2023)

  Changed paths:
    M Source/WebCore/bindings/js/JSSVGPathSegCustom.cpp
    M Source/WebCore/svg/SVGPathBlender.cpp
    M Source/WebCore/svg/SVGPathByteStream.h
    M Source/WebCore/svg/SVGPathByteStreamBuilder.cpp
    M Source/WebCore/svg/SVGPathByteStreamBuilder.h
    M Source/WebCore/svg/SVGPathByteStreamSource.cpp
    M Source/WebCore/svg/SVGPathByteStreamSource.h
    M Source/WebCore/svg/SVGPathParser.cpp
    M Source/WebCore/svg/SVGPathParser.h
    M Source/WebCore/svg/SVGPathSeg.h
    M Source/WebCore/svg/SVGPathSeg.idl
    M Source/WebCore/svg/SVGPathSegImpl.h
    M Source/WebCore/svg/SVGPathSegListSource.cpp
    M Source/WebCore/svg/SVGPathStringViewSource.cpp

  Log Message:
  -----------
  Use an enum class for SVGPathSegType
https://bugs.webkit.org/show_bug.cgi?id=260930

Reviewed by Ryosuke Niwa.

Use an enum class for SVGPathSegType instead of an old enum.
Use uint8_t as underlying type and update SVGPathByteStreamBuilder
& SVGPathByteStreamSource to encode/decode it as a uint8_t instead
of an `unsigned short`.

* Source/WebCore/svg/SVGPathBlender.cpp:
(WebCore::coordinateModeOfCommand):
(WebCore::isSegmentEqual):
(WebCore::SVGPathBlender::canBlendPaths):
(WebCore::SVGPathBlender::blendAnimatedPath):
* Source/WebCore/svg/SVGPathByteStreamBuilder.cpp:
(WebCore::SVGPathByteStreamBuilder::moveTo):
(WebCore::SVGPathByteStreamBuilder::lineTo):
(WebCore::SVGPathByteStreamBuilder::lineToHorizontal):
(WebCore::SVGPathByteStreamBuilder::lineToVertical):
(WebCore::SVGPathByteStreamBuilder::curveToCubic):
(WebCore::SVGPathByteStreamBuilder::curveToCubicSmooth):
(WebCore::SVGPathByteStreamBuilder::curveToQuadratic):
(WebCore::SVGPathByteStreamBuilder::curveToQuadraticSmooth):
(WebCore::SVGPathByteStreamBuilder::arcTo):
(WebCore::SVGPathByteStreamBuilder::closePath):
* Source/WebCore/svg/SVGPathByteStreamBuilder.h:
* Source/WebCore/svg/SVGPathParser.cpp:
(WebCore::SVGPathParser::parseCurveToCubicSmoothSegment):
(WebCore::SVGPathParser::parseCurveToQuadraticSmoothSegment):
(WebCore::SVGPathParser::parsePathData):
* Source/WebCore/svg/SVGPathParser.h:
* Source/WebCore/svg/SVGPathSeg.h:
* Source/WebCore/svg/SVGPathSegListSource.cpp:
(WebCore::SVGPathSegListSource::parseMoveToSegment):
(WebCore::SVGPathSegListSource::parseLineToSegment):
(WebCore::SVGPathSegListSource::parseLineToHorizontalSegment):
(WebCore::SVGPathSegListSource::parseLineToVerticalSegment):
(WebCore::SVGPathSegListSource::parseCurveToCubicSegment):
(WebCore::SVGPathSegListSource::parseCurveToCubicSmoothSegment):
(WebCore::SVGPathSegListSource::parseCurveToQuadraticSegment):
(WebCore::SVGPathSegListSource::parseCurveToQuadraticSmoothSegment):
(WebCore::SVGPathSegListSource::parseArcToSegment):
* Source/WebCore/svg/SVGPathStringViewSource.cpp:
(WebCore::nextCommandHelper):
(WebCore::SVGPathStringViewSource::parseSVGSegmentType):

Canonical link: https://commits.webkit.org/267497@main




More information about the webkit-changes mailing list