WebKit Bugzilla
Attachment 341257 Details for
Bug 185833
: Add APNG as a supported MIME type
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-185833-20180525095011.patch (text/plain), 5.51 KB, created by
Yoav Weiss
on 2018-05-25 00:50:13 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Yoav Weiss
Created:
2018-05-25 00:50:13 PDT
Size:
5.51 KB
patch
obsolete
>Subversion Revision: 232015 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 43ab552a1e97453264e3da8c8090afc9382cced8..9214b0c20151026c3e1f888f15f9a21ccf6c8306 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,19 @@ >+2018-05-21 Yoav Weiss <yoav@yoav.ws> >+ >+ Add APNG as a supported MIME type >+ https://bugs.webkit.org/show_bug.cgi?id=185833 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ This makes sure that APNG is recognized as a supported MIME type, >+ enabling developers to conditionally load it using the `<picture>` >+ element. >+ >+ Test: fast/picture/image-picture-1x.html >+ >+ * platform/MIMETypeRegistry.cpp: >+ (WebCore::isSupportedImageVideoOrSVGMIMEType): Add APNG MIME type. >+ > 2018-05-21 Alicia Boya GarcÃa <aboya@igalia.com> > > [MSE][GStreamer] Stream::decodebinSinkPad is read but never assigned >diff --git a/Source/WebCore/platform/MIMETypeRegistry.cpp b/Source/WebCore/platform/MIMETypeRegistry.cpp >index 017bd99097ee4a3bfdfa0a08ba821faaa6c16945..1e22602a7f64408526b9dbcd963f4a3be320c64f 100644 >--- a/Source/WebCore/platform/MIMETypeRegistry.cpp >+++ b/Source/WebCore/platform/MIMETypeRegistry.cpp >@@ -450,7 +450,7 @@ bool MIMETypeRegistry::isSupportedImageMIMEType(const String& mimeType) > > bool MIMETypeRegistry::isSupportedImageVideoOrSVGMIMEType(const String& mimeType) > { >- if (isSupportedImageMIMEType(mimeType) || equalLettersIgnoringASCIICase(mimeType, "image/svg+xml")) >+ if (isSupportedImageMIMEType(mimeType) || equalLettersIgnoringASCIICase(mimeType, "image/svg+xml") || equalLettersIgnoringASCIICase(mimeType, "image/apng")) > return true; > > #if HAVE(AVASSETREADER) >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index e4bc3f0d7f9e685c0ff3a1ed81789cadf22daa6b..771ac44d0ae7a6d1e0d7df5d6be53adf491b445e 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,13 @@ >+2018-05-21 Yoav Weiss <yoav@yoav.ws> >+ >+ Add APNG as a supported MIME type >+ https://bugs.webkit.org/show_bug.cgi?id=185833 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * fast/picture/image-picture-1x-expected.txt: >+ * fast/picture/image-picture-1x.html: Add test for "image/apng". >+ > 2018-05-20 Emilio Cobos Ãlvarez <emilio@crisal.io> > > Update CSSOM WPT tests. >diff --git a/LayoutTests/fast/picture/image-picture-1x-expected.txt b/LayoutTests/fast/picture/image-picture-1x-expected.txt >index 85021c898ad1ba2f2f600e7831916e488f8d3522..8164709bf0d048255382f83284433c3cc99adfa4 100644 >--- a/LayoutTests/fast/picture/image-picture-1x-expected.txt >+++ b/LayoutTests/fast/picture/image-picture-1x-expected.txt >@@ -10,6 +10,8 @@ PASS document.getElementById("img_before_source").clientWidth is 75 > PASS currentSrcFileName("img_before_source") is "blue_rect.jpg?1" > PASS document.getElementById("unknown_type").clientWidth is 1600 > PASS currentSrcFileName("unknown_type") is "image-set-4x.png?3" >+PASS document.getElementById("apng_type").clientWidth is 800 >+PASS currentSrcFileName("apng_type") is "image-set-2x.png?2" > PASS document.getElementById("svg_type").clientWidth is 800 > PASS currentSrcFileName("svg_type") is "image-set-2x.png?2" > PASS document.getElementById("empty_type").clientWidth is 800 >@@ -27,4 +29,4 @@ PASS successfullyParsed is true > TEST COMPLETE > > some text >- >+ >diff --git a/LayoutTests/fast/picture/image-picture-1x.html b/LayoutTests/fast/picture/image-picture-1x.html >index 4ce33ac33e4592c65bff57acb5de687ceafd0cb3..4d395b35a656845704d7b24e192acb85a06effbb 100644 >--- a/LayoutTests/fast/picture/image-picture-1x.html >+++ b/LayoutTests/fast/picture/image-picture-1x.html >@@ -18,6 +18,8 @@ > shouldBe('currentSrcFileName("img_before_source")', '"blue_rect.jpg?1"'); > shouldBe('document.getElementById("unknown_type").clientWidth', '1600'); > shouldBe('currentSrcFileName("unknown_type")', '"image-set-4x.png?3"'); >+ shouldBe('document.getElementById("apng_type").clientWidth', '800'); >+ shouldBe('currentSrcFileName("apng_type")', '"image-set-2x.png?2"'); > shouldBe('document.getElementById("svg_type").clientWidth', '800'); > shouldBe('currentSrcFileName("svg_type")', '"image-set-2x.png?2"'); > shouldBe('document.getElementById("empty_type").clientWidth', '800'); >@@ -86,6 +88,16 @@ > resources/image-set-4x.png?3 1600w"> > <img id="unknown_type" src="resources/blue_rect.jpg?1"> > </picture> >+ <!-- source with APNG - should be loaded --> >+ <picture> >+ <source media="(max-width: 400px)" sizes="400px" srcset="../hidpi/resources/image-set-1x.png?1 400w, ../hidpi/resources/image-set-2x.png?1 800w, >+ resources/image-set-4x.png?1 1600w"> >+ <source media="(max-width: 800px)" type="image/apng" sizes="800px" srcset="../hidpi/resources/image-set-1x.png?2 400w, ../hidpi/resources/image-set-2x.png?2 800w, >+ resources/image-set-4x.png?2 1600w"> >+ <source media="(max-width: 1600px)" sizes="1600px" srcset="../hidpi/resources/image-set-1x.png?3 400w, ../hidpi/resources/image-set-2x.png?3 800w, >+ resources/image-set-4x.png?3 1600w"> >+ <img id="apng_type" src="resources/blue_rect.jpg?1"> >+ </picture> > <!-- SVG source - should not be ignored --> > <picture> > <source media="(max-width: 400px)" sizes="400px" srcset="../hidpi/resources/image-set-1x.png?1 400w, ../hidpi/resources/image-set-2x.png?1 800w, >@@ -144,4 +156,4 @@ > resources/image-set-4x.png?3 1600w"> > <img id="no_srcset" src="resources/blue_rect.jpg?1"> > </picture> >- >\ No newline at end of file >+
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 185833
:
340878
|
340891
| 341257