[webkit-changes] [WebKit/WebKit] 6326ff: Update buildSVGPathByteStreamFromString() to take ...

Chris Dumez noreply at github.com
Tue Jun 27 20:59:44 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 6326fffd83e206cd952ba5ef2634e0c3ce5118f0
      https://github.com/WebKit/WebKit/commit/6326fffd83e206cd952ba5ef2634e0c3ce5118f0
  Author: Chris Dumez <cdumez at apple.com>
  Date:   2023-06-27 (Tue, 27 Jun 2023)

  Changed paths:
    M Source/WebCore/Sources.txt
    M Source/WebCore/WebCore.xcodeproj/project.pbxproj
    M Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp
    M Source/WebCore/html/canvas/Path2D.h
    M Source/WebCore/svg/SVGPathByteStream.h
    M Source/WebCore/svg/SVGPathByteStreamBuilder.cpp
    M Source/WebCore/svg/SVGPathSegList.h
    R Source/WebCore/svg/SVGPathStringSource.cpp
    R Source/WebCore/svg/SVGPathStringSource.h
    A Source/WebCore/svg/SVGPathStringViewSource.cpp
    A Source/WebCore/svg/SVGPathStringViewSource.h
    M Source/WebCore/svg/SVGPathUtilities.cpp
    M Source/WebCore/svg/SVGPathUtilities.h
    M Source/WebCore/svg/SVGToOTFFontConversion.cpp

  Log Message:
  -----------
  Update buildSVGPathByteStreamFromString() to take a StringView
https://bugs.webkit.org/show_bug.cgi?id=258589

Reviewed by Ryosuke Niwa.

Update buildSVGPathByteStreamFromString() to take a StringView to avoid
constructing Strings in some cases. A StringView is sufficient for parsing.

* Source/WebCore/Sources.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp:
(WebCore::CSSPropertyParserHelpers::consumeBasicShapePath):
* Source/WebCore/html/canvas/Path2D.h:
* Source/WebCore/svg/SVGPathByteStream.h:
(WebCore::SVGPathByteStream::SVGPathByteStream):
* Source/WebCore/svg/SVGPathByteStreamBuilder.cpp:
* Source/WebCore/svg/SVGPathSegList.h:
* Source/WebCore/svg/SVGPathStringViewSource.cpp: Renamed from Source/WebCore/svg/SVGPathStringSource.cpp.
(WebCore::SVGPathStringViewSource::SVGPathStringViewSource):
(WebCore::SVGPathStringViewSource::hasMoreData const):
(WebCore::SVGPathStringViewSource::moveToNextToken):
(WebCore::nextCommandHelper):
(WebCore::SVGPathStringViewSource::nextCommand):
(WebCore::SVGPathStringViewSource::parse):
(WebCore::SVGPathStringViewSource::parseSVGSegmentType):
(WebCore::SVGPathStringViewSource::parseMoveToSegment):
(WebCore::SVGPathStringViewSource::parseLineToSegment):
(WebCore::SVGPathStringViewSource::parseLineToHorizontalSegment):
(WebCore::SVGPathStringViewSource::parseLineToVerticalSegment):
(WebCore::SVGPathStringViewSource::parseCurveToCubicSegment):
(WebCore::SVGPathStringViewSource::parseCurveToCubicSmoothSegment):
(WebCore::SVGPathStringViewSource::parseCurveToQuadraticSegment):
(WebCore::SVGPathStringViewSource::parseCurveToQuadraticSmoothSegment):
(WebCore::SVGPathStringViewSource::parseArcToSegment):
* Source/WebCore/svg/SVGPathStringViewSource.h: Renamed from Source/WebCore/svg/SVGPathStringSource.h.
* Source/WebCore/svg/SVGPathUtilities.cpp:
(WebCore::buildPathFromString):
(WebCore::buildSVGPathByteStreamFromString):
* Source/WebCore/svg/SVGPathUtilities.h:
* Source/WebCore/svg/SVGToOTFFontConversion.cpp:
(WebCore::SVGToOTFFontConverter::transcodeGlyphPaths const):

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




More information about the webkit-changes mailing list