WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 38617
Scientific Notation for z-index prints out different values for Mac and Windows
https://bugs.webkit.org/show_bug.cgi?id=38617
Summary
Scientific Notation for z-index prints out different values for Mac and Windows
Brian Weinstein
Reported
2010-05-05 17:51:28 PDT
fast/dom/clone-node-z-index.html fails on Windows - due to differences in how Mac and WIndows print Scientific Notation.
http://build.webkit.org/results/Windows%20Debug%20(Tests)/r58840%20(13147)/fast/dom/clone-node-z-index-pretty-diff.html
On Mac: zIndex = "2.0002e+07" On Windows: zIndex = "2.0002e+007" There is one extra 0 in the scientific notation.
Attachments
Patch
(2.18 KB, patch)
2010-05-05 19:34 PDT
,
Steven Lai
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Steven Lai
Comment 1
2010-05-05 18:08:51 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)
Steven Lai
Comment 2
2010-05-05 18:22:11 PDT
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
Steven Lai
Comment 3
2010-05-05 18:34:03 PDT
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.
Steven Lai
Comment 4
2010-05-05 19:34:41 PDT
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)
WebKit Commit Bot
Comment 5
2010-05-05 22:34:09 PDT
Comment on
attachment 55195
[details]
Patch Clearing flags on attachment: 55195 Committed
r58861
: <
http://trac.webkit.org/changeset/58861
>
WebKit Commit Bot
Comment 6
2010-05-05 22:34:14 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug