[Bug 18556] New: 2d.imageData.object.round.html has wrong expectations


           Summary: 2d.imageData.object.round.html has wrong expectations
           Product: HTML WG
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: HTML Canvas 2D Context
        AssignedTo: dave.null@w3.org
        ReportedBy: dominik.rottsches@intel.com
         QAContact: public-html-bugzilla@w3.org
                CC: mike@w3.org, public-html-wg-issue-tracking@w3.org,

2d.imageData.object.round.html expects flooring for decimal values. AFAICS,
this is not up to date any more. I conclude that there's the following chain:

ctx.getImageData() returns an ImageData object whose data property is of type
Uint8ClampedArray. According to:
Uint8ClampedArray uses WebIDL's _Clamping_ semantics, not EnforceRange

Looking at 
http://www.w3.org/TR/WebIDL/#Clamp , we read:
"See the rules for converting ECMAScript values to the various IDL integer
types in section 4.2 for the specific requirements that the use of [Clamp]

which then redirects to (the Clamp case, not the EnforceRange) case:
which mandates rounding, not flooring.

Hence, the expectations in the patch should be changed to nearest values, not
floored values.

Configure bugmail: https://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

Received on Tuesday, 14 August 2012 12:36:52 UTC