Changeset 56619 in webkit


Ignore:
Timestamp:
Mar 26, 2010 5:58:06 AM (14 years ago)
Author:
eric@webkit.org
Message:

2010-03-26 Qi Zhang <qi.2.zhang@nokia.com>

Reviewed by Laszlo Gombos.

[Qt] fast/canvas/drawImage-with-negative-source-destination.html failed
https://bugs.webkit.org/show_bug.cgi?id=35005

Enable fast/canvas/drawImage-with-negative-source-destination.html

  • platform/qt/Skipped:

2010-03-26 Qi Zhang <qi.2.zhang@nokia.com>

Reviewed by Laszlo Gombos.

[Qt] fast/canvas/drawImage-with-negative-source-destination.html failed
https://bugs.webkit.org/show_bug.cgi?id=35005

To support negative width or height at context.drawImage

  • platform/graphics/qt/StillImageQt.cpp: (WebCore::StillImage::draw):
Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r56617 r56619  
     12010-03-26  Qi Zhang  <qi.2.zhang@nokia.com>
     2
     3        Reviewed by Laszlo Gombos.
     4
     5        [Qt] fast/canvas/drawImage-with-negative-source-destination.html failed
     6        https://bugs.webkit.org/show_bug.cgi?id=35005
     7
     8        Enable fast/canvas/drawImage-with-negative-source-destination.html
     9
     10        * platform/qt/Skipped:
     11
    1122010-03-26  Mads Ager  <ager@chromium.org>
    213
  • trunk/LayoutTests/platform/qt/Skipped

    r56606 r56619  
    51625162fast/events/onbeforeunload-focused-iframe.html
    51635163
    5164 # [Qt] REGRESSION(r54811) fast/canvas/drawImage-with-negative-source-destination.html fails
    5165 # https://bugs.webkit.org/show_bug.cgi?id=35005
    5166 fast/canvas/drawImage-with-negative-source-destination.html
    5167 
    51685164# Qt may want to follow GTK+ in adding a default Accept header for
    51695165# subresources. See https://bugs.webkit.org/show_bug.cgi?id=33242.
  • trunk/WebCore/ChangeLog

    r56615 r56619  
     12010-03-26  Qi Zhang  <qi.2.zhang@nokia.com>
     2
     3        Reviewed by Laszlo Gombos.
     4
     5        [Qt] fast/canvas/drawImage-with-negative-source-destination.html failed
     6        https://bugs.webkit.org/show_bug.cgi?id=35005
     7
     8        To support negative width or height at context.drawImage
     9
     10        * platform/graphics/qt/StillImageQt.cpp:
     11        (WebCore::StillImage::draw):
     12
    1132010-03-08  Philippe Normand  <pnormand@igalia.com>
    214
  • trunk/WebCore/platform/graphics/qt/StillImageQt.cpp

    r51217 r56619  
    5858    ctxt->save();
    5959    ctxt->setCompositeOperation(op);
     60
     61    // To support width or height is negative
     62    float sx = src.x();
     63    float sy = src.y();
     64    float sw = src.width();
     65    float sh = src.height();
     66
     67    if (sw < 0) {
     68        sx = sx + sw;
     69        sw = -sw;
     70    }
     71
     72    if (sh < 0) {
     73        sy = sy + sh;
     74        sh = -sh;
     75    }
     76
     77    float dx = dst.x();
     78    float dy = dst.y();
     79    float dw = dst.width();
     80    float dh = dst.height();
     81
     82    if (dw < 0) {
     83        dx = dx + dw;
     84        dw = -dw;
     85    }
     86
     87    if (dh < 0) {
     88        dy = dy + dh;
     89        dh = -dh;
     90    }
     91
     92    FloatRect srcM(sx, sy, sw, sh);
     93    FloatRect dstM(dx, dy, dw, dh);
    6094    QPainter* painter(ctxt->platformContext());
    61     painter->drawPixmap(dst, m_pixmap, src);
     95
     96    painter->drawPixmap(dstM, m_pixmap, srcM);
    6297    ctxt->restore();
    6398}
Note: See TracChangeset for help on using the changeset viewer.