[Webkit-unassigned] [Bug 43618] Generalize SVGPathParser to allow more than just strings as input source

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Aug 6 07:36:30 PDT 2010


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





--- Comment #4 from Nikolas Zimmermann <zimmermann at kde.org>  2010-08-06 07:36:31 PST ---
(In reply to comment #3)
> (From update of attachment 63719 [details])
> Looks like you're almost there, a small design problem remains:
> 
> The SVGPathSource passed to parsePathDataFromSource, is stored in an OwnPtr in SVGPathParser. As SVGPathParser is a static object in SVGPathParserFactory, no one will delete the SVGPathSource.
> How about changing the design a little, by storing a SVGPathSource* pointer in SVGPathParser, just like it's done for SVGPathConsumer, plus a new setCurrentSource(SVGPathSource*) method.
> 
> Then you'd only need to modify SVGPathParserFactory, from:
> bool ok = parser->parsePathDataFromSource(SVGPathStringSource::create(d), NormalizedParsing);
> 
> to:
> OwnPtr<SVGPathSource> source = SVGPathStringSource::create(d);
> bool ok = parser->parsePathDataFromSource(source, NormalizedParsing);
> ...

ops, i wanted to write:
OwnPtr<SVGPathSource> source = SVGPathStringSource::create(d);
parser->setCurrentSource(source.get());
bool ok = parser->parsePathData(NormalizedParsing);
...

sorry :-)

-- 
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