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

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Oct 7 16:54:05 PDT 2009


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


Darin Adler <darin at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #40828|review?                     |review-
               Flag|                            |




--- Comment #52 from Darin Adler <darin at apple.com>  2009-10-07 16:54:00 PDT ---
(From update of attachment 40828)
> +void appendDouble(Vector<UChar>& vector, double value, int digits)
> +{
> +    // From the CSS specification section titled "Integers and real numbers",
> +    // real numbers are only formatted as [sign] [digits] "." [digits], with
> +    // no special handling of exponents, NaN, etc.

This is a confusing thing to say here. This says what the specification says,
but not what the function does. What does this function do for NaN and
exponents and such? Should it simply never be called on such numbers? Don't
leave us hanging!

I think the name of this function should contain the words CSS if the behavior
is something driven by the CSS specification. The name appendDouble makes it
sound more general-purpose. Or maybe there is a term of art for this type of
numeric formatting?

Sounds fine for CSS, but doesn't this change the behavior of the TextStream
operators? Why is that OK? Do we have test coverage for those? Including edge
cases like exponents, infinity, and NAN?

> +    vector.reserveCapacity(vector.size() + length + 2);

Where does the 2 come from here? From reading the code below it looks like you
can have a lot more characters than "length" added. Can we do the
reserveCapacity completely accurately instead of approximately?

Do we have test cases that cover all the branches of the appendDouble function?

I'll say review- because of some of the comments above, but this looks really
good and on the right track.

-- 
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