[webkit-changes] [WebKit/WebKit] 754385: Pass the current point to SVGPathSource segment pa...

Simon Fraser noreply at github.com
Thu Oct 17 10:17:32 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 75438506e981119be69203a2c709d2e02a8c5215
      https://github.com/WebKit/WebKit/commit/75438506e981119be69203a2c709d2e02a8c5215
  Author: Simon Fraser <simon.fraser at apple.com>
  Date:   2024-10-17 (Thu, 17 Oct 2024)

  Changed paths:
    M Source/WebCore/rendering/style/BasicShapesShape.cpp
    M Source/WebCore/svg/SVGPathBlender.cpp
    M Source/WebCore/svg/SVGPathByteStreamSource.cpp
    M Source/WebCore/svg/SVGPathByteStreamSource.h
    M Source/WebCore/svg/SVGPathParser.cpp
    M Source/WebCore/svg/SVGPathSegListSource.cpp
    M Source/WebCore/svg/SVGPathSegListSource.h
    M Source/WebCore/svg/SVGPathSource.h
    M Source/WebCore/svg/SVGPathStringViewSource.cpp
    M Source/WebCore/svg/SVGPathStringViewSource.h

  Log Message:
  -----------
  Pass the current point to SVGPathSource segment parsing functions
https://bugs.webkit.org/show_bug.cgi?id=281645
rdar://138088365

Reviewed by Alan Baradlay.

The CSS `shape()` function is getting start/end-relative control points[1] and so its SVGPathSource
implementation will need to know the current path point. So pass the current point to all SVGPathSource
functions that create non-trivial segments.

[1] https://github.com/w3c/csswg-drafts/issues/10649#issuecomment-2412816773

* Source/WebCore/rendering/style/BasicShapesShape.cpp:
* Source/WebCore/svg/SVGPathBlender.cpp:
(WebCore::pullFromSources):
(WebCore::SVGPathBlender::blendMoveToSegment):
(WebCore::SVGPathBlender::blendLineToSegment):
(WebCore::SVGPathBlender::blendLineToHorizontalSegment):
(WebCore::SVGPathBlender::blendLineToVerticalSegment):
(WebCore::SVGPathBlender::blendCurveToCubicSegment):
(WebCore::SVGPathBlender::blendCurveToCubicSmoothSegment):
(WebCore::SVGPathBlender::blendCurveToQuadraticSegment):
(WebCore::SVGPathBlender::blendCurveToQuadraticSmoothSegment):
(WebCore::SVGPathBlender::blendArcToSegment):
* Source/WebCore/svg/SVGPathByteStreamSource.cpp:
(WebCore::SVGPathByteStreamSource::parseMoveToSegment):
(WebCore::SVGPathByteStreamSource::parseLineToSegment):
(WebCore::SVGPathByteStreamSource::parseLineToHorizontalSegment):
(WebCore::SVGPathByteStreamSource::parseLineToVerticalSegment):
(WebCore::SVGPathByteStreamSource::parseCurveToCubicSegment):
(WebCore::SVGPathByteStreamSource::parseCurveToCubicSmoothSegment):
(WebCore::SVGPathByteStreamSource::parseCurveToQuadraticSegment):
(WebCore::SVGPathByteStreamSource::parseCurveToQuadraticSmoothSegment):
(WebCore::SVGPathByteStreamSource::parseArcToSegment):
* Source/WebCore/svg/SVGPathByteStreamSource.h:
* Source/WebCore/svg/SVGPathParser.cpp:
(WebCore::SVGPathParser::parseMoveToSegment):
(WebCore::SVGPathParser::parseLineToSegment):
(WebCore::SVGPathParser::parseLineToHorizontalSegment):
(WebCore::SVGPathParser::parseLineToVerticalSegment):
(WebCore::SVGPathParser::parseCurveToCubicSegment):
(WebCore::SVGPathParser::parseCurveToCubicSmoothSegment):
(WebCore::SVGPathParser::parseCurveToQuadraticSegment):
(WebCore::SVGPathParser::parseCurveToQuadraticSmoothSegment):
(WebCore::SVGPathParser::parseArcToSegment):
* 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/SVGPathSegListSource.h:
* Source/WebCore/svg/SVGPathSource.h:
* Source/WebCore/svg/SVGPathStringViewSource.cpp:
(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:

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



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list