[webkit-reviews] review requested: [Bug 18994] LANG/LC_ALL influences the result of element.style.opacity : [Attachment 70394] Work in progress

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Oct 10 04:59:01 PDT 2010


Nikolas Zimmermann <zimmermann at kde.org> has asked  for review:
Bug 18994: LANG/LC_ALL influences the result of element.style.opacity
https://bugs.webkit.org/show_bug.cgi?id=18994

Attachment 70394: Work in progress
https://bugs.webkit.org/attachment.cgi?id=70394&action=review

------- Additional Comments from Nikolas Zimmermann <zimmermann at kde.org>
Attaching a first work in progress patch, and my plan how I want to fix this
problem (and related SVG problems):
List of the problems:
- String::format() may be localy dependant.
- String::number(double) uses String::format("%.6lg") and thus is affected as
well

Related problems, that affect SVG, is rounding. The String::format() usage
truncated, instead of rounding properly to say N significant figures.
- TextStream::operator<<(float/double) is affected.
- SVGPahtStringBuilder (most prominent area of problems)
- SVGPointList/SVGTransformList/SVGAnimatedPropertyTraits (all using
String::format)

The way I plan to fix this is outlined in the attached "Work in progress"
patch.
Step #1) Patch String::number(double) to utilize wtf/DecimalNumber (which uses
dtoa) to convert the double into a string. Apply some extra operations to make
it mimic the String::format("%.6lg") output (cut off trailing zeros 1.5000 ->
1.5, leave integers unchanged 12.000 -> 12)

Step #2) Convert all users of String::format() to use String::number() +
StringBuilder/Vector<Uchar> based string creation.

Step #3) Kill String::format(), and it's platform specific implementations
(like Qt did).

What do you think?


More information about the webkit-reviews mailing list