Use a singleton CSSParserContext in SVGLength::SetValueAsString

Creating this object for each call represents a significant part of the
entire function. Using a singleton instead reduces the runtime of the
testcase "usingSetAttribute" from the referenced bug's comment #5 by
around 20% locally.

Bug: 978513
Change-Id: I5d3447baf04706e2c23da4ed07cb0197d0349ac7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1681766
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#673325}
1 file changed