Commit 569d7bc8 authored by eric@webkit.org's avatar eric@webkit.org

2009-09-15 Charles Wei <charles.wei@torchmobile.com.cn>

        Reviewed by George Staikos.

        Add a new test case for SVG Path parsing with a default command and starts with dot '.'
        https://bugs.webkit.org/show_bug.cgi?id=29123

        * svg/dom/path-parser-expected.txt:
        * svg/dom/resources/path-parser.js:
2009-09-15  Charles Wei  <charles.wei@torchmobile.com.cn>

        Reviewed by George Staikos.

        Fix SVG path parsing error if a command starts with dot '.'
        https://bugs.webkit.org/show_bug.cgi?id=29123

        * svg/SVGParserUtilities.cpp:
        (WebCore::SVGPathParser::parseSVG):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48393 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent d345fed8
2009-09-15 Charles Wei <charles.wei@torchmobile.com.cn>
Reviewed by George Staikos.
Add a new test case for SVG Path parsing with a default command and starts with dot '.'
https://bugs.webkit.org/show_bug.cgi?id=29123
* svg/dom/path-parser-expected.txt:
* svg/dom/resources/path-parser.js:
2009-09-14 Brady Eidson <beidson@apple.com>
Reviewed by Darin Adler.
......
......@@ -57,6 +57,7 @@ PASS parsePath('M1,2x') is ''
PASS parsePath('') is ''
PASS parsePath('x') is ''
PASS parsePath('L1,2') is ''
PASS parsePath('M.1 .2 L.3 .4 .5 .6') is 'M0.1,0.2 L0.3,0.4 L0.5,0.6'
PASS successfullyParsed is true
TEST COMPLETE
......
......@@ -107,5 +107,6 @@ shouldBe("parsePath('M1,2x')", "''");
shouldBe("parsePath('')", "''");
shouldBe("parsePath('x')", "''");
shouldBe("parsePath('L1,2')", "''");
shouldBe("parsePath('M.1 .2 L.3 .4 .5 .6')", "'M0.1,0.2 L0.3,0.4 L0.5,0.6'");
successfullyParsed = true;
2009-09-15 Charles Wei <charles.wei@torchmobile.com.cn>
Reviewed by George Staikos.
Fix SVG path parsing error if a command starts with dot '.'
https://bugs.webkit.org/show_bug.cgi?id=29123
* svg/SVGParserUtilities.cpp:
(WebCore::SVGPathParser::parseSVG):
2009-09-15 Alexander Pavlov <apavlov@chromium.org>
Reviewed by Timothy Hatcher.
......@@ -509,8 +509,8 @@ bool SVGPathParser::parseSVG(const String& s, bool process)
return true;
// Check for remaining coordinates in the current command.
if ((*ptr == '+' || *ptr == '-' || (*ptr >= '0' && *ptr <= '9')) &&
(command != 'z' && command != 'Z')) {
if ((*ptr == '+' || *ptr == '-' || *ptr == '.' || (*ptr >= '0' && *ptr <= '9'))
&& (command != 'z' && command != 'Z')) {
if (command == 'M')
command = 'L';
else if (command == 'm')
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment