Changeset 24480 in webkit


Ignore:
Timestamp:
Jul 20, 2007 9:35:57 AM (17 years ago)
Author:
rwlbuis
Message:

Reviewed by Darin.

http://bugs.webkit.org/show_bug.cgi?id=14642
REGRESSION(r24064-24096): Reflection type effect in canvas tag broke

Do not stop the fill/stroke operation when encountering an empty path.

Location:
trunk
Files:
4 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r24457 r24480  
     12007-07-20  Rob Buis  <buis@kde.org>
     2
     3        Reviewed by Darin.
     4
     5        Testcase for:
     6        http://bugs.webkit.org/show_bug.cgi?id=14642
     7        REGRESSION(r24064-24096): Reflection type effect in canvas tag broke
     8
     9        * fast/canvas/gradient-empty-path-expected.checksum: Added.
     10        * fast/canvas/gradient-empty-path-expected.png: Added.
     11        * fast/canvas/gradient-empty-path-expected.txt: Added.
     12        * fast/canvas/gradient-empty-path.html: Added.
     13
    1142007-07-19  Geoffrey Garen  <ggaren@apple.com>
    215
  • trunk/WebCore/ChangeLog

    r24477 r24480  
     12007-07-20  Rob Buis  <buis@kde.org>
     2
     3        Reviewed by Darin.
     4
     5        http://bugs.webkit.org/show_bug.cgi?id=14642
     6        REGRESSION(r24064-24096): Reflection type effect in canvas tag broke
     7
     8        Do not stop the fill/stroke operation when encountering an empty path.
     9
     10        * html/CanvasRenderingContext2D.cpp:
     11        (WebCore::CanvasRenderingContext2D::fill):
     12        (WebCore::CanvasRenderingContext2D::stroke):
     13
    1142007-07-20  Lars Knoll  <lars@trolltech.com>
    215
  • trunk/WebCore/html/CanvasRenderingContext2D.cpp

    r24415 r24480  
    444444    if (!c)
    445445        return;
    446     if (state().m_path.isEmpty())
    447         return;
    448446    // FIXME: Do this through platform-independent GraphicsContext API.
    449447#if PLATFORM(CG)
     
    451449    CGContextAddPath(c->platformContext(), state().m_path.platformPath());
    452450
    453     willDraw(CGContextGetPathBoundingBox(c->platformContext()));
     451    if (!state().m_path.isEmpty())
     452        willDraw(CGContextGetPathBoundingBox(c->platformContext()));
    454453
    455454    if (state().m_fillStyle->gradient()) {
     
    485484    if (!c)
    486485        return;
    487     if (state().m_path.isEmpty())
    488         return;
    489486    // FIXME: Do this through platform-independent GraphicsContext API.
    490487#if PLATFORM(CG)
     
    492489    CGContextAddPath(c->platformContext(), state().m_path.platformPath());
    493490
    494     float lineWidth = state().m_lineWidth;
    495     float inset = -lineWidth / 2;
    496     CGRect boundingRect = CGRectInset(CGContextGetPathBoundingBox(c->platformContext()), inset, inset);
    497 
    498     willDraw(boundingRect);
     491    if (!state().m_path.isEmpty()) {
     492        float lineWidth = state().m_lineWidth;
     493        float inset = -lineWidth / 2;
     494        CGRect boundingRect = CGRectInset(CGContextGetPathBoundingBox(c->platformContext()), inset, inset);
     495        willDraw(boundingRect);
     496    }
    499497
    500498    if (state().m_strokeStyle->gradient()) {
Note: See TracChangeset for help on using the changeset viewer.