Changeset 16993 in webkit


Ignore:
Timestamp:
Oct 11, 2006, 11:27:49 AM (18 years ago)
Author:
oliver
Message:

2006-10-11 Oliver Hunt <oliver@apple.com>

Reviewed by Adam.

Fix for http://bugs.webkit.org/show_bug.cgi?id=11251
Corrects canvas tag to not throw JS exception when drawing
zero sized rects, arcs, etc

  • html/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::arcTo): (WebCore::CanvasRenderingContext2D::arc): (WebCore::CanvasRenderingContext2D::rect): (WebCore::CanvasRenderingContext2D::clearRect): (WebCore::CanvasRenderingContext2D::fillRect): (WebCore::CanvasRenderingContext2D::strokeRect):

Reviewed by Geoff.

Test case for http://bugs.webkit.org/show_bug.cgi?id=11251

  • fast/canvas/zero-size-fill-rect-expected.checksum: Added.
  • fast/canvas/zero-size-fill-rect-expected.png: Added.
  • fast/canvas/zero-size-fill-rect-expected.txt: Added.
  • fast/canvas/zero-size-fill-rect.html: Added.
Location:
trunk
Files:
4 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r16991 r16993  
     12006-10-11  Oliver Hunt  <oliver@apple.com>
     2
     3        Reviewed by Geoff.
     4
     5        Test case for http://bugs.webkit.org/show_bug.cgi?id=11251
     6
     7        * fast/canvas/zero-size-fill-rect-expected.checksum: Added.
     8        * fast/canvas/zero-size-fill-rect-expected.png: Added.
     9        * fast/canvas/zero-size-fill-rect-expected.txt: Added.
     10        * fast/canvas/zero-size-fill-rect.html: Added.
     11
    1122006-10-11  Rob Buis  <buis@kde.org>
    213
  • trunk/WebCore/ChangeLog

    r16991 r16993  
     12006-10-11  Oliver Hunt  <oliver@apple.com>
     2
     3        Reviewed by Adam.
     4
     5        Fix for http://bugs.webkit.org/show_bug.cgi?id=11251
     6        Corrects canvas tag to not throw JS exception when drawing
     7        zero sized rects, arcs, etc
     8
     9        * html/CanvasRenderingContext2D.cpp:
     10        (WebCore::CanvasRenderingContext2D::arcTo):
     11        (WebCore::CanvasRenderingContext2D::arc):
     12        (WebCore::CanvasRenderingContext2D::rect):
     13        (WebCore::CanvasRenderingContext2D::clearRect):
     14        (WebCore::CanvasRenderingContext2D::fillRect):
     15        (WebCore::CanvasRenderingContext2D::strokeRect):
     16
    1172006-10-11  Rob Buis  <buis@kde.org>
    218
  • trunk/WebCore/html/CanvasRenderingContext2D.cpp

    r16952 r16993  
    388388{
    389389    ec = 0;
    390     if (!(r > 0)) {
     390    if (r < 0) {
    391391        ec = INDEX_SIZE_ERR;
    392392        return;
     
    398398{
    399399    ec = 0;
    400     if (!(r > 0)) {
     400    if (r < 0) {
    401401        ec = INDEX_SIZE_ERR;
    402402        return;
     
    408408{
    409409    ec = 0;
    410     if (!(width > 0 && height > 0)) {
     410    if (width < 0 || height < 0) {
    411411        ec = INDEX_SIZE_ERR;
    412412        return;
     
    483483{
    484484    ec = 0;
    485     if (!(width > 0 && height > 0)) {
     485    if (width < 0 || height < 0) {
    486486        ec = INDEX_SIZE_ERR;
    487487        return;
     
    499499    ec = 0;
    500500
    501     if (!(width > 0 && height > 0)) {
     501    if (width < 0 || height < 0) {
    502502        ec = INDEX_SIZE_ERR;
    503503        return;
     
    536536    ec = 0;
    537537
    538     if (!(width > 0 && height > 0 && lineWidth > 0)) {
     538    if (width < 0 || height < 0 || lineWidth < 0) {
    539539        ec = INDEX_SIZE_ERR;
    540540        return;
Note: See TracChangeset for help on using the changeset viewer.