Summary: | Scientific Notation for z-index prints out different values for Mac and Windows | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Brian Weinstein <bweinstein> | ||||
Component: | CSS | Assignee: | Steven Lai <s3lance> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | commit-queue | ||||
Priority: | P2 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | PC | ||||||
OS: | OS X 10.5 | ||||||
Attachments: |
|
Description
Brian Weinstein
2010-05-05 17:51:28 PDT
There are several places in existing code that uses "%.6lg" to format numbers in css string. For example, WebCore/css/CSSPrimitiveValue.cpp: CSSPrimitiveValue::cssText() JavascriptCore/wtf/text/WTFString.cpp: WTFString::format(double) There was a general fix to this problem, the patch does manual number formatting. 1. It avoids cross-platform discrepancies 2. Avoid large integers being formatted as scientific notation. http://trac.webkit.org/changeset/49585 But it got rolled out because it broke a website Please see: http://trac.webkit.org/changeset/52071 https://bugs.webkit.org/show_bug.cgi?id=32078 Also see: https://bugs.webkit.org/show_bug.cgi?id=18994 It shows the number formatting could be different on the same platform with different locale. Now, I'm not certain if that could possibly affect scientific notation as well, but from this point of view, we shouldn't be printing the formatted value in the particular test case because the purpose of the test case is to simply validate that the z-index won't be lost. Created attachment 55195 [details]
Patch
Alternative patch to the offending layout test
(so that we don't risk breaking layout tests on every other platform)
Comment on attachment 55195 [details] Patch Clearing flags on attachment: 55195 Committed r58861: <http://trac.webkit.org/changeset/58861> All reviewed patches have been landed. Closing bug. |