Summary: | Small rounding error in SVG color transformation | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Said Abou-Hallawa <sabouhallawa> | ||||||
Component: | SVG | Assignee: | Nobody <webkit-unassigned> | ||||||
Status: | NEW --- | ||||||||
Severity: | Normal | CC: | webkit-bug-importer, zimmermann | ||||||
Priority: | P2 | Keywords: | InRadar | ||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Attachments: |
|
Created attachment 242849 [details]
Expected file
|
Created attachment 242848 [details] Test case Open the attached test case and compare it with the expected file. Result: With naked eyes, the two will look very similar. But if a comparison tool is used, the result will be they are different. Expected: The test case and the expected file should exactly the same. The test case has the following filter effect: <feColorMatrix type="matrix" values="0 1 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0.5 0" ...> This filter effect is applied to the following target element: <rect x="0" y="0" width="100" height="100" fill="#123456" filter="url(#f1)"/> The resulting color should be equal to: r=0x34, g=0x56, b=0x12 and alpha=0.5 The expected file has only the following element: <rect x="10" y="10" width="80" height="80" fill="#345612" fill-opacity="0.5"/> With closer look at the test case, one can see a difference of 1/256 in every color component when it is compared with the expected file. NOTE: We may end up not fixing this bug. But we need to investigate to understand where the rounding happens. And based on this investigation we will decided if it is worthy fixing or not. NOTE: The attached test case is imported from Mozilla SVG test suite.