Use references and more const in SVGPathUtilities
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 11 Oct 2015 06:16:18 +0000 (06:16 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 11 Oct 2015 06:16:18 +0000 (06:16 +0000)
commitafb2ac69bb1667378482e65c0fab06a24d947db2
treebfce7e66fc6c8099e043835e8702fe1ceea678b9
parent636afa739cdde5d6dc5ddb71086695f7a14e6748
Use references and more const in SVGPathUtilities
https://bugs.webkit.org/show_bug.cgi?id=150007

Reviewed by Zalan Bujtas.

SVGPathUtilities had lots of pointers whose non-nullness was asserted,
little const, and was very trigger-happy with stack allocations. Clean
that all up.

* svg/SVGAnimatedPath.cpp:
(WebCore::SVGAnimatedPathAnimator::constructFromString):
(WebCore::SVGAnimatedPathAnimator::resetAnimValToBaseVal):
(WebCore::SVGAnimatedPathAnimator::addAnimatedTypes):
(WebCore::SVGAnimatedPathAnimator::calculateAnimatedValue):
* svg/SVGPathByteStream.h:
(WebCore::SVGPathByteStream::begin):
(WebCore::SVGPathByteStream::end):
(WebCore::SVGPathByteStream::append):
* svg/SVGPathByteStreamSource.cpp:
(WebCore::SVGPathByteStreamSource::SVGPathByteStreamSource):
* svg/SVGPathByteStreamSource.h:
* svg/SVGPathElement.cpp:
(WebCore::SVGPathElement::getTotalLength):
(WebCore::SVGPathElement::getPointAtLength):
(WebCore::SVGPathElement::getPathSegAtLength):
(WebCore::SVGPathElement::parseAttribute):
(WebCore::SVGPathElement::svgAttributeChanged):
(WebCore::SVGPathElement::pathByteStream):
(WebCore::SVGPathElement::lookupOrCreateDWrapper):
(WebCore::SVGPathElement::pathSegListChanged):
(WebCore::SVGPathElement::SVGPathElement): Deleted.
* svg/SVGPathElement.h:
* svg/SVGPathUtilities.cpp:
(WebCore::globalSVGPathBuilder):
(WebCore::globalSVGPathSegListBuilder):
(WebCore::globalSVGPathByteStreamBuilder):
(WebCore::globalSVGPathStringBuilder):
(WebCore::globalSVGPathTraversalStateBuilder):
(WebCore::globalSVGPathParser):
(WebCore::globalSVGPathBlender):
(WebCore::buildPathFromString):
(WebCore::buildSVGPathByteStreamFromSVGPathSegList):
(WebCore::appendSVGPathByteStreamFromSVGPathSeg):
(WebCore::buildPathFromByteStream):
(WebCore::buildSVGPathSegListFromByteStream):
(WebCore::buildStringFromByteStream):
(WebCore::buildStringFromSVGPathSegList):
(WebCore::buildSVGPathByteStreamFromString):
(WebCore::buildAnimatedSVGPathByteStream):
(WebCore::addToSVGPathByteStream):
(WebCore::getSVGPathSegAtLengthFromSVGPathByteStream):
(WebCore::getTotalLengthOfSVGPathByteStream):
(WebCore::getPointAtLengthOfSVGPathByteStream):
(WebCore::buildStringFromPath):
* svg/SVGPathUtilities.h:
* svg/properties/SVGAnimatedPathSegListPropertyTearOff.h:
(WebCore::SVGAnimatedPathSegListPropertyTearOff::animValDidChange):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@190844 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/svg/SVGAnimatedPath.cpp
Source/WebCore/svg/SVGPathByteStream.h
Source/WebCore/svg/SVGPathByteStreamSource.cpp
Source/WebCore/svg/SVGPathByteStreamSource.h
Source/WebCore/svg/SVGPathElement.cpp
Source/WebCore/svg/SVGPathElement.h
Source/WebCore/svg/SVGPathUtilities.cpp
Source/WebCore/svg/SVGPathUtilities.h
Source/WebCore/svg/properties/SVGAnimatedPathSegListPropertyTearOff.h