[Webkit-unassigned] [Bug 43691] Add missing SVGPathSegList source for SVGPathParser

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Aug 9 23:08:48 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=43691


Nikolas Zimmermann <zimmermann at kde.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #63847|review?                     |review-
               Flag|                            |




--- Comment #2 from Nikolas Zimmermann <zimmermann at kde.org>  2010-08-09 23:08:49 PST ---
(From update of attachment 63847)
Still needs some tweaks:

WebCore/ChangeLog:11
 +          Did some refactoring of SVGPathSource, the input data of SVGPathParser. The parsing process
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.

WebCore/svg/SVGPathByteStreamSource.cpp:79
 +  bool SVGPathByteStreamSource::parseCurveToCubicSegment(FloatPoint& point1 , FloatPoint& point2, FloatPoint& targetPoint)
Superfluous space before comma.

WebCore/svg/SVGPathParser.cpp:76
 +      if (!m_source->parseMoveToSegment(targetPoint))
parseLineToSegment! :-)

WebCore/svg/SVGPathSegListSource.cpp:39
 +      m_itemEnd = pathSegList->numberOfItems();
For consistency: s/pathSegList/m_pathSegList/

WebCore/svg/SVGPathSegListSource.cpp:78
 +      SVGPathSegSingleCoord* moveTo = static_cast<SVGPathSegSingleCoord*>(m_segment);
You should ASSERT that the type is correct before casting, and also in all the other parse*Segment functions.

WebCore/svg/SVGPathSegListSource.cpp:107
 +  bool SVGPathSegListSource::parseCurveToCubicSegment(FloatPoint& point1 , FloatPoint& point2, FloatPoint& targetPoint)
Superfluous space before comma.

WebCore/svg/SVGPathSegListSource.cpp:138
 +      SVGPathSegSingleCoord* quadraticSmooth = static_cast<SVGPathSegSingleCoord*>(m_segment);
You can cast to the concrete SVGPathSegCurveToQudaraticSmoothSegment, no?

WebCore/svg/SVGPathSegListSource.h:60
 +      SVGPathSeg* m_segment;
Hm, as SVGPathSeg is refcounted, you'd better store a RefPtr<SVGPathSeg> here, it's safer.
Instead of using static_cast to cast from SVGPathSeg to the individual types, you can use static_pointer_cast, that gives the same functionality but operates on RefPtrs.

WebCore/svg/SVGPathStringSource.cpp:164
 +  bool SVGPathStringSource::parseCurveToCubicSegment(FloatPoint& point1 , FloatPoint& point2, FloatPoint& targetPoint)
Superfluous space before comma.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list