Skip to content

Commit 249f2b8

Browse files
wantehchangCommit Bot
authored and
Commit Bot
committed
Remove image/avif-sequence & avifs file extension
The AOMedia Image Working Group decided to remove the "image/avif-sequence" MIME type and the "avifs" file extension from the AVIF specification: AOMediaCodec/av1-avif#59 AOMediaCodec/av1-avif#86 Since the future of the "image/avif-sequence" MIME type and the "avifs" file extension is uncertain, it is best to remove them from the Chromium source tree until the dust settles. Test: net_unittests --gtest_filter=MimeUtilTest.* blink_common_unittests --disable-features=AVIF blink_common_unittests --enable-features=AVIF blink_platform_unittests --gtest_filter=*AVIF* Bug: 1099839 Change-Id: I245e1ee2240bba315a49555908036eba7219afd6 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2270670 Commit-Queue: Wan-Teh Chang Reviewed-by: Ryan Sleevi Reviewed-by: Peter Kasting Reviewed-by: Dale Curtis Cr-Commit-Position: refs/heads/master@{#783192}
1 parent e86e25f commit 249f2b8

File tree

6 files changed

+6
-17
lines changed

6 files changed

+6
-17
lines changed

net/base/mime_util.cc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,6 @@ static const MimeInfo kPrimaryMappings[] = {
161161
{"audio/webm", "webm"},
162162
{"audio/x-m4a", "m4a"},
163163
{"image/avif", "avif"},
164-
{"image/avif-sequence", "avifs"},
165164
{"image/gif", "gif"},
166165
{"image/jpeg", "jpeg,jpg"},
167166
{"image/png", "png"},
@@ -533,7 +532,6 @@ namespace {
533532
// From http://www.w3schools.com/media/media_mimeref.asp and
534533
// http://plugindoc.mozdev.org/winmime.php
535534
static const char* const kStandardImageTypes[] = {"image/avif",
536-
"image/avif-sequence"
537535
"image/bmp",
538536
"image/cis-cod",
539537
"image/gif",

net/base/mime_util_unittest.cc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ TEST(MimeUtilTest, ExtensionTest) {
3434
{FILE_PATH_LITERAL("webm"), "video/webm", true},
3535
{FILE_PATH_LITERAL("weba"), "audio/webm", true},
3636
{FILE_PATH_LITERAL("avif"), "image/avif", true},
37-
{FILE_PATH_LITERAL("avifs"), "image/avif-sequence", true},
3837
#if defined(OS_CHROMEOS)
3938
// These are test cases for testing platform mime types on Chrome OS.
4039
{FILE_PATH_LITERAL("epub"), "application/epub+zip", true},
@@ -312,7 +311,6 @@ TEST(MimeUtilTest, TestGetExtensionsForMimeType) {
312311
{"MeSsAge/*", 1, "eml"},
313312
{"message/", 0, nullptr, true},
314313
{"image/avif", 1, "avif"},
315-
{"image/avif-sequence", 1, "avifs"},
316314
{"image/bmp", 1, "bmp"},
317315
{"video/*", 6, "mp4"},
318316
{"video/*", 6, "mpeg"},

third_party/blink/common/mime_util/mime_util.cc

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -137,12 +137,10 @@ MimeUtil::MimeUtil() {
137137
for (const char* type : kSupportedImageTypes)
138138
image_types_.insert(type);
139139
#if BUILDFLAG(ENABLE_AV1_DECODER)
140-
// TODO(wtc): Add "image/avif" and "image/avif-sequence" to the
141-
// kSupportedImageTypes array when the AVIF feature is shipped.
142-
if (base::FeatureList::IsEnabled(features::kAVIF)) {
140+
// TODO(wtc): Add "image/avif" to the kSupportedImageTypes array when the AVIF
141+
// feature is shipped.
142+
if (base::FeatureList::IsEnabled(features::kAVIF))
143143
image_types_.insert("image/avif");
144-
image_types_.insert("image/avif-sequence");
145-
}
146144
#endif
147145
for (const char* type : kUnsupportedTextTypes)
148146
unsupported_text_types_.insert(type);

third_party/blink/common/mime_util/mime_util_unittest.cc

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,8 @@ TEST(MimeUtilTest, LookupTypes) {
2121
#if BUILDFLAG(ENABLE_AV1_DECODER)
2222
EXPECT_EQ(IsSupportedImageMimeType("image/avif"),
2323
base::FeatureList::IsEnabled(features::kAVIF));
24-
EXPECT_EQ(IsSupportedImageMimeType("image/avif-sequence"),
25-
base::FeatureList::IsEnabled(features::kAVIF));
2624
#else
2725
EXPECT_FALSE(IsSupportedImageMimeType("image/avif"));
28-
EXPECT_FALSE(IsSupportedImageMimeType("image/avif-sequence"));
2926
#endif
3027
EXPECT_FALSE(IsSupportedImageMimeType("image/lolcat"));
3128
EXPECT_FALSE(IsSupportedImageMimeType("Image/LolCat"));

third_party/blink/renderer/platform/image-decoders/avif/avif_image_decoder.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -470,8 +470,8 @@ void AVIFImageDecoder::InitializeNewFrame(size_t index) {
470470
}
471471

472472
void AVIFImageDecoder::Decode(size_t index) {
473-
// TODO(dalecurtis): For fragmented avif-sequence files we probably want to
474-
// allow partial decoding. Depends on if we see frequent use of multi-track
473+
// TODO(dalecurtis): For fragmented AVIF image sequence files we probably want
474+
// to allow partial decoding. Depends on if we see frequent use of multi-track
475475
// images where there's lots to ignore.
476476
if (Failed() || !IsAllDataReceived())
477477
return;

third_party/blink/renderer/platform/image-decoders/image_decoder.cc

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,6 @@ String SniffMimeTypeInternal(scoped_refptr reader) {
141141
#if BUILDFLAG(ENABLE_AV1_DECODER)
142142
if (base::FeatureList::IsEnabled(features::kAVIF) &&
143143
AVIFImageDecoder::MatchesAVIFSignature(fast_reader)) {
144-
// TODO(wtc): Sniff AVIF image sequences and return image/avif-sequence.
145144
return "image/avif";
146145
}
147146
#endif
@@ -305,8 +304,7 @@ ImageDecoder::CompressionFormat ImageDecoder::GetCompressionFormat(
305304
// TODO(wtc): Implement this. Figure out whether to return kUndefinedFormat or
306305
// a new kAVIFAnimationFormat in the case of an animated AVIF image.
307306
if (base::FeatureList::IsEnabled(features::kAVIF) &&
308-
(EqualIgnoringASCIICase(mime_type, "image/avif") ||
309-
EqualIgnoringASCIICase(mime_type, "image/avif-sequence"))) {
307+
EqualIgnoringASCIICase(mime_type, "image/avif")) {
310308
return kLossyFormat;
311309
}
312310
#endif

0 commit comments

Comments
 (0)