[Bug 15042] New: Canvas test toDataURL.png.primarycolours.html fails with high resolution backing store.

https://www.w3.org/Bugs/Public/show_bug.cgi?id=15042

           Summary: Canvas test toDataURL.png.primarycolours.html fails
                    with high resolution backing store.
           Product: HTML WG
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: testsuite
        AssignedTo: dave.null@w3.org
        ReportedBy: jknotten@chromium.org
         QAContact: public-html-bugzilla@w3.org
                CC: mike@w3.org, public-html-wg-issue-tracking@w3.org


Related to this is https://www.w3.org/Bugs/Public/show_bug.cgi?id=15041 which
is a request to clarify the dimensions of the image returned by toDataURL. 

In WebKit, the toDataURL routine returns an image corresponding in dimensions
to that of the backing store (device pixels), which can be larger than that of
the canvas coordinate space. In this case, the test
toDataURL.png.primarycolours.htm fails because the canvas draws the image
obtained from toDataURL back onto the canvas without specifying a destination
width and height, which defaults to the source image width and height, which is
(as explained above) not necessarily the same as the canvas width and height. 

In order to make this test work regardless of the resolution of the backing
store, the destination width and height should be provided. 

We should change:

ctx.drawImage(img, 0, 0);

to

ctx.drawImage(img, 0, 0, 100, 50);

Link:
http://philip.html5.org/tests/canvas/suite/tests/toDataURL.png.primarycolours.html

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

Received on Friday, 2 December 2011 11:45:15 UTC