Changeset 31162 in webkit


Ignore:
Timestamp:
Mar 19, 2008 3:28:07 PM (16 years ago)
Author:
oliver@apple.com
Message:

Bug 17954: Canvas arc() with radius of 0 throws exception
http://bugs.webkit.org/show_bug.cgi?id=17954

Reviewed by Antti

Simple fix -- use >= instead of > when validating the radius.

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r31161 r31162  
     12008-03-19  Oliver Hunt  <oliver@apple.com>
     2
     3        Reviewed by Antti.
     4
     5        Test case for Canvas.arc with zero-length radius needed to
     6        be updated for current html5 spec.
     7
     8        * fast/canvas/canvas-with-incorrect-args-expected.txt:
     9        * fast/canvas/canvas-with-incorrect-args.html:
     10
    1112008-03-19  Justin Garcia  <justin.garcia@apple.com>
    212
  • trunk/LayoutTests/fast/canvas/canvas-with-incorrect-args-expected.txt

    r30635 r31162  
    1515UNDEFINED threw exception code 1 on nan*nan rect.
    1616PASS called fill with an empty path without throwing an exception.
    17 PASS threw exception code 1 on arc with zero-length radius
     17PASS did not throw exception on arc with zero-length radius
    1818PASS threw exception code 1 on arc with negative-length radius
    1919UNDEFINED did not throw exception on arc with infinite radius
  • trunk/LayoutTests/fast/canvas/canvas-with-incorrect-args.html

    r21294 r31162  
    9595    try {
    9696        context.arc(2, 2, 0, 0, 90, true);
    97         fail("did not throw exception on arc with zero-length radius");
    98     } catch (e) {
    99         pass("threw exception code " + e.code + " on arc with zero-length radius");   
     97        pass("did not throw exception on arc with zero-length radius");
     98    } catch (e) {
     99        fail("threw exception code " + e.code + " on arc with zero-length radius");   
    100100    }
    101101    try {
  • trunk/WebCore/ChangeLog

    r31161 r31162  
     12008-03-19  Oliver Hunt  <oliver@apple.com>
     2
     3        Reviewed by Antti.
     4
     5        Bug 17954: Canvas arc() with radius of 0 throws exception
     6        http://bugs.webkit.org/show_bug.cgi?id=17954
     7
     8        Simple fix -- use >= instead of > when validating the radius.
     9
     10        * html/CanvasRenderingContext2D.cpp:
     11        (WebCore::CanvasRenderingContext2D::arc):
     12
    1132008-03-19  Justin Garcia  <justin.garcia@apple.com>
    214
  • trunk/WebCore/html/CanvasRenderingContext2D.cpp

    r31155 r31162  
    469469{
    470470    ec = 0;
    471     if (!(r > 0)) {
     471    if (!(r >= 0)) {
    472472        ec = INDEX_SIZE_ERR;
    473473        return;
Note: See TracChangeset for help on using the changeset viewer.