• mihaip@chromium.org's avatar
    2010-12-08 Mihai Parparita <mihaip@chromium.org> · 4a1481a0
    mihaip@chromium.org authored
            Reviewed by Darin Adler.
    
            fast/canvas/canvas-getImageData-negative-source.html fails on Mac
            https://bugs.webkit.org/show_bug.cgi?id=47901
    
            Add test for rounding behavior. Remove now-passing tests from
            test_expectations.txt.
    
            * fast/canvas/canvas-getImageData-rounding-expected.txt: Added.
            * fast/canvas/canvas-getImageData-rounding.html: Added.
            * platform/chromium/test_expectations.txt:
    2010-12-08  Mihai Parparita  <mihaip@chromium.org>
    
            Reviewed by Darin Adler.
    
            fast/canvas/canvas-getImageData-negative-source.html fails on Mac
            https://bugs.webkit.org/show_bug.cgi?id=47901
    
            Test: fast/canvas/canvas-getImageData-rounding.html
    
            static_cast<unsigned> is generally not what we want in
            convertLogicalToDevice. It produces inconsistent results when compiling
            for 32-bit vs. 64-bit, and in any case we weren't getting correct
            rounding behavior for source rectangles (e.g. we should get a source rect
            of width 2 if the source X is 0.9 and the source width is 0.2, but we
            were getting only one of width 1).
    
            * html/HTMLCanvasElement.cpp:
            (WebCore::HTMLCanvasElement::convertLogicalToDevice):
            (WebCore::HTMLCanvasElement::convertToValidDeviceSize):
            * html/HTMLCanvasElement.h:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@73744 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    4a1481a0
HTMLCanvasElement.cpp 13.7 KB