Fast path for simple transform parsing
authorantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 25 Jun 2012 19:33:07 +0000 (19:33 +0000)
committerantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 25 Jun 2012 19:33:07 +0000 (19:33 +0000)
commit4e337dc212bea9d0c610902f07be2c97b1f103df
tree291628473a15f050aa7a3c586f1f5f8b7fc30e43
parent1c326fe9177b31fb90ceec36f9a3087d0b65214d
Fast path for simple transform parsing
https://bugs.webkit.org/show_bug.cgi?id=89898

Reviewed by Anders Carlsson.

When manipulating transforms using script, the transform value parsing can show up in profiles pretty heavily
(up 4% in some cases). We can optimize it easily by implementing a fast path that does not spin up the full CSS
parser, like we already do for several other common value types.

The patch implements a fast path for transform(), transformX/Y/Z() and transform3D(). It speeds up parsing by >5x.

* css/CSSParser.cpp:
(WebCore):
(WebCore::parseTransformArguments):
(WebCore::parseTransformValue):
(WebCore::CSSParser::parseValue):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121175 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/css/CSSParser.cpp