[Webkit-unassigned] [Bug 62141] New: Incorrect interpolation of color values in transitions
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Jun 6 13:11:53 PDT 2011
https://bugs.webkit.org/show_bug.cgi?id=62141
Summary: Incorrect interpolation of color values in transitions
Product: WebKit
Version: 528+ (Nightly build)
Platform: Unspecified
OS/Version: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: CSS
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: bzbarsky at mit.edu
Created an attachment (id=96114)
--> (https://bugs.webkit.org/attachment.cgi?id=96114&action=review)
Testcase
BUILD: Current WebKit nightly (or current Chrome dev)
STEPS TO REPRODUCE:
1) Load attached testcase.
2) Examine the sum of the "r" and "b" values in the printed rgb() triplets.
EXPECTED RESULTS: Sum is always 255.
ACTUAL RESULTS: Sum is 254 for most of them.
ADDITIONAL NOTES: This is a regression from Safari 5.
To see why the expected results are expected, note that at time t/5s in the range [0, 1] in the transition the computed color should be:
rgb(255*(1-t), 0, 255*t);
Now the color components will be rounded, but, for example, if 255*(1-t) is rounding to 254 then 255*t > 0.5. And therefore 255*t should be rounding to 1, not to 0.
It looks like WebKit is just truncating the floating-point color values to get the interpolated color value instead of correctly rounding.
--
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