[Webkit-unassigned] [Bug 18994] LANG/LC_ALL influences the result of element.style.opacity

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Oct 13 14:51:44 PDT 2009


https://bugs.webkit.org/show_bug.cgi?id=18994





--- Comment #79 from Evan Martin <evan at chromium.org>  2009-10-13 14:51:42 PDT ---
> > From the printf docs %.6g means you show up to 6 significant digits, but then
> > somehow it doesn't happen when your number very is close to zero and they also
> > arbitrarily chop off trailing digits if they are 0 even when they are
> > significant.  This patch passes all the layout tests, but I had to change the
> > precision on one, but I find it hard to care too much about it.
> 
> As I understand it, 0.00000123456 is an example with 6 significant digits.
> Maybe you misunderstood what it meant. But exactly matching "%.6lg" isn't the
> point. Matching what we used to do is a good idea, but matching other browsers
> or matching specifications are even more important.

That is my understanding of significant digits as well.  But from one of my
earlier iterations of the patch, I was printing 0.00000000000123456 at the end
of some error-accumultating computation; the printf implementation prints 0 for
that.  See comment #60.  This is what prompted my new approach, which chops to
6 digits effectively by rounding to the nearest 10e-6.

>     - check on how other browsers handle formatting fractional values in CSS;
> how many digits of precision, etc.
>     - figure out if we want to stick with the 6-digits-of-precision thing
> forever, or if we should have a different formatting rule

Filed https://bugs.webkit.org/show_bug.cgi?id=30341

>     - eliminate the use of snprintf -- as I said, JavaScriptCore has a function
> with the relevant code already, JSC::UString::from, so you could just port that
> to live in String.cpp

Filed https://bugs.webkit.org/show_bug.cgi?id=30342

>     - change the test to use script-tests for better clarity
>     - add quite a few more kinds of numbers to the test cases
>     - test all the different types of units -- a test should fail if we made
> any mistakes in the switch statements

https://bugs.webkit.org/show_bug.cgi?id=30340


I can't promise I'll fix all of those, but I will try to at least improve the
test soon since I'm the one who wrote it.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list