SVG CSS property types with <number> don't support exponents
authorkrit@webkit.org <krit@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 18 Jul 2012 15:42:40 +0000 (15:42 +0000)
committerkrit@webkit.org <krit@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 18 Jul 2012 15:42:40 +0000 (15:42 +0000)
commitbf8842ad2d2a04c144ea7f1dc58ba68c285a37a2
tree31bcbf06b25336f8f8d40952e49332d23df594e3
parent4f15cd99fee1b9ce7d75b4392437e6d2e9e413d3
SVG CSS property types with <number> don't support exponents
https://bugs.webkit.org/show_bug.cgi?id=52542

Reviewed by Nikolas Zimmermann.

Source/WebCore:

Parse numbers in SVG presentation attributes with SVG parser to support scientific notations.
The SVG parser is already well tested and has some extra checks for edge like protection from
overflow.

The patch is based upon a patch of Bear Travis.

Test: svg/css/scientific-numbers.html

* css/CSSParser.cpp:
(WebCore::CSSParser::lex): Use SVG parser to parse numbers of SVG attributes.
* svg/SVGParserUtilities.cpp:
(WebCore::parseSVGNumber): Added accessor to call from CSSParser with double value.
(WebCore):
* svg/SVGParserUtilities.h:
(WebCore):

LayoutTests:

Test scientific number values on SVG presentation attributes.

* svg/css/scientific-numbers-expected.txt: Added.
* svg/css/scientific-numbers.html: Added.
* svg/css/script-tests/scientific-numbers.js: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@122978 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/svg/css/scientific-numbers-expected.txt [new file with mode: 0644]
LayoutTests/svg/css/scientific-numbers.html [new file with mode: 0644]
LayoutTests/svg/css/script-tests/scientific-numbers.js [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/css/CSSParser.cpp
Source/WebCore/svg/SVGParserUtilities.cpp
Source/WebCore/svg/SVGParserUtilities.h