Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
2011-05-20 Dirk Schulze <krit@webkit.org>
Reviewed by Darin Adler. SVGPathSegList needs better getTotalLength, getSegmentAtLength path traversal code https://bugs.webkit.org/show_bug.cgi?id=12047 Right now SVGPathElement::getTotalLength and SVGPathElement::getPointAtLength use toPathData() to transform a SVGPathByteStream to a Path. This Path gets traversed to find the searched value. With this patch both functions use the SVGPathByteStream directly together with the existing traversing code in SVG. This avoids the intermediate transforming to a platform path and gives platform independent results. The traversal code in SVG needed to be extended to support all PathTraversalActions. No new tests added. The existing tests cover the changes. * svg/SVGPathElement.cpp: (WebCore::SVGPathElement::getTotalLength): (WebCore::SVGPathElement::getPointAtLength): * svg/SVGPathParserFactory.cpp: (WebCore::SVGPathParserFactory::getTotalLengthOfSVGPathByteStream): (WebCore::SVGPathParserFactory::getPointAtLengthOfSVGPathByteStream): * svg/SVGPathParserFactory.h: * svg/SVGPathTraversalStateBuilder.cpp: (WebCore::SVGPathTraversalStateBuilder::continueConsuming): (WebCore::SVGPathTraversalStateBuilder::totalLength): (WebCore::SVGPathTraversalStateBuilder::currentPoint): * svg/SVGPathTraversalStateBuilder.h: Canonical link: https://commits.webkit.org/76576@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@86973 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing
with
107 additions
and 14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters