Title: [87090] trunk
Revision
87090
Author
[email protected]
Date
2011-05-23 12:47:53 -0700 (Mon, 23 May 2011)

Log Message

2011-05-23  Adam Barth  <[email protected]>

        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  <[email protected]>

        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:

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (87089 => 87090)


--- trunk/LayoutTests/ChangeLog	2011-05-23 19:05:57 UTC (rev 87089)
+++ trunk/LayoutTests/ChangeLog	2011-05-23 19:47:53 UTC (rev 87090)
@@ -1,3 +1,17 @@
+2011-05-23  Adam Barth  <[email protected]>
+
+        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  <[email protected]>
 
         Reviewed by Simon Fraser.

Added: trunk/LayoutTests/fast/images/busted-oval-does-not-render-expected.txt (0 => 87090)


--- trunk/LayoutTests/fast/images/busted-oval-does-not-render-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fast/images/busted-oval-does-not-render-expected.txt	2011-05-23 19:47:53 UTC (rev 87090)
@@ -0,0 +1,2 @@
+ALERT: PASS
+

Added: trunk/LayoutTests/fast/images/busted-oval-does-not-render.html (0 => 87090)


--- trunk/LayoutTests/fast/images/busted-oval-does-not-render.html	                        (rev 0)
+++ trunk/LayoutTests/fast/images/busted-oval-does-not-render.html	2011-05-23 19:47:53 UTC (rev 87090)
@@ -0,0 +1,5 @@
+<script>
+if (window.layoutTestController)
+    layoutTestController.dumpAsText();
+</script>
+<img src="" _onerror_="alert('PASS')">

Added: trunk/LayoutTests/fast/images/resources/busted-oval.png (0 => 87090)


--- trunk/LayoutTests/fast/images/resources/busted-oval.png	                        (rev 0)
+++ trunk/LayoutTests/fast/images/resources/busted-oval.png	2011-05-23 19:47:53 UTC (rev 87090)
@@ -0,0 +1,6 @@
+\x89PNG
+
+
+IHDR%!\xD1m\xF5BsRGB\xAE\xCE\xE9gAMA\xB1\x8F\xFCa cHRMz&\x80\x84\xFA\x80\xE8u0\xEA`:\x98p\x9C\xBAQ<4IDATHKŗ1
+\xC2@E\xF5\x92JJ\x91x\x89\x84\xD4VV\xB6i\xA2hl!\x82\xB0\xB0\xB0\x8Av1ɺ\xE8̨c	\xF1\xFF\xFF2옝t\xAB\xAA\xEAh\xE0i"\xAC\xBC\x95\xF3\xD3<\xDAF\xE1*,\xFD\xAC\x8Fo\x9C\xE3
+\xAE\xE3Wb\xCE{ޤ\x98\xF4\xB2\xE5\xE5[\xEA+^\xB2K(G\xD7\xAA\x9F\x97\x9Fs\xA9iA\x82\x97\xEA\xE1\x8D\xF7\xE3aƎ\x9Cg\xA4ˋ\xB7\xF1W`&i\xB2ţ\xB7\xFD\x9E\x9C&\xAAy\x9Bˆ\x9E\xC2R"\xF9Qe\xCDcEp\xC5./=\xA6\xDC\x96\xF9i\xEBc\x99e\xE2\x9AW\Y\xCB\x8A\xADoz\x98\xB2\x9C21(\x967Z\x8Fd,(\x967\YN\x99\xCBf\x81,\x82\xE5\xE5O\xF5i\xAF\x9Fvj\xFF\xFF\xB0\x8C\xAC\x95\x97\x89[\xCF3\xED\xE7\xE7\xAFK\xF4\xECG\xDA\xFBnAu7%\xAB\xCE/\xA9:\x9F\xA4\xEA\xFC\xF9\xE8%\xBD\xF9\xBA94қ\xE8\xD3\xF7\x87&\xF5[\xEFGw\xF7\xCC\xC3{\xC5\xF5\x97\xEBIEND\xAEB`\x82
\ No newline at end of file

Modified: trunk/Source/WebCore/ChangeLog (87089 => 87090)


--- trunk/Source/WebCore/ChangeLog	2011-05-23 19:05:57 UTC (rev 87089)
+++ trunk/Source/WebCore/ChangeLog	2011-05-23 19:47:53 UTC (rev 87090)
@@ -1,3 +1,18 @@
+2011-05-23  Adam Barth  <[email protected]>
+
+        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  <[email protected]>
 
         Reviewed by Tony Chang.

Modified: trunk/Source/WebCore/platform/image-decoders/ImageDecoder.cpp (87089 => 87090)


--- trunk/Source/WebCore/platform/image-decoders/ImageDecoder.cpp	2011-05-23 19:05:57 UTC (rev 87089)
+++ trunk/Source/WebCore/platform/image-decoders/ImageDecoder.cpp	2011-05-23 19:47:53 UTC (rev 87090)
@@ -57,12 +57,12 @@
 
 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)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to