Changeset 59561 in webkit


Ignore:
Timestamp:
May 15, 2010 7:22:51 PM (14 years ago)
Author:
eric@webkit.org
Message:

2010-05-15 Chang Shu <chang.shu@nokia.com>

Reviewed by Kenneth Rohde Christiansen.

Based on the spec and Philip Taylor's test suite, createImageData() should throw
an INDEX_SIZE_ERR exception if either the sw or sh arguments are zero.
The link to the spec:
http://philip.html5.org/tests/canvas/suite/tests/spec.html#testrefs.2d.imageData.getcreate.zero

https://bugs.webkit.org/show_bug.cgi?id=39166

The complete test suite is in the process of checking in.
https://bugs.webkit.org/show_bug.cgi?id=20553

  • html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::createImageData):
Location:
trunk/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r59559 r59561  
     12010-05-15  Chang Shu  <chang.shu@nokia.com>
     2
     3        Reviewed by Kenneth Rohde Christiansen.
     4
     5        Based on the spec and Philip Taylor's test suite, createImageData() should throw
     6        an INDEX_SIZE_ERR exception if either the sw or sh arguments are zero.
     7        The link to the spec:
     8        http://philip.html5.org/tests/canvas/suite/tests/spec.html#testrefs.2d.imageData.getcreate.zero
     9
     10        https://bugs.webkit.org/show_bug.cgi?id=39166
     11
     12        The complete test suite is in the process of checking in.
     13        https://bugs.webkit.org/show_bug.cgi?id=20553
     14
     15        * html/canvas/CanvasRenderingContext2D.cpp:
     16        (WebCore::CanvasRenderingContext2D::createImageData):
     17
    1182010-05-15  Adam Barth  <abarth@webkit.org>
    219
  • trunk/WebCore/html/canvas/CanvasRenderingContext2D.cpp

    r59473 r59561  
    13501350        return 0;
    13511351    }
     1352    if (!sw || !sh) {
     1353        ec = INDEX_SIZE_ERR;
     1354        return 0;
     1355    }
     1356
    13521357    FloatSize unscaledSize(sw, sh);
    13531358    IntSize scaledSize = canvas()->convertLogicalToDevice(unscaledSize);
Note: See TracChangeset for help on using the changeset viewer.