Changeset 61970 in webkit


Ignore:
Timestamp:
Jun 27, 2010 10:10:10 AM (14 years ago)
Author:
commit-queue@webkit.org
Message:

2010-06-27 Andreas Kling <andreas.kling@nokia.com>

Reviewed by Darin Adler.

Canvas: Ignore calls to drawImage() with non-finite parameters
https://bugs.webkit.org/show_bug.cgi?id=38929

Rebaseline (and unskip for Qt) the now working test.

Spec link:
http://www.whatwg.org/specs/web-apps/current-work/#2dcontext

  • canvas/philip/tests/2d.drawImage.nonfinite-expected.txt:
  • platform/qt/Skipped:

2010-06-27 Andreas Kling <andreas.kling@nokia.com>

Reviewed by Darin Adler.

Canvas: Ignore calls to drawImage() with non-finite parameters
https://bugs.webkit.org/show_bug.cgi?id=38929

This also fixes a Qt assert when using the raster graphics system.

Spec link:
http://www.whatwg.org/specs/web-apps/current-work/#2dcontext

  • html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::drawImage):
Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r61968 r61970  
     12010-06-27  Andreas Kling  <andreas.kling@nokia.com>
     2
     3        Reviewed by Darin Adler.
     4
     5        Canvas: Ignore calls to drawImage() with non-finite parameters
     6        https://bugs.webkit.org/show_bug.cgi?id=38929
     7
     8        Rebaseline (and unskip for Qt) the now working test.
     9
     10        Spec link:
     11        http://www.whatwg.org/specs/web-apps/current-work/#2dcontext
     12
     13        * canvas/philip/tests/2d.drawImage.nonfinite-expected.txt:
     14        * platform/qt/Skipped:
     15
    1162010-06-27  Andreas Kling  <andreas.kling@nokia.com>
    217
  • trunk/LayoutTests/canvas/philip/tests/2d.drawImage.nonfinite-expected.txt

    r60162 r61970  
    66Expected output:
    77
    8 Aborted with exception: INDEX_SIZE_ERR: DOM Exception 1
     8Passed
    99
  • trunk/LayoutTests/platform/qt/Skipped

    r61968 r61970  
    53495349canvas/philip/tests/security.pattern.image.strokeStyle.html
    53505350canvas/philip/tests/security.reset.html
    5351 canvas/philip/tests/2d.drawImage.nonfinite.html
    53525351canvas/philip/tests/2d.drawImage.broken.html
    53535352
  • trunk/WebCore/ChangeLog

    r61968 r61970  
     12010-06-27  Andreas Kling  <andreas.kling@nokia.com>
     2
     3        Reviewed by Darin Adler.
     4
     5        Canvas: Ignore calls to drawImage() with non-finite parameters
     6        https://bugs.webkit.org/show_bug.cgi?id=38929
     7
     8        This also fixes a Qt assert when using the raster graphics system.
     9
     10        Spec link:
     11        http://www.whatwg.org/specs/web-apps/current-work/#2dcontext
     12
     13        * html/canvas/CanvasRenderingContext2D.cpp:
     14        (WebCore::CanvasRenderingContext2D::drawImage):
     15
    1162010-06-27  Andreas Kling  <andreas.kling@nokia.com>
    217
  • trunk/WebCore/html/canvas/CanvasRenderingContext2D.cpp

    r61877 r61970  
    10181018    ec = 0;
    10191019
     1020    if (!isfinite(dstRect.x()) || !isfinite(dstRect.y()) || !isfinite(dstRect.width()) || !isfinite(dstRect.height())
     1021        || !isfinite(srcRect.x()) || !isfinite(srcRect.y()) || !isfinite(srcRect.width()) || !isfinite(srcRect.height()))
     1022        return;
     1023
    10201024    FloatRect imageRect = FloatRect(FloatPoint(), size(image));
    10211025    if (!imageRect.contains(normalizeRect(srcRect)) || srcRect.width() == 0 || srcRect.height() == 0) {
Note: See TracChangeset for help on using the changeset viewer.