[Webkit-unassigned] [Bug 30238] New: getComputedStyle-transform.html accidentally relies on float formatting details

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Oct 8 16:41:48 PDT 2009


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

           Summary: getComputedStyle-transform.html accidentally relies on
                    float formatting details
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: PC
        OS/Version: Mac OS X 10.5
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: CSS
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: evan at chromium.org
                CC: darin at apple.com, simon.fraser at apple.com
            Blocks: 18994


Relevant code:
        // set one of our test transforms
        testBox.style.webkitTransform = curTest.transform;
        // read back computed style
        var oldTransform = window.getComputedStyle(testBox).webkitTransform;
        // set that matrix() back on the element
        testBox.style.webkitTransform = oldTransform;
        // read back computed style
        var computedTransform =
window.getComputedStyle(testBox).webkitTransform;

Suppose the following.
In step 1, when when we apply the transform one of the elements of the
underlying matrix ends up being 0.23000005.
In step 2, when we read it back as a string, WebKit passes it through a
printf(), which prints it to 6 significant digits as "0.230000".
In step 3, when we write it out again, that that string is parsed into the
float 0.23.
In step 4, when it's read out again, it's now the string "0.23".


I ran into this in fixing float handling.  I'd like to remove the second two
lines of the above code (the test input has a string for the expected output). 
What do you think?

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