Skip to content
Permalink
Browse files
2011-05-23 Adam Barth <abarth@webkit.org>
        Reviewed by Eric Seidel.

        Update ImageDecoder::create to match sniffing spec
        https://bugs.webkit.org/show_bug.cgi?id=47683

        This test actually passes before this patch anyway.  I don't think this
        patch is actually observable in any meaningful way.

        * fast/images/busted-oval-does-not-render-expected.txt: Added.
        * fast/images/busted-oval-does-not-render.html: Added.
        * fast/images/resources/busted-oval.png: Added.
2011-05-23  Adam Barth  <abarth@webkit.org>

        Reviewed by Eric Seidel.

        Update ImageDecoder::create to match sniffing spec
        https://bugs.webkit.org/show_bug.cgi?id=47683

        This change is difficult to test.  We're making this change to comply
        with standards even if the change is difficult to observe.  (This patch
        also causes us to match Firefox.)

        Test: fast/images/busted-oval-does-not-render.html

        * platform/image-decoders/ImageDecoder.cpp:

Canonical link: https://commits.webkit.org/76673@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@87090 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
Adam Barth committed May 23, 2011
1 parent 3814760 commit 95efd3a9a64baddbc5ed8b5021bfb5251351fa87
@@ -1,3 +1,17 @@
2011-05-23 Adam Barth <abarth@webkit.org>

Reviewed by Eric Seidel.

Update ImageDecoder::create to match sniffing spec
https://bugs.webkit.org/show_bug.cgi?id=47683

This test actually passes before this patch anyway. I don't think this
patch is actually observable in any meaningful way.

* fast/images/busted-oval-does-not-render-expected.txt: Added.
* fast/images/busted-oval-does-not-render.html: Added.
* fast/images/resources/busted-oval.png: Added.

2011-05-23 Abhishek Arya <inferno@chromium.org>

Reviewed by Simon Fraser.
@@ -0,0 +1,2 @@
ALERT: PASS

@@ -0,0 +1,5 @@
<script>
if (window.layoutTestController)
layoutTestController.dumpAsText();
</script>
<img src="resources/busted-oval.png" onerror="alert('PASS')">
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -1,3 +1,18 @@
2011-05-23 Adam Barth <abarth@webkit.org>

Reviewed by Eric Seidel.

Update ImageDecoder::create to match sniffing spec
https://bugs.webkit.org/show_bug.cgi?id=47683

This change is difficult to test. We're making this change to comply
with standards even if the change is difficult to observe. (This patch
also causes us to match Firefox.)

Test: fast/images/busted-oval-does-not-render.html

* platform/image-decoders/ImageDecoder.cpp:

2011-05-23 Ruben <chromium@hybridsource.org>

Reviewed by Tony Chang.
@@ -57,12 +57,12 @@ unsigned copyFromSharedBuffer(char* buffer, unsigned bufferLength, const SharedB

bool matchesGIFSignature(char* contents)
{
return !memcmp(contents, "GIF8", 4);
return !memcmp(contents, "GIF87a", 6) || !memcmp(contents, "GIF89a", 6);
}

bool matchesPNGSignature(char* contents)
{
return !memcmp(contents, "\x89\x50\x4E\x47", 4);
return !memcmp(contents, "\x89\x50\x4E\x47\x0D\x0A\x1A\x0A", 8);
}

bool matchesJPEGSignature(char* contents)

0 comments on commit 95efd3a

Please sign in to comment.