2010-08-10 Dirk Schulze <krit@webkit.org>
authorkrit@webkit.org <krit@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 10 Aug 2010 08:47:50 +0000 (08:47 +0000)
committerkrit@webkit.org <krit@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 10 Aug 2010 08:47:50 +0000 (08:47 +0000)
commit4556428d1115219448349aebc42cee71add236c7
tree7e880255ddbacd6d275649e0df74002d88d14328
parent14454069ab7640f1783e789d707ec20e1614035c
2010-08-10  Dirk Schulze  <krit@webkit.org>

        Reviewed by Nikolas Zimmermann.

        Add missing SVGPathSegList source for SVGPathParser
        https://bugs.webkit.org/show_bug.cgi?id=43691

        Added SVGPathSegListSource to parse normalized or unaltered SVGPathSegLists and transform
        them to either a SVG path string, or a SVGPathByteStream. This will be needed to synchronize
        all SVGPathSegLists and the SVG path string of the 'd' attribute.
        Refactored SVGPathSource code, to read concrete path segments instead of type/flag/coordinates
        from the data sources. This is a further abstraction and seperates the reading of content from
        the parsing and interpreting.

        Doesn't affect any tests.

        * Android.mk:
        * CMakeLists.txt:
        * GNUmakefile.am:
        * WebCore.gypi:
        * WebCore.pro:
        * WebCore.vcproj/WebCore.vcproj:
        * WebCore.xcodeproj/project.pbxproj:
        * svg/SVGAllInOne.cpp:
        * svg/SVGPathByteStreamSource.cpp:
        (WebCore::SVGPathByteStreamSource::parseSVGSegmentType):
        (WebCore::SVGPathByteStreamSource::nextCommand):
        (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):
        * svg/SVGPathByteStreamSource.h:
        (WebCore::SVGPathByteStreamSource::moveToNextToken):
        * 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):
        * svg/SVGPathSegListSource.cpp: Added.
        (WebCore::SVGPathSegListSource::SVGPathSegListSource):
        (WebCore::SVGPathSegListSource::~SVGPathSegListSource):
        (WebCore::SVGPathSegListSource::hasMoreData):
        (WebCore::SVGPathSegListSource::parseSVGSegmentType):
        (WebCore::SVGPathSegListSource::nextCommand):
        (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):
        * svg/SVGPathSegListSource.h: Added.
        (WebCore::SVGPathSegListSource::create):
        (WebCore::SVGPathSegListSource::moveToNextToken):
        * svg/SVGPathSource.h:
        * svg/SVGPathStringSource.cpp:
        (WebCore::SVGPathStringSource::parseMoveToSegment):
        (WebCore::SVGPathStringSource::parseLineToSegment):
        (WebCore::SVGPathStringSource::parseLineToHorizontalSegment):
        (WebCore::SVGPathStringSource::parseLineToVerticalSegment):
        (WebCore::SVGPathStringSource::parseCurveToCubicSegment):
        (WebCore::SVGPathStringSource::parseCurveToCubicSmoothSegment):
        (WebCore::SVGPathStringSource::parseCurveToQuadraticSegment):
        (WebCore::SVGPathStringSource::parseCurveToQuadraticSmoothSegment):
        (WebCore::SVGPathStringSource::parseArcToSegment):
        * svg/SVGPathStringSource.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@65059 268f45cc-cd09-0410-ab3c-d52691b4dbfc
17 files changed:
WebCore/Android.mk
WebCore/CMakeLists.txt
WebCore/ChangeLog
WebCore/GNUmakefile.am
WebCore/WebCore.gypi
WebCore/WebCore.pro
WebCore/WebCore.vcproj/WebCore.vcproj
WebCore/WebCore.xcodeproj/project.pbxproj
WebCore/svg/SVGAllInOne.cpp
WebCore/svg/SVGPathByteStreamSource.cpp
WebCore/svg/SVGPathByteStreamSource.h
WebCore/svg/SVGPathParser.cpp
WebCore/svg/SVGPathSegListSource.cpp [new file with mode: 0644]
WebCore/svg/SVGPathSegListSource.h [new file with mode: 0644]
WebCore/svg/SVGPathSource.h
WebCore/svg/SVGPathStringSource.cpp
WebCore/svg/SVGPathStringSource.h