Changeset 113833 in webkit


Ignore:
Timestamp:
Apr 11, 2012 12:02:17 AM (12 years ago)
Author:
noel.gordon@gmail.com
Message:

[GTK] ImageBuffer: Canonical mimeType for encoding implies startsWith('image/')
https://bugs.webkit.org/show_bug.cgi?id=83657

Reviewed by Martin Robinson.

Canonical image mimeTypes begin with "image/", and this is tested by an ASSERT
guard in toDataURL(): that checks the WebCore mimeType registry for image-for-
encoding mimeType. There is no need to also test mimeType.startsWith("image/")
because that is a given.

No new tests. Covered by existing fast/canvas/*toDataURL* tests.

  • platform/graphics/gtk/ImageBufferGtk.cpp:

(WebCore::ImageBuffer::toDataURL):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r113831 r113833  
     12012-04-11  Noel Gordon  <noel.gordon@gmail.com>
     2
     3        [GTK] ImageBuffer: Canonical mimeType for encoding implies startsWith('image/')
     4        https://bugs.webkit.org/show_bug.cgi?id=83657
     5
     6        Reviewed by Martin Robinson.
     7
     8        Canonical image mimeTypes begin with "image/", and this is tested by an ASSERT
     9        guard in toDataURL(): that checks the WebCore mimeType registry for image-for-
     10        encoding mimeType. There is no need to also test mimeType.startsWith("image/")
     11        because that is a given.
     12
     13        No new tests. Covered by existing fast/canvas/*toDataURL* tests.
     14
     15        * platform/graphics/gtk/ImageBufferGtk.cpp:
     16        (WebCore::ImageBuffer::toDataURL):
     17
    1182012-04-10  Carlos Garcia Campos  <cgarcia@igalia.com>
    219
  • trunk/Source/WebCore/platform/graphics/gtk/ImageBufferGtk.cpp

    r113742 r113833  
    5959    ASSERT(MIMETypeRegistry::isSupportedImageMIMETypeForEncoding(mimeType));
    6060
    61     if (!mimeType.startsWith("image/"))
    62         return "data:,";
    63 
    6461    GOwnPtr<gchar> buffer(0);
    6562    gsize bufferSize;
Note: See TracChangeset for help on using the changeset viewer.