Changeset 59581 in webkit


Ignore:
Timestamp:
May 16, 2010 2:08:53 PM (14 years ago)
Author:
eric@webkit.org
Message:

2010-05-16 Andreas Kling <andreas.kling@nokia.com>

Reviewed by Kenneth Rohde Christiansen.

Add a test to verify that Canvas's toDataURL() is case insensitive wrt the mimeType argument.
https://bugs.webkit.org/show_bug.cgi?id=39153

Spec link:
http://www.whatwg.org/specs/web-apps/current-work/#dom-canvas-todataurl

  • fast/canvas/canvas-toDataURL-case-insensitive-mimetype-expected.txt: Added.
  • fast/canvas/canvas-toDataURL-case-insensitive-mimetype.html: Added.
  • fast/canvas/script-tests/canvas-toDataURL-case-insensitive-mimetype.js: Added. (tryMimeType):
  • platform/gtk/fast/canvas/canvas-toDataURL-case-insensitive-mimetype-expected.txt: Added.

2010-05-16 Andreas Kling <andreas.kling@nokia.com>

Reviewed by Kenneth Rohde Christiansen.

Canvas's toDataURL() should be case insensitive wrt the mimeType argument.
https://bugs.webkit.org/show_bug.cgi?id=39153

Spec link:
http://www.whatwg.org/specs/web-apps/current-work/#dom-canvas-todataurl

Test: fast/canvas/canvas-toDataURL-case-insensitive-mimetype.html

  • dom/CanvasSurface.cpp: (WebCore::CanvasSurface::toDataURL):
Location:
trunk
Files:
4 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r59580 r59581  
     12010-05-16  Andreas Kling  <andreas.kling@nokia.com>
     2
     3        Reviewed by Kenneth Rohde Christiansen.
     4
     5        Add a test to verify that Canvas's toDataURL() is case insensitive wrt the mimeType argument.
     6        https://bugs.webkit.org/show_bug.cgi?id=39153
     7
     8        Spec link:
     9        http://www.whatwg.org/specs/web-apps/current-work/#dom-canvas-todataurl
     10
     11        * fast/canvas/canvas-toDataURL-case-insensitive-mimetype-expected.txt: Added.
     12        * fast/canvas/canvas-toDataURL-case-insensitive-mimetype.html: Added.
     13        * fast/canvas/script-tests/canvas-toDataURL-case-insensitive-mimetype.js: Added.
     14        (tryMimeType):
     15        * platform/gtk/fast/canvas/canvas-toDataURL-case-insensitive-mimetype-expected.txt: Added.
     16
    1172010-05-16  Robert Hogan  <robert@webkit.org>
    218
  • trunk/WebCore/ChangeLog

    r59577 r59581  
     12010-05-16  Andreas Kling  <andreas.kling@nokia.com>
     2
     3        Reviewed by Kenneth Rohde Christiansen.
     4
     5        Canvas's toDataURL() should be case insensitive wrt the mimeType argument.
     6        https://bugs.webkit.org/show_bug.cgi?id=39153
     7
     8        Spec link:
     9        http://www.whatwg.org/specs/web-apps/current-work/#dom-canvas-todataurl
     10
     11        Test: fast/canvas/canvas-toDataURL-case-insensitive-mimetype.html
     12
     13        * dom/CanvasSurface.cpp:
     14        (WebCore::CanvasSurface::toDataURL):
     15
    1162010-05-16  Simon Fraser  <simon.fraser@apple.com>
    217
  • trunk/WebCore/dom/CanvasSurface.cpp

    r59567 r59581  
    7575        return String("data:,");
    7676
     77    String lowercaseMimeType = mimeType.lower();
     78
    7779    // FIXME: Make isSupportedImageMIMETypeForEncoding threadsafe (to allow this method to be used on a worker thread).
    78     if (mimeType.isNull() || !MIMETypeRegistry::isSupportedImageMIMETypeForEncoding(mimeType))
     80    if (mimeType.isNull() || !MIMETypeRegistry::isSupportedImageMIMETypeForEncoding(lowercaseMimeType))
    7981        return buffer()->toDataURL("image/png");
    8082
    81     return buffer()->toDataURL(mimeType);
     83    return buffer()->toDataURL(lowercaseMimeType);
    8284}
    8385
Note: See TracChangeset for help on using the changeset viewer.